mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 05:10:17 +01:00
aco/isel: Simplify nested branching code
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Reviewed-by: Timur Kristóf <timur.kristof@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6504>
This commit is contained in:
parent
757de68a43
commit
dab0af0616
1 changed files with 7 additions and 4 deletions
|
|
@ -2978,12 +2978,15 @@ void emit_load(isel_context *ctx, Builder &bld, const LoadEmitInfo *info,
|
|||
unsigned bytes_needed = load_size - bytes_read;
|
||||
|
||||
/* add buffer for unaligned loads */
|
||||
int byte_align = align_mul % 4 == 0 ? align_offset % 4 : -1;
|
||||
int byte_align = 0;
|
||||
if (params.byte_align_loads) {
|
||||
byte_align = align_mul % 4 == 0 ? align_offset % 4 : -1;
|
||||
}
|
||||
|
||||
if (byte_align) {
|
||||
if (params.byte_align_loads && (bytes_needed > 2 ||
|
||||
(bytes_needed == 2 && (align_mul % 2 || align_offset % 2)) ||
|
||||
!params.supports_8bit_16bit_loads)) {
|
||||
if (bytes_needed > 2 ||
|
||||
(bytes_needed == 2 && (align_mul % 2 || align_offset % 2)) ||
|
||||
!params.supports_8bit_16bit_loads) {
|
||||
if (info->component_stride) {
|
||||
assert(params.supports_8bit_16bit_loads && "unimplemented");
|
||||
bytes_needed = 2;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue