• Home
  • Raw
  • Download

Lines Matching refs:v3d

115 emit_one_texture(struct v3d_context *v3d, struct v3d_texture_stateobj *stage_tex,  in emit_one_texture()  argument
118 struct v3d_job *job = v3d->job; in emit_one_texture()
125 const struct v3d_device_info *devinfo = &v3d->screen->devinfo; in emit_one_texture()
240 emit_textures(struct v3d_context *v3d, struct v3d_texture_stateobj *stage_tex) in emit_textures() argument
244 emit_one_texture(v3d, stage_tex, i); in emit_textures()
250 translate_colormask(struct v3d_context *v3d, uint32_t colormask, int rt) in translate_colormask() argument
252 if (v3d->swap_color_rb & (1 << rt)) { in translate_colormask()
262 emit_rt_blend(struct v3d_context *v3d, struct v3d_job *job, in emit_rt_blend() argument
360 struct v3d_context *v3d = job->v3d; in emit_varying_flags() local
363 for (int i = 0; i < ARRAY_SIZE(v3d->prog.fs->prog_data.fs->flat_shade_flags); i++) { in emit_varying_flags()
387 get_tf_shader(struct v3d_context *v3d) in get_tf_shader() argument
389 if (v3d->prog.bind_gs) in get_tf_shader()
390 return v3d->prog.bind_gs; in get_tf_shader()
392 return v3d->prog.bind_vs; in get_tf_shader()
398 struct v3d_context *v3d = v3d_context(pctx); in v3dX() local
399 struct v3d_job *job = v3d->job; in v3dX()
400 bool rasterizer_discard = v3d->rasterizer->base.rasterizer_discard; in v3dX()
402 if (v3d->dirty & (V3D_DIRTY_SCISSOR | V3D_DIRTY_VIEWPORT | in v3dX()
404 float *vpscale = v3d->viewport.scale; in v3dX()
405 float *vptranslate = v3d->viewport.translate; in v3dX()
420 if (!v3d->rasterizer->base.scissor) { in v3dX()
426 minx = MAX2(vp_minx, v3d->scissor.minx); in v3dX()
427 miny = MAX2(vp_miny, v3d->scissor.miny); in v3dX()
428 maxx = MIN2(vp_maxx, v3d->scissor.maxx); in v3dX()
429 maxy = MIN2(vp_maxy, v3d->scissor.maxy); in v3dX()
454 if (!v3d->rasterizer->base.scissor) { in v3dX()
457 (v3d->dirty & V3D_DIRTY_SCISSOR)) { in v3dX()
460 v3d->scissor.minx; in v3dX()
462 v3d->scissor.miny; in v3dX()
464 v3d->scissor.maxx - 1; in v3dX()
466 v3d->scissor.maxy - 1; in v3dX()
475 if (v3d->dirty & (V3D_DIRTY_RASTERIZER | in v3dX()
482 !(v3d->rasterizer->base.cull_face & in v3dX()
486 !(v3d->rasterizer->base.cull_face & in v3dX()
492 v3d->rasterizer->base.front_ccw; in v3dX()
495 v3d->rasterizer->base.offset_tri; in v3dX()
506 v3d->rasterizer->base.multisample || in v3dX()
507 v3d->sample_mask != 0xf; in v3dX()
510 v3d->rasterizer->base.flatshade_first; in v3dX()
512 config.blend_enable = v3d->blend->blend_enables; in v3dX()
519 if (v3d->zsa->base.depth_enabled) { in v3dX()
521 v3d->zsa->base.depth_writemask; in v3dX()
525 v3d->zsa->base.depth_func; in v3dX()
531 v3d->zsa->base.stencil[0].enabled; in v3dX()
537 v3d_line_smoothing_enabled(v3d) ? in v3dX()
544 if (v3d->dirty & V3D_DIRTY_RASTERIZER && in v3dX()
545 v3d->rasterizer->base.offset_tri) { in v3dX()
549 v3d->rasterizer->depth_offset_z16, in v3dX()
553 v3d->rasterizer->depth_offset, in v3dX()
558 if (v3d->dirty & V3D_DIRTY_RASTERIZER) { in v3dX()
560 point_size.point_size = v3d->rasterizer->point_size; in v3dX()
564 line_width.line_width = v3d_get_real_line_width(v3d); in v3dX()
568 if (v3d->dirty & V3D_DIRTY_VIEWPORT) { in v3dX()
571 v3d->viewport.scale[0] * 256.0f; in v3dX()
573 v3d->viewport.scale[1] * 256.0f; in v3dX()
578 v3d->viewport.translate[2]; in v3dX()
580 v3d->viewport.scale[2]; in v3dX()
583 float z1 = (v3d->viewport.translate[2] - in v3dX()
584 v3d->viewport.scale[2]); in v3dX()
585 float z2 = (v3d->viewport.translate[2] + in v3dX()
586 v3d->viewport.scale[2]); in v3dX()
593 v3d->viewport.translate[0]; in v3dX()
595 v3d->viewport.translate[1]; in v3dX()
599 if (v3d->dirty & V3D_DIRTY_BLEND) { in v3dX()
600 struct v3d_blend_state *blend = v3d->blend; in v3dX()
611 emit_rt_blend(v3d, job, &blend->base, i, in v3dX()
613 v3d->blend_dst_alpha_one & (1 << i)); in v3dX()
614 } else if (v3d->blend_dst_alpha_one && in v3dX()
615 util_bitcount(v3d->blend_dst_alpha_one) < job->nr_cbufs) { in v3dX()
625 emit_rt_blend(v3d, job, &blend->base, 0, in v3dX()
627 v3d->blend_dst_alpha_one, in v3dX()
629 emit_rt_blend(v3d, job, &blend->base, 0, in v3dX()
631 ~v3d->blend_dst_alpha_one, in v3dX()
634 emit_rt_blend(v3d, job, &blend->base, 0, in v3dX()
636 v3d->blend_dst_alpha_one); in v3dX()
641 if (v3d->dirty & V3D_DIRTY_BLEND) { in v3dX()
642 struct pipe_blend_state *blend = &v3d->blend->base; in v3dX()
649 mask.mask |= translate_colormask(v3d, rt_mask, in v3dX()
658 if (v3d->dirty & V3D_DIRTY_BLEND_COLOR || in v3dX()
659 (V3D_VERSION < 41 && (v3d->dirty & V3D_DIRTY_BLEND))) { in v3dX()
661 color.red_f16 = (v3d->swap_color_rb ? in v3dX()
662 v3d->blend_color.hf[2] : in v3dX()
663 v3d->blend_color.hf[0]); in v3dX()
664 color.green_f16 = v3d->blend_color.hf[1]; in v3dX()
665 color.blue_f16 = (v3d->swap_color_rb ? in v3dX()
666 v3d->blend_color.hf[0] : in v3dX()
667 v3d->blend_color.hf[2]); in v3dX()
668 color.alpha_f16 = v3d->blend_color.hf[3]; in v3dX()
672 if (v3d->dirty & (V3D_DIRTY_ZSA | V3D_DIRTY_STENCIL_REF)) { in v3dX()
673 struct pipe_stencil_state *front = &v3d->zsa->base.stencil[0]; in v3dX()
674 struct pipe_stencil_state *back = &v3d->zsa->base.stencil[1]; in v3dX()
678 v3d->zsa->stencil_front, config) { in v3dX()
680 v3d->stencil_ref.ref_value[0]; in v3dX()
686 v3d->zsa->stencil_back, config) { in v3dX()
688 v3d->stencil_ref.ref_value[1]; in v3dX()
697 if (v3d->dirty & V3D_DIRTY_FRAGTEX) in v3dX()
698 emit_textures(v3d, &v3d->tex[PIPE_SHADER_FRAGMENT]); in v3dX()
700 if (v3d->dirty & V3D_DIRTY_GEOMTEX) in v3dX()
701 emit_textures(v3d, &v3d->tex[PIPE_SHADER_GEOMETRY]); in v3dX()
703 if (v3d->dirty & V3D_DIRTY_VERTTEX) in v3dX()
704 emit_textures(v3d, &v3d->tex[PIPE_SHADER_VERTEX]); in v3dX()
707 if (v3d->dirty & V3D_DIRTY_FLAT_SHADE_FLAGS) { in v3dX()
709 v3d->prog.fs->prog_data.fs->flat_shade_flags, in v3dX()
716 if (v3d->dirty & V3D_DIRTY_NOPERSPECTIVE_FLAGS) { in v3dX()
718 v3d->prog.fs->prog_data.fs->noperspective_flags, in v3dX()
724 if (v3d->dirty & V3D_DIRTY_CENTROID_FLAGS) { in v3dX()
726 v3d->prog.fs->prog_data.fs->centroid_flags, in v3dX()
736 if (v3d->dirty & (V3D_DIRTY_STREAMOUT | in v3dX()
739 struct v3d_streamout_stateobj *so = &v3d->streamout; in v3dX()
741 bool psiz_per_vertex = (v3d->prim_mode == PIPE_PRIM_POINTS && in v3dX()
742 v3d->rasterizer->base.point_size_per_vertex); in v3dX()
744 get_tf_shader(v3d); in v3dX()
750 bool tf_enabled = v3d_transform_feedback_enabled(v3d); in v3dX()
779 if (v3d->dirty & V3D_DIRTY_STREAMOUT) { in v3dX()
780 struct v3d_uncompiled_shader *tf_shader = get_tf_shader(v3d); in v3dX()
781 struct v3d_streamout_stateobj *so = &v3d->streamout; in v3dX()
789 uint32_t offset = (v3d->streamout.offsets[i] * in v3dX()
816 v3d_job_add_tf_write_resource(v3d->job, in v3dX()
823 if (v3d->dirty & V3D_DIRTY_OQ) { in v3dX()
825 if (v3d->active_queries && v3d->current_oq) { in v3dX()
826 counter.address = cl_address(v3d->current_oq, 0); in v3dX()
832 if (v3d->dirty & V3D_DIRTY_SAMPLE_STATE) { in v3dX()
838 state.mask = job->msaa ? v3d->sample_mask : 0xf; in v3dX()