mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 03:50:13 +01:00
ac: split 16-bit ssbo loads that may not be dword aligned
Fixes: 7e7ee82698 ('ac: add support for 16bit buffer loads')
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108114
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
This commit is contained in:
parent
12dc7cb202
commit
bde9f482de
1 changed files with 2 additions and 0 deletions
|
|
@ -1640,6 +1640,8 @@ static LLVMValueRef visit_load_buffer(struct ac_nir_context *ctx,
|
|||
LLVMValueRef results[4];
|
||||
for (int i = 0; i < num_components;) {
|
||||
int num_elems = num_components - i;
|
||||
if (elem_size_bytes < 4 && nir_intrinsic_align(instr) % 4 != 0)
|
||||
num_elems = 1;
|
||||
if (num_elems * elem_size_bytes > 16)
|
||||
num_elems = 16 / elem_size_bytes;
|
||||
int load_bytes = num_elems * elem_size_bytes;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue