Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions runtime/src/vulkan_replay.h
Original file line number Diff line number Diff line change
Expand Up @@ -1618,6 +1618,7 @@ inline VkClearColorValue render_target_clear_color(VkFormat format, const ClearC
is_integer = false;
unorm = {0, 0, 0, 255};
break;
case VK_FORMAT_R5G6B5_UNORM_PACK16: is_integer = false; unorm = {31, 63, 31, 0}; break;
case VK_FORMAT_A2B10G10R10_UNORM_PACK32: is_integer = false; unorm = {1023, 1023, 1023, 3}; break;
case VK_FORMAT_R16_UNORM:
case VK_FORMAT_R16G16_UNORM:
Expand Down
2 changes: 2 additions & 0 deletions runtime/test/clear_color_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ int main() {
std::array<double, 4> maximum;
};
const Norm norms[] = {
{VK_FORMAT_R5G6B5_UNORM_PACK16, {0.5f, 0.5f, 0.5f, 1}, {16, 32, 16, 0}, {31, 63, 31, 0}},
{VK_FORMAT_R5G6B5_UNORM_PACK16, {nan, -1, 2, 1}, {0, 0, 31, 0}, {31, 63, 31, 0}},
{VK_FORMAT_R8G8B8A8_UNORM, {0.5f, 0.499f, 0.501f, 1.0f}, {128, 127, 128, 255}, {255, 255, 255, 255}},
{VK_FORMAT_B8G8R8A8_UNORM, {-1, 2, nan, 0.5f}, {0, 255, 0, 128}, {255, 255, 255, 255}},
{VK_FORMAT_R8G8_UNORM, {0.5f, 1.5f, 0, 0}, {128, 255, 0, 0}, {255, 255, 255, 255}},
Expand Down