mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-17 08:10:33 +01:00
ir3: Align TCS per-patch output to 64 bytes to prevent stale reads
Empirically, TCS outputs have to be aligned to 64 bytes, otherwise stale data may be read in rare cases. The exact reason is not clear, but tests and proprietary driver behavior strongly point at the need for 64 byte alignment. Fixes tesselation issues in at least "Conan Exiles" but likely in many more cases. CC: mesa-stable Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39890>
This commit is contained in:
parent
e111422f7f
commit
47251b2e2d
1 changed files with 7 additions and 1 deletions
|
|
@ -662,7 +662,13 @@ ir3_nir_lower_tess_ctrl(nir_shader *shader, struct ir3_shader_variant *v,
|
|||
|
||||
build_primitive_map(shader, &state.map);
|
||||
memcpy(v->output_loc, state.map.loc, sizeof(v->output_loc));
|
||||
v->output_size = state.map.stride;
|
||||
|
||||
/* Empirically, TCS outputs have to be aligned to 64 bytes,
|
||||
* otherwise stale data may be read in rare cases. The exact
|
||||
* reason is not clear, but tests and proprietary driver behavior
|
||||
* strongly point at the need for 64 byte alignment.
|
||||
*/
|
||||
v->output_size = ALIGN_POT(state.map.stride, 16);
|
||||
|
||||
nir_function_impl *impl = nir_shader_get_entrypoint(shader);
|
||||
assert(impl);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue