vkd3d-shader/hlsl: Emit texture declarations for SRV structured buffers.

This commit is contained in:
Victor Chiletto
2025-02-27 19:04:52 -03:00
committed by Henri Verbeet
parent 2aefcf5d99
commit 9bf94ff034
Notes: Henri Verbeet 2025-09-04 14:11:02 +02:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1699
2 changed files with 4 additions and 0 deletions

View File

@@ -12889,6 +12889,9 @@ static void sm4_generate_vsir_add_dcl_texture(struct hlsl_ctx *ctx,
{ {
switch (component_type->sampler_dim) switch (component_type->sampler_dim)
{ {
case HLSL_SAMPLER_DIM_STRUCTURED_BUFFER:
opcode = VSIR_OP_DCL_RESOURCE_STRUCTURED;
break;
case HLSL_SAMPLER_DIM_RAW_BUFFER: case HLSL_SAMPLER_DIM_RAW_BUFFER:
opcode = VSIR_OP_DCL_RESOURCE_RAW; opcode = VSIR_OP_DCL_RESOURCE_RAW;
break; break;

View File

@@ -4225,6 +4225,7 @@ static void tpf_handle_instruction(struct tpf_compiler *tpf, const struct vkd3d_
case VSIR_OP_DCL: case VSIR_OP_DCL:
case VSIR_OP_DCL_RESOURCE_RAW: case VSIR_OP_DCL_RESOURCE_RAW:
case VSIR_OP_DCL_RESOURCE_STRUCTURED:
case VSIR_OP_DCL_UAV_RAW: case VSIR_OP_DCL_UAV_RAW:
case VSIR_OP_DCL_UAV_STRUCTURED: case VSIR_OP_DCL_UAV_STRUCTURED:
case VSIR_OP_DCL_UAV_TYPED: case VSIR_OP_DCL_UAV_TYPED: