From 944665ed11650a72e36b40a2da0cd400cf76b375 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Fri, 19 Feb 2021 15:57:09 +0100 Subject: [PATCH] vkd3d-shader: Do not print FIXMEs for VKD3DSUF_ORDER_PRESERVING_COUNTER when generating SPIR-V. Signed-off-by: Henri Verbeet Signed-off-by: Alexandre Julliard --- libs/vkd3d-shader/spirv.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index b0b23991..1448d3b4 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -5644,9 +5644,12 @@ static void vkd3d_dxbc_compiler_emit_dcl_resource(struct vkd3d_dxbc_compiler *co const struct vkd3d_shader_instruction *instruction) { const struct vkd3d_shader_semantic *semantic = &instruction->declaration.semantic; + uint32_t flags = instruction->flags; - if (instruction->flags) - FIXME("Unhandled UAV flags %#x.\n", instruction->flags); + /* We don't distinguish between APPEND and COUNTER UAVs. */ + flags &= ~VKD3DSUF_ORDER_PRESERVING_COUNTER; + if (flags) + FIXME("Unhandled UAV flags %#x.\n", flags); vkd3d_dxbc_compiler_emit_resource_declaration(compiler, &semantic->resource, semantic->resource_type, semantic->resource_data_type[0], 0, false); @@ -5656,9 +5659,12 @@ static void vkd3d_dxbc_compiler_emit_dcl_resource_raw(struct vkd3d_dxbc_compiler const struct vkd3d_shader_instruction *instruction) { const struct vkd3d_shader_raw_resource *resource = &instruction->declaration.raw_resource; + uint32_t flags = instruction->flags; - if (instruction->flags) - FIXME("Unhandled UAV flags %#x.\n", instruction->flags); + /* We don't distinguish between APPEND and COUNTER UAVs. */ + flags &= ~VKD3DSUF_ORDER_PRESERVING_COUNTER; + if (flags) + FIXME("Unhandled UAV flags %#x.\n", flags); vkd3d_dxbc_compiler_emit_resource_declaration(compiler, &resource->resource, VKD3D_SHADER_RESOURCE_BUFFER, VKD3D_DATA_UINT, 0, true); @@ -5669,9 +5675,12 @@ static void vkd3d_dxbc_compiler_emit_dcl_resource_structured(struct vkd3d_dxbc_c { const struct vkd3d_shader_structured_resource *resource = &instruction->declaration.structured_resource; unsigned int stride = resource->byte_stride; + uint32_t flags = instruction->flags; - if (instruction->flags) - FIXME("Unhandled UAV flags %#x.\n", instruction->flags); + /* We don't distinguish between APPEND and COUNTER UAVs. */ + flags &= ~VKD3DSUF_ORDER_PRESERVING_COUNTER; + if (flags) + FIXME("Unhandled UAV flags %#x.\n", flags); vkd3d_dxbc_compiler_emit_resource_declaration(compiler, &resource->resource, VKD3D_SHADER_RESOURCE_BUFFER, VKD3D_DATA_UINT, stride / 4, false);