mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 09:50:36 +02:00
anv: fix emission of Wa_14015055625
When moving the static part, I missed that the
pipeline->primitive_id_override field isn't set yet when we check it
to emit 3DSTATE_TE.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 1e081bd680 ("anv: split 3DSTATE_TE packing between static & dynamic parts")
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27692>
This commit is contained in:
parent
68f80f9b0f
commit
96ab1d65cc
2 changed files with 16 additions and 5 deletions
|
|
@ -4300,7 +4300,6 @@ struct anv_graphics_pipeline {
|
|||
bool kill_pixel;
|
||||
bool force_fragment_thread_dispatch;
|
||||
bool uses_xfb;
|
||||
bool primitive_id_override;
|
||||
|
||||
/* Number of VERTEX_ELEMENT_STATE input elements used by the shader */
|
||||
uint32_t vs_input_elements;
|
||||
|
|
|
|||
|
|
@ -513,6 +513,20 @@ emit_urb_setup(struct anv_graphics_pipeline *pipeline,
|
|||
|
||||
}
|
||||
|
||||
static bool
|
||||
sbe_primitive_id_override(struct anv_graphics_pipeline *pipeline)
|
||||
{
|
||||
const struct brw_wm_prog_data *wm_prog_data = get_wm_prog_data(pipeline);
|
||||
if (!wm_prog_data)
|
||||
return false;
|
||||
|
||||
const struct intel_vue_map *fs_input_map =
|
||||
&anv_pipeline_get_last_vue_prog_data(pipeline)->vue_map;
|
||||
|
||||
return (wm_prog_data->inputs & VARYING_BIT_PRIMITIVE_ID) &&
|
||||
fs_input_map->varying_to_slot[VARYING_SLOT_PRIMITIVE_ID] == -1;
|
||||
}
|
||||
|
||||
static void
|
||||
emit_3dstate_sbe(struct anv_graphics_pipeline *pipeline)
|
||||
{
|
||||
|
|
@ -615,15 +629,13 @@ emit_3dstate_sbe(struct anv_graphics_pipeline *pipeline)
|
|||
/* Ask the hardware to supply PrimitiveID if the fragment shader
|
||||
* reads it but a previous stage didn't write one.
|
||||
*/
|
||||
if ((wm_prog_data->inputs & VARYING_BIT_PRIMITIVE_ID) &&
|
||||
fs_input_map->varying_to_slot[VARYING_SLOT_PRIMITIVE_ID] == -1) {
|
||||
if (sbe_primitive_id_override(pipeline)) {
|
||||
sbe.PrimitiveIDOverrideAttributeSelect =
|
||||
wm_prog_data->urb_setup[VARYING_SLOT_PRIMITIVE_ID];
|
||||
sbe.PrimitiveIDOverrideComponentX = true;
|
||||
sbe.PrimitiveIDOverrideComponentY = true;
|
||||
sbe.PrimitiveIDOverrideComponentZ = true;
|
||||
sbe.PrimitiveIDOverrideComponentW = true;
|
||||
pipeline->primitive_id_override = true;
|
||||
}
|
||||
} else {
|
||||
assert(anv_pipeline_is_mesh(pipeline));
|
||||
|
|
@ -1423,7 +1435,7 @@ emit_3dstate_te(struct anv_graphics_pipeline *pipeline)
|
|||
*
|
||||
* Disable Tessellation Distribution when primitive Id is enabled.
|
||||
*/
|
||||
if (pipeline->primitive_id_override ||
|
||||
if (sbe_primitive_id_override(pipeline) ||
|
||||
geom_or_tess_prim_id_used(pipeline))
|
||||
te.TessellationDistributionMode = TEDMODE_OFF;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue