summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_formats.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-02-15 02:26:57 +0000
committerDave Airlie <[email protected]>2017-02-16 14:09:15 +1000
commitb292e662fc02eb999936709333c875b53b23223c (patch)
tree1da9e7bbe3e7a1aa4440a2e86435041f5499aaaf /src/amd/vulkan/radv_formats.c
parente6506b3cd2382a9a7e0a3494a964d2bafb3bebc3 (diff)
radv: add fast color clear for b10g11r11
This is used in DOOM, so provide the fast clear path for it. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_formats.c')
-rw-r--r--src/amd/vulkan/radv_formats.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_formats.c b/src/amd/vulkan/radv_formats.c
index 1188ee57b99..79025352f3a 100644
--- a/src/amd/vulkan/radv_formats.c
+++ b/src/amd/vulkan/radv_formats.c
@@ -30,6 +30,7 @@
#include "util/u_half.h"
#include "util/format_srgb.h"
+#include "util/format_r11g11b10f.h"
uint32_t radv_translate_buffer_dataformat(const struct vk_format_description *desc,
int first_non_void)
@@ -954,6 +955,10 @@ bool radv_format_pack_clear_color(VkFormat format,
clear_vals[1] = 0;
clear_vals[0] = fui(value->float32[0]);
break;
+ case VK_FORMAT_B10G11R11_UFLOAT_PACK32:
+ clear_vals[0] = float3_to_r11g11b10f(value->float32);
+ clear_vals[1] = 0;
+ break;
default:
fprintf(stderr, "failed to fast clear %d\n", format);
return false;