Module: Mesa Branch: main Commit: 672b2f9ad18d660e6bea95a489da6aa440e4c41f URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=672b2f9ad18d660e6bea95a489da6aa440e4c41f
Author: Lionel Landwerlin <[email protected]> Date: Fri Dec 16 13:07:28 2022 +0200 anv: remove more Gfx7 code Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Ivan Briano <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21599> --- src/intel/vulkan/anv_device.c | 37 +++++++++++-------------------------- src/intel/vulkan/anv_private.h | 19 ------------------- 2 files changed, 11 insertions(+), 45 deletions(-) diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 599b52908b7..bcbb409259f 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -3001,33 +3001,18 @@ anv_state_pool_emit_data(struct anv_state_pool *pool, size_t size, size_t align, static void anv_device_init_border_colors(struct anv_device *device) { - if (device->info->platform == INTEL_PLATFORM_HSW) { - static const struct hsw_border_color border_colors[] = { - [VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK] = { .float32 = { 0.0, 0.0, 0.0, 0.0 } }, - [VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK] = { .float32 = { 0.0, 0.0, 0.0, 1.0 } }, - [VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE] = { .float32 = { 1.0, 1.0, 1.0, 1.0 } }, - [VK_BORDER_COLOR_INT_TRANSPARENT_BLACK] = { .uint32 = { 0, 0, 0, 0 } }, - [VK_BORDER_COLOR_INT_OPAQUE_BLACK] = { .uint32 = { 0, 0, 0, 1 } }, - [VK_BORDER_COLOR_INT_OPAQUE_WHITE] = { .uint32 = { 1, 1, 1, 1 } }, - }; - - device->border_colors = - anv_state_pool_emit_data(&device->dynamic_state_pool, - sizeof(border_colors), 512, border_colors); - } else { - static const struct gfx8_border_color border_colors[] = { - [VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK] = { .float32 = { 0.0, 0.0, 0.0, 0.0 } }, - [VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK] = { .float32 = { 0.0, 0.0, 0.0, 1.0 } }, - [VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE] = { .float32 = { 1.0, 1.0, 1.0, 1.0 } }, - [VK_BORDER_COLOR_INT_TRANSPARENT_BLACK] = { .uint32 = { 0, 0, 0, 0 } }, - [VK_BORDER_COLOR_INT_OPAQUE_BLACK] = { .uint32 = { 0, 0, 0, 1 } }, - [VK_BORDER_COLOR_INT_OPAQUE_WHITE] = { .uint32 = { 1, 1, 1, 1 } }, - }; + static const struct gfx8_border_color border_colors[] = { + [VK_BORDER_COLOR_FLOAT_TRANSPARENT_BLACK] = { .float32 = { 0.0, 0.0, 0.0, 0.0 } }, + [VK_BORDER_COLOR_FLOAT_OPAQUE_BLACK] = { .float32 = { 0.0, 0.0, 0.0, 1.0 } }, + [VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE] = { .float32 = { 1.0, 1.0, 1.0, 1.0 } }, + [VK_BORDER_COLOR_INT_TRANSPARENT_BLACK] = { .uint32 = { 0, 0, 0, 0 } }, + [VK_BORDER_COLOR_INT_OPAQUE_BLACK] = { .uint32 = { 0, 0, 0, 1 } }, + [VK_BORDER_COLOR_INT_OPAQUE_WHITE] = { .uint32 = { 1, 1, 1, 1 } }, + }; - device->border_colors = - anv_state_pool_emit_data(&device->dynamic_state_pool, - sizeof(border_colors), 64, border_colors); - } + device->border_colors = + anv_state_pool_emit_data(&device->dynamic_state_pool, + sizeof(border_colors), 64, border_colors); } static VkResult diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index e1c885ad180..7f935cc8b9e 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -4060,25 +4060,6 @@ void anv_fill_buffer_surface_state(struct anv_device *device, uint32_t range, uint32_t stride); -/* Haswell border color is a bit of a disaster. Float and unorm formats use a - * straightforward 32-bit float color in the first 64 bytes. Instead of using - * a nice float/integer union like Gfx8+, Haswell specifies the integer border - * color as a separate entry /after/ the float color. The layout of this entry - * also depends on the format's bpp (with extra hacks for RG32), and overlaps. - * - * Since we don't know the format/bpp, we can't make any of the border colors - * containing '1' work for all formats, as it would be in the wrong place for - * some of them. We opt to make 32-bit integers work as this seems like the - * most common option. Fortunately, transparent black works regardless, as - * all zeroes is the same in every bit-size. - */ -struct hsw_border_color { - float float32[4]; - uint32_t _pad0[12]; - uint32_t uint32[4]; - uint32_t _pad1[108]; -}; - struct gfx8_border_color { union { float float32[4];
