nir/lower_ubo_vec4: Fix align_mul=8 special case
In order for the load to never straddle the load can't extend past 8 bytes, not 16. For example a vec2 load with align_mul = 8 and align_offset = 4 can straddle. Fixes assertion failures when we stop pushing UBOs in the preamble on a6xx. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13142>
This commit is contained in:
@@ -134,7 +134,7 @@ nir_lower_ubo_vec4_lower(nir_builder *b, nir_instr *instr, void *data)
|
|||||||
|
|
||||||
result = nir_vector_extract(b, result, component);
|
result = nir_vector_extract(b, result, component);
|
||||||
} else if (align_mul == 8 &&
|
} else if (align_mul == 8 &&
|
||||||
align_offset + chan_size_bytes * intr->num_components <= 16) {
|
align_offset + chan_size_bytes * intr->num_components <= 8) {
|
||||||
/* Special case: Loading small vectors from offset % 8 == 0 can be done
|
/* Special case: Loading small vectors from offset % 8 == 0 can be done
|
||||||
* with just one load and one bcsel.
|
* with just one load and one bcsel.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user