diff options
author | Jonathan Marek <[email protected]> | 2020-06-11 08:38:18 -0400 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-12 15:09:06 +0000 |
commit | 093c4137224a59536af9e8062f5c98c2dc136ba1 (patch) | |
tree | f01d98e6c4b0264e0caea663d0c0098573e66dbb /src/freedreno/vulkan/tu_pipeline.c | |
parent | 13525a9c706bc3b5aef2b9bc649644f2e3607f31 (diff) |
turnip: share code between 3D blit/clear path and tu_pipeline
Instead of filling out registers manually, fill out ir3 structs and re-use
code from tu_pipeline.
Signed-off-by: Jonathan Marek <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5426>
Diffstat (limited to 'src/freedreno/vulkan/tu_pipeline.c')
-rw-r--r-- | src/freedreno/vulkan/tu_pipeline.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index 462e2018601..88bfd9a6caa 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -628,7 +628,7 @@ tu6_blend_op(VkBlendOp op) } } -static void +void tu6_emit_xs_config(struct tu_cs *cs, gl_shader_stage stage, /* xs->type, but xs may be NULL */ const struct ir3_shader_variant *xs, @@ -731,7 +731,9 @@ tu6_emit_xs_config(struct tu_cs *cs, COND(xs->bindless_tex, A6XX_SP_VS_CONFIG_BINDLESS_TEX) | COND(xs->bindless_samp, A6XX_SP_VS_CONFIG_BINDLESS_SAMP) | COND(xs->bindless_ibo, A6XX_SP_VS_CONFIG_BINDLESS_IBO) | - COND(xs->bindless_ubo, A6XX_SP_VS_CONFIG_BINDLESS_UBO)); + COND(xs->bindless_ubo, A6XX_SP_VS_CONFIG_BINDLESS_UBO) | + A6XX_SP_VS_CONFIG_NTEX(xs->num_samp) | + A6XX_SP_VS_CONFIG_NSAMP(xs->num_samp)); tu_cs_emit(cs, xs->instrlen); tu_cs_emit_pkt4(cs, cfg->reg_hlsq_xs_ctrl, 1); @@ -1003,7 +1005,7 @@ gl_primitive_to_tess(uint16_t primitive) { } } -static void +void tu6_emit_vpc(struct tu_cs *cs, const struct ir3_shader_variant *vs, const struct ir3_shader_variant *gs, @@ -1268,7 +1270,7 @@ tu6_emit_vpc_varying_modes(struct tu_cs *cs, tu_cs_emit_array(cs, ps_repl_modes, 8); } -static void +void tu6_emit_fs_inputs(struct tu_cs *cs, const struct ir3_shader_variant *fs) { uint32_t face_regid, coord_regid, zwcoord_regid, samp_id_regid; |