mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08:00
vkd3d-shader/hlsl: Use the semantic.resource_type field for texture DCL instructions.
ins->resource_type is intended for VKD3D_SM5_MODIFIER_RESOURCE_TYPE, which is not used for DCL instructions. At the same time, the validator checks semantic.resource_type, and would break on HLSL shaders.
This commit is contained in:
committed by
Henri Verbeet
parent
e524c36916
commit
62b7c5b5e6
Notes:
Henri Verbeet
2025-10-06 19:48:04 +02:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1718
@@ -12928,8 +12928,6 @@ static void sm4_generate_vsir_add_dcl_texture(struct hlsl_ctx *ctx,
|
||||
vsir_resource->reg.reg.idx[2].offset = array_last;
|
||||
vsir_resource->reg.reg.idx_count = 3;
|
||||
|
||||
ins->resource_type = sm4_generate_vsir_get_resource_type(resource->component_type);
|
||||
|
||||
if (component_type->sampler_dim == HLSL_SAMPLER_DIM_RAW_BUFFER)
|
||||
{
|
||||
ins->raw = true;
|
||||
@@ -12942,6 +12940,8 @@ static void sm4_generate_vsir_add_dcl_texture(struct hlsl_ctx *ctx,
|
||||
}
|
||||
else
|
||||
{
|
||||
ins->declaration.semantic.resource_type = sm4_generate_vsir_get_resource_type(resource->component_type);
|
||||
|
||||
for (unsigned int j = 0; j < 4; ++j)
|
||||
ins->declaration.semantic.resource_data_type[j] = sm4_generate_vsir_get_format_type(component_type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user