mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/spirv: Use spirv_get_type_id() in spirv_compiler_emit_sample_info().
This commit is contained in:
Notes:
Henri Verbeet
2025-09-29 13:05:42 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1754
@@ -10064,14 +10064,16 @@ static void spirv_compiler_emit_sample_info(struct spirv_compiler *compiler,
|
||||
|
||||
constituents[0] = val_id;
|
||||
for (i = 1; i < VKD3D_VEC4_SIZE; ++i)
|
||||
{
|
||||
constituents[i] = spirv_compiler_get_constant_uint(compiler, 0);
|
||||
type_id = spirv_get_type_id_for_component_type(builder, VKD3D_SHADER_COMPONENT_UINT, VKD3D_VEC4_SIZE);
|
||||
}
|
||||
type_id = spirv_get_type_id(builder, VSIR_DATA_U32, VKD3D_VEC4_SIZE);
|
||||
val_id = vkd3d_spirv_build_op_composite_construct(builder, type_id, constituents, VKD3D_VEC4_SIZE);
|
||||
|
||||
if (!(instruction->flags & VKD3DSI_SAMPLE_INFO_UINT))
|
||||
{
|
||||
component_type = VKD3D_SHADER_COMPONENT_FLOAT;
|
||||
type_id = spirv_get_type_id_for_component_type(builder, component_type, VKD3D_VEC4_SIZE);
|
||||
type_id = spirv_get_type_id(builder, VSIR_DATA_F32, 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);
|
||||
|
||||
Reference in New Issue
Block a user