Home | History | Annotate | Download | only in vc5

Lines Matching refs:vc5

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