summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_meta_blit2d.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2018-08-11 23:26:26 +0200
committerBas Nieuwenhuizen <[email protected]>2018-08-14 10:26:06 +0200
commit806a792b438815ec6ae15cdb0e6fedcaf7db2dd0 (patch)
tree00f32d48c1c82a8211e4256a8408707d31de2a83 /src/amd/vulkan/radv_meta_blit2d.c
parent0be5e9f5a1a7333c252d8b7c1da7b4ec0c4d21cf (diff)
radv: Make fs key exemplars ordered to be a reverse fs_key lookup.
While at it, share the exemplars and account for a non-occurring fs key. Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_meta_blit2d.c')
-rw-r--r--src/amd/vulkan/radv_meta_blit2d.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/amd/vulkan/radv_meta_blit2d.c b/src/amd/vulkan/radv_meta_blit2d.c
index cac0a4dd55f..79652856942 100644
--- a/src/amd/vulkan/radv_meta_blit2d.c
+++ b/src/amd/vulkan/radv_meta_blit2d.c
@@ -1239,21 +1239,6 @@ blit2d_init_stencil_only_pipeline(struct radv_device *device,
return result;
}
-static VkFormat pipeline_formats[] = {
- VK_FORMAT_R8G8B8A8_UNORM,
- VK_FORMAT_R8G8B8A8_UINT,
- VK_FORMAT_R8G8B8A8_SINT,
- VK_FORMAT_A2R10G10B10_UINT_PACK32,
- VK_FORMAT_A2R10G10B10_SINT_PACK32,
- VK_FORMAT_R16G16B16A16_UNORM,
- VK_FORMAT_R16G16B16A16_SNORM,
- VK_FORMAT_R16G16B16A16_UINT,
- VK_FORMAT_R16G16B16A16_SINT,
- VK_FORMAT_R32_SFLOAT,
- VK_FORMAT_R32G32_SFLOAT,
- VK_FORMAT_R32G32B32A32_SFLOAT
-};
-
static VkResult
meta_blit2d_create_pipe_layout(struct radv_device *device,
int idx,
@@ -1320,8 +1305,8 @@ radv_device_init_meta_blit2d_state(struct radv_device *device)
if (result != VK_SUCCESS)
goto fail;
- for (unsigned j = 0; j < ARRAY_SIZE(pipeline_formats); ++j) {
- result = blit2d_init_color_pipeline(device, src, pipeline_formats[j], log2_samples);
+ for (unsigned j = 0; j < NUM_META_FS_KEYS; ++j) {
+ result = blit2d_init_color_pipeline(device, src, radv_fs_key_format_exemplars[j], log2_samples);
if (result != VK_SUCCESS)
goto fail;
}