mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-21 23:18:24 +02:00
nvk: Default to output primitives as lines for tesselation parameters
With SET_TESS_PARAMS macro, we handle caching the previous parameters to
not reemit SET_TESSELLATION_PARAMETERS when possible.
However, we were wrongly setting up SET_TESSELLATION_PARAMETERS with
output_primitives=points during draw state initialization while the
default state of SCRATCH_TESS_PARAMS would map to
output_primitives=lines.
This adjust SET_TESSELLATION_PARAMETERS to the proper default value and
add a new MME test case for the default state to prove it.
This fixes tesselation tests failures on vkd3d-proton.
Signed-off-by: Mary Guillemard <mary@mary.zone>
Fixes: 99bc2d9775 ("nvk: Merge tese/tesc state in the MME")
Reviewed-by: Mel Henning <mhenning@darkrefraction.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42294>
This commit is contained in:
parent
bd4befe6f7
commit
b0046b8cb8
1 changed files with 36 additions and 2 deletions
|
|
@ -260,7 +260,11 @@ nvk_push_draw_state_init(struct nvk_queue *queue, struct nv_push *p)
|
|||
|
||||
/* Initialize tessellation parameters */
|
||||
P_IMMD(p, NV9097, SET_MME_SHADOW_SCRATCH(NVK_MME_SCRATCH_TESS_PARAMS), 0);
|
||||
P_IMMD(p, NV9097, SET_TESSELLATION_PARAMETERS, {});
|
||||
P_IMMD(p, NV9097, SET_TESSELLATION_PARAMETERS, {
|
||||
.domain_type = DOMAIN_TYPE_ISOLINE,
|
||||
.spacing = SPACING_INTEGER,
|
||||
.output_primitives = OUTPUT_PRIMITIVES_LINES,
|
||||
});
|
||||
|
||||
P_IMMD(p, NV9097, SET_RENDER_ENABLE_C, MODE_TRUE);
|
||||
|
||||
|
|
@ -2227,7 +2231,37 @@ const struct nvk_mme_test_case nvk_mme_set_tess_params_tests[] = {{
|
|||
},
|
||||
{ }
|
||||
},
|
||||
}, {}};
|
||||
},
|
||||
{
|
||||
/* Test expected default state */
|
||||
.init = (struct nvk_mme_mthd_data[]) {
|
||||
{
|
||||
NVK_SET_MME_SCRATCH(TESS_PARAMS),
|
||||
NVK_MME_TESS_STATE(TRIANGLE, INTEGER, 0)
|
||||
},
|
||||
{ }
|
||||
},
|
||||
.params = (uint32_t[]) {
|
||||
NVK_MME_VAL_MASK(0, 0xffff)
|
||||
},
|
||||
.expected = (struct nvk_mme_mthd_data[]) {
|
||||
{
|
||||
NVK_SET_MME_SCRATCH(TESS_PARAMS),
|
||||
NVK_MME_FULL_TESS_STATE(
|
||||
NVDEF(NV9097, SET_TESSELLATION_PARAMETERS, DOMAIN_TYPE, ISOLINE) |
|
||||
NVDEF(NV9097, SET_TESSELLATION_PARAMETERS, SPACING, INTEGER),
|
||||
NVDEF(NV9097, SET_TESSELLATION_PARAMETERS, DOMAIN_TYPE, ISOLINE) |
|
||||
NVDEF(NV9097, SET_TESSELLATION_PARAMETERS, SPACING, INTEGER)
|
||||
)
|
||||
},
|
||||
{
|
||||
NV9097_SET_TESSELLATION_PARAMETERS,
|
||||
NVK_MME_TESS_PARAMS(ISOLINE, INTEGER, LINES)
|
||||
},
|
||||
{ }
|
||||
},
|
||||
},
|
||||
{}};
|
||||
|
||||
void
|
||||
nvk_cmd_flush_gfx_shaders(struct nvk_cmd_buffer *cmd)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue