mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/spirv: Support precise flags on SAMPLE_INFO instructions.
This commit is contained in:
committed by
Henri Verbeet
parent
53754f0583
commit
52b9ef0426
Notes:
Henri Verbeet
2025-07-29 13:34:53 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1654
@@ -10022,9 +10022,9 @@ static void spirv_compiler_emit_sample_info(struct spirv_compiler *compiler,
|
||||
uint32_t type_id, val_id;
|
||||
unsigned int i;
|
||||
|
||||
if (instruction->flags & ~VKD3DSI_SAMPLE_INFO_UINT)
|
||||
spirv_compiler_error(compiler, VKD3D_SHADER_ERROR_SPV_NOT_IMPLEMENTED,
|
||||
"Unhandled sample info flags %#x.\n", instruction->flags & ~VKD3DSI_SAMPLE_INFO_UINT);
|
||||
if (instruction->flags & ~(VKD3DSI_SAMPLE_INFO_UINT | VKD3DSI_PRECISE_XYZW))
|
||||
spirv_compiler_error(compiler, VKD3D_SHADER_ERROR_SPV_NOT_IMPLEMENTED, "Unhandled sample info flags %#x.\n",
|
||||
instruction->flags & ~(VKD3DSI_SAMPLE_INFO_UINT | VKD3DSI_PRECISE_XYZW));
|
||||
|
||||
val_id = spirv_compiler_emit_query_sample_count(compiler, src);
|
||||
|
||||
@@ -10039,6 +10039,8 @@ static void spirv_compiler_emit_sample_info(struct spirv_compiler *compiler,
|
||||
component_type = VKD3D_SHADER_COMPONENT_FLOAT;
|
||||
type_id = vkd3d_spirv_get_type_id(builder, component_type, VKD3D_VEC4_SIZE);
|
||||
val_id = vkd3d_spirv_build_op_convert_utof(builder, type_id, val_id);
|
||||
if (instruction->flags & VKD3DSI_PRECISE_XYZW)
|
||||
vkd3d_spirv_build_op_decorate(builder, val_id, SpvDecorationNoContraction, NULL, 0);
|
||||
}
|
||||
val_id = spirv_compiler_emit_swizzle(compiler, val_id, VKD3DSP_WRITEMASK_ALL,
|
||||
component_type, src->swizzle, dst->write_mask);
|
||||
|
Reference in New Issue
Block a user