mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
iris: Fix tessellation evaluation shaders that use scratch
The code path for emitting tessellation commands when the TES needed scratch space was failing to emit 3DSTATE_TE, and instead only emitting 3DSTATE_DS. This meant that you could get HS and DS enabled with tessellation itself turned off, which is utter nonsense and would cause a GPU hang. Alchemist and later takes a different path and don't take this bug, but all earlier hardware would hit it. Discovered while working on compiler changes that caused a single piglit test to spill minorly, and thus break entirely. Fixes:4256f7ed58("iris: Fill out scratch base address dynamically") Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28032> (cherry picked from commit9e5fd49cbe)
This commit is contained in:
parent
14a15f8265
commit
c968caaa69
2 changed files with 8 additions and 2 deletions
|
|
@ -24,7 +24,7 @@
|
|||
"description": "iris: Fix tessellation evaluation shaders that use scratch",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "4256f7ed5847505c30e903b6674dac88c5d03315",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -7278,7 +7278,13 @@ iris_upload_dirty_render_state(struct iris_context *ice,
|
|||
switch (stage) {
|
||||
case MESA_SHADER_VERTEX: MERGE_SCRATCH_ADDR(3DSTATE_VS); break;
|
||||
case MESA_SHADER_TESS_CTRL: MERGE_SCRATCH_ADDR(3DSTATE_HS); break;
|
||||
case MESA_SHADER_TESS_EVAL: MERGE_SCRATCH_ADDR(3DSTATE_DS); break;
|
||||
case MESA_SHADER_TESS_EVAL: {
|
||||
uint32_t *shader_ds = (uint32_t *) shader->derived_data;
|
||||
uint32_t *shader_te = shader_ds + GENX(3DSTATE_DS_length);
|
||||
iris_batch_emit(batch, shader_te, 4 * GENX(3DSTATE_TE_length));
|
||||
MERGE_SCRATCH_ADDR(3DSTATE_DS);
|
||||
break;
|
||||
}
|
||||
case MESA_SHADER_GEOMETRY: MERGE_SCRATCH_ADDR(3DSTATE_GS); break;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue