Skip to content

FSR3 Upscaler: Image Format mismatch for rw_luma_history in VulkanΒ #161

@felix-ri

Description

@felix-ri

I get the following Vulkan Validation Error:

Validation Warning: [ Undefined-Value-StorageImage-FormatMismatch-ImageView ] | MessageID = 0x13365b2
vkCmdDispatch(): the storage image descriptor [VkDescriptorSet 0x5570000000557, Set 0, Binding 7, Index 0, variable "rw_luma_history"] is accessed by a OpTypeImage that has a Format operand Rgba8 (equivalent to VK_FORMAT_R8G8B8A8_UNORM) which doesn't match the VkImageView 0x3980000000398 format (VK_FORMAT_R16G16B16A16_SFLOAT). Any loads or stores with the variable will produce undefined values to the whole image (not just the texel being accessed).
Spec information at https://docs.vulkan.org/spec/latest/chapters/textures.html#textures-format-validation
Objects: 4
    [0] VkCommandBuffer 0x19709ff2cd0[Frame 1]
    [1] VkPipeline 0x5810000000581
    [2] VkDescriptorSet 0x5570000000557
    [3] VkImageView 0x3980000000398

It seems like the access declared here:

layout (set = 0, binding = FSR3UPSCALER_BIND_UAV_LUMA_HISTORY, rgba8) uniform image2D rw_luma_history;

mismatches the format of the created Images there:

{ FFX_FSR3UPSCALER_RESOURCE_IDENTIFIER_LUMA_HISTORY_1, L"FSR3UPSCALER_LumaHistory1", FFX_RESOURCE_TYPE_TEXTURE2D, (FfxResourceUsage)(FFX_RESOURCE_USAGE_RENDERTARGET | FFX_RESOURCE_USAGE_UAV),
FFX_SURFACE_FORMAT_R16G16B16A16_FLOAT, contextDescription->maxRenderSize.width, contextDescription->maxRenderSize.height, 1, FFX_RESOURCE_FLAGS_NONE, {FFX_RESOURCE_INIT_DATA_TYPE_UNINITIALIZED} },
{ FFX_FSR3UPSCALER_RESOURCE_IDENTIFIER_LUMA_HISTORY_2, L"FSR3UPSCALER_LumaHistory2", FFX_RESOURCE_TYPE_TEXTURE2D, (FfxResourceUsage)(FFX_RESOURCE_USAGE_RENDERTARGET | FFX_RESOURCE_USAGE_UAV),
FFX_SURFACE_FORMAT_R16G16B16A16_FLOAT, contextDescription->maxRenderSize.width, contextDescription->maxRenderSize.height, 1, FFX_RESOURCE_FLAGS_NONE, {FFX_RESOURCE_INIT_DATA_TYPE_UNINITIALIZED} },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions