diff options
author | Rafael Antognolli <[email protected]> | 2018-01-18 14:12:08 -0800 |
---|---|---|
committer | Rafael Antognolli <[email protected]> | 2018-04-05 07:42:45 -0700 |
commit | f421a3163751f482818958d8745701ec3174ff83 (patch) | |
tree | 5b6c2660c76eef6c88e3a69c1c28c3c19136b266 /src/intel | |
parent | 942fdfe35725c95728bb6a854d9191125c2002b8 (diff) |
anv/image: Do not override lower bits of dword.
The lower bits seem to have extra fields in every platform but gen8
(even though we don't use them in gen9). So just go ahead and avoid
using them for the address.
v4: Use Jason's suggestion for comment explaining the change.
v5: Fix aux_address comment in anv_private.h (Jason)
Signed-off-by: Rafael Antognolli <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Topi Pohjolainen <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_image.c | 23 | ||||
-rw-r--r-- | src/intel/vulkan/anv_private.h | 4 |
2 files changed, 12 insertions, 15 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index 4d60f872c1e..b20d791751d 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -1149,19 +1149,16 @@ anv_image_fill_surface_state(struct anv_device *device, .x_offset_sa = tile_x_sa, .y_offset_sa = tile_y_sa); state_inout->address = address + offset_B; - if (device->info.gen >= 8) { - state_inout->aux_address = aux_address; - } else { - /* On gen7 and prior, the bottom 12 bits of the MCS base address are - * used to store other information. This should be ok, however, - * because surface buffer addresses are always 4K page alinged. - */ - uint32_t *aux_addr_dw = state_inout->state.map + - device->isl_dev.ss.aux_addr_offset; - assert((aux_address & 0xfff) == 0); - assert(aux_address == (*aux_addr_dw & 0xfffff000)); - state_inout->aux_address = *aux_addr_dw; - } + + /* With the exception of gen8, the bottom 12 bits of the MCS base address + * are used to store other information. This should be ok, however, + * because the surface buffer addresses are always 4K page aligned. + */ + uint32_t *aux_addr_dw = state_inout->state.map + + device->isl_dev.ss.aux_addr_offset; + assert((aux_address & 0xfff) == 0); + assert(aux_address == (*aux_addr_dw & 0xfffff000)); + state_inout->aux_address = *aux_addr_dw; } anv_state_flush(device, state_inout->state); diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index 0e209e1769f..3b08939f6cc 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -1700,8 +1700,8 @@ struct anv_surface_state { * * This field is 0 if and only if no aux surface exists. * - * This address is relative to the start of the BO. On gen7, the bottom 12 - * bits of this address include extra aux information. + * This address is relative to the start of the BO. With the exception of + * gen8, the bottom 12 bits of this address include extra aux information. */ uint64_t aux_address; }; |