Lines Matching refs:vc5
130 emit_one_texture(struct vc5_context *vc5, struct vc5_texture_stateobj *stage_tex, in emit_one_texture() argument
133 struct vc5_job *job = vc5->job; in emit_one_texture()
140 const struct v3d_device_info *devinfo = &vc5->screen->devinfo; in emit_one_texture()
254 emit_textures(struct vc5_context *vc5, struct vc5_texture_stateobj *stage_tex) in emit_textures() argument
258 emit_one_texture(vc5, stage_tex, i); in emit_textures()
264 translate_colormask(struct vc5_context *vc5, uint32_t colormask, int rt) in translate_colormask() argument
266 if (vc5->swap_color_rb & (1 << rt)) { in translate_colormask()
276 emit_rt_blend(struct vc5_context *vc5, struct vc5_job *job, in emit_rt_blend() argument
291 vc5->blend_dst_alpha_one); in emit_rt_blend()
294 vc5->blend_dst_alpha_one); in emit_rt_blend()
299 vc5->blend_dst_alpha_one); in emit_rt_blend()
302 vc5->blend_dst_alpha_one); in emit_rt_blend()
309 struct vc5_context *vc5 = vc5_context(pctx); in v3dX() local
310 struct vc5_job *job = vc5->job; in v3dX()
312 if (vc5->dirty & (VC5_DIRTY_SCISSOR | VC5_DIRTY_VIEWPORT | in v3dX()
314 float *vpscale = vc5->viewport.scale; in v3dX()
315 float *vptranslate = vc5->viewport.translate; in v3dX()
330 if (!vc5->rasterizer->base.scissor) { in v3dX()
336 minx = MAX2(vp_minx, vc5->scissor.minx); in v3dX()
337 miny = MAX2(vp_miny, vc5->scissor.miny); in v3dX()
338 maxx = MIN2(vp_maxx, vc5->scissor.maxx); in v3dX()
339 maxy = MIN2(vp_maxy, vc5->scissor.maxy); in v3dX()
355 if (vc5->dirty & (VC5_DIRTY_RASTERIZER | in v3dX()
361 !vc5->rasterizer->base.rasterizer_discard && in v3dX()
362 !(vc5->rasterizer->base.cull_face & in v3dX()
365 !vc5->rasterizer->base.rasterizer_discard && in v3dX()
366 !(vc5->rasterizer->base.cull_face & in v3dX()
372 vc5->rasterizer->base.front_ccw; in v3dX()
375 vc5->rasterizer->base.offset_tri; in v3dX()
378 vc5->rasterizer->base.multisample; in v3dX()
381 vc5->rasterizer->base.flatshade_first; in v3dX()
383 config.blend_enable = vc5->blend->rt[0].blend_enable; in v3dX()
386 if (vc5->zsa->base.depth.enabled) { in v3dX()
388 vc5->zsa->base.depth.writemask; in v3dX()
390 (vc5->zsa->early_z_enable && in v3dX()
391 !vc5->prog.fs->prog_data.fs->writes_z); in v3dX()
393 vc5->zsa->base.depth.func; in v3dX()
399 vc5->zsa->base.stencil[0].enabled; in v3dX()
404 if (vc5->dirty & VC5_DIRTY_RASTERIZER && in v3dX()
405 vc5->rasterizer->base.offset_tri) { in v3dX()
408 vc5->rasterizer->offset_factor; in v3dX()
410 vc5->rasterizer->offset_units; in v3dX()
414 if (vc5->dirty & VC5_DIRTY_RASTERIZER) { in v3dX()
416 point_size.point_size = vc5->rasterizer->point_size; in v3dX()
420 line_width.line_width = vc5->rasterizer->base.line_width; in v3dX()
424 if (vc5->dirty & VC5_DIRTY_VIEWPORT) { in v3dX()
427 vc5->viewport.scale[0] * 256.0f; in v3dX()
429 vc5->viewport.scale[1] * 256.0f; in v3dX()
434 vc5->viewport.translate[2]; in v3dX()
436 vc5->viewport.scale[2]; in v3dX()
439 clip.minimum_zw = (vc5->viewport.translate[2] - in v3dX()
440 vc5->viewport.scale[2]); in v3dX()
441 clip.maximum_zw = (vc5->viewport.translate[2] + in v3dX()
442 vc5->viewport.scale[2]); in v3dX()
447 vc5->viewport.translate[0]; in v3dX()
449 vc5->viewport.translate[1]; in v3dX()
453 if (vc5->dirty & VC5_DIRTY_BLEND && vc5->blend->rt[0].blend_enable) { in v3dX()
454 struct pipe_blend_state *blend = vc5->blend; in v3dX()
458 emit_rt_blend(vc5, job, blend, i); in v3dX()
460 emit_rt_blend(vc5, job, blend, 0); in v3dX()
464 if (vc5->dirty & VC5_DIRTY_BLEND) { in v3dX()
465 struct pipe_blend_state *blend = vc5->blend; in v3dX()
470 translate_colormask(vc5, blend->rt[0].colormask, 0); in v3dX()
472 translate_colormask(vc5, blend->rt[1].colormask, 1); in v3dX()
474 translate_colormask(vc5, blend->rt[2].colormask, 2); in v3dX()
476 translate_colormask(vc5, blend->rt[3].colormask, 3); in v3dX()
479 translate_colormask(vc5, blend->rt[0].colormask, 0); in v3dX()
481 translate_colormask(vc5, blend->rt[0].colormask, 1); in v3dX()
483 translate_colormask(vc5, blend->rt[0].colormask, 2); in v3dX()
485 translate_colormask(vc5, blend->rt[0].colormask, 3); in v3dX()
490 if (vc5->dirty & VC5_DIRTY_BLEND_COLOR) { in v3dX()
492 colour.red_f16 = (vc5->swap_color_rb ? in v3dX()
493 vc5->blend_color.hf[2] : in v3dX()
494 vc5->blend_color.hf[0]); in v3dX()
495 colour.green_f16 = vc5->blend_color.hf[1]; in v3dX()
496 colour.blue_f16 = (vc5->swap_color_rb ? in v3dX()
497 vc5->blend_color.hf[0] : in v3dX()
498 vc5->blend_color.hf[2]); in v3dX()
499 colour.alpha_f16 = vc5->blend_color.hf[3]; in v3dX()
503 if (vc5->dirty & (VC5_DIRTY_ZSA | VC5_DIRTY_STENCIL_REF)) { in v3dX()
504 struct pipe_stencil_state *front = &vc5->zsa->base.stencil[0]; in v3dX()
505 struct pipe_stencil_state *back = &vc5->zsa->base.stencil[1]; in v3dX()
509 vc5->zsa->stencil_front, config) { in v3dX()
511 vc5->stencil_ref.ref_value[0]; in v3dX()
517 vc5->zsa->stencil_back, config) { in v3dX()
519 vc5->stencil_ref.ref_value[1]; in v3dX()
528 if (vc5->dirty & VC5_DIRTY_FRAGTEX) in v3dX()
529 emit_textures(vc5, &vc5->fragtex); in v3dX()
531 if (vc5->dirty & VC5_DIRTY_VERTTEX) in v3dX()
532 emit_textures(vc5, &vc5->verttex); in v3dX()
535 if (vc5->dirty & VC5_DIRTY_FLAT_SHADE_FLAGS) { in v3dX()
538 for (int i = 0; i < ARRAY_SIZE(vc5->prog.fs->prog_data.fs->flat_shade_flags); i++) { in v3dX()
539 if (!vc5->prog.fs->prog_data.fs->flat_shade_flags[i]) in v3dX()
561 vc5->prog.fs->prog_data.fs->flat_shade_flags[i]; in v3dX()
572 if (vc5->dirty & VC5_DIRTY_STREAMOUT) { in v3dX()
573 struct vc5_streamout_stateobj *so = &vc5->streamout; in v3dX()
579 vc5->prog.bind_vs->num_tf_specs; in v3dX()
581 (vc5->prog.bind_vs->num_tf_specs != 0 && in v3dX()
582 vc5->active_queries); in v3dX()
589 vc5->prog.bind_vs->num_tf_specs; in v3dX()
592 for (int i = 0; i < vc5->prog.bind_vs->num_tf_specs; i++) { in v3dX()
594 &vc5->prog.bind_vs->tf_specs[i]); in v3dX()
619 vc5_job_add_write_resource(vc5->job, in v3dX()
628 if (vc5->dirty & VC5_DIRTY_OQ) { in v3dX()
630 job->oq_enabled = vc5->active_queries && vc5->current_oq; in v3dX()
632 counter.address = cl_address(vc5->current_oq, 0); in v3dX()