vkd3d-shader/hlsl: Add support for SampleGrad() method.

Signed-off-by: Ethan Lee <flibitijibibo@gmail.com>
This commit is contained in:
Ethan Lee
2023-05-05 11:13:18 -04:00
committed by Alexandre Julliard
parent c3f10fe271
commit 24d4ab7fb3
Notes: Alexandre Julliard 2023-05-23 23:13:12 +02:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/184
6 changed files with 114 additions and 10 deletions

View File

@@ -616,6 +616,7 @@ enum hlsl_resource_load_type
HLSL_RESOURCE_SAMPLE,
HLSL_RESOURCE_SAMPLE_LOD,
HLSL_RESOURCE_SAMPLE_LOD_BIAS,
HLSL_RESOURCE_SAMPLE_GRAD,
HLSL_RESOURCE_GATHER_RED,
HLSL_RESOURCE_GATHER_GREEN,
HLSL_RESOURCE_GATHER_BLUE,
@@ -627,7 +628,7 @@ struct hlsl_ir_resource_load
struct hlsl_ir_node node;
enum hlsl_resource_load_type load_type;
struct hlsl_deref resource, sampler;
struct hlsl_src coords, lod, sample_index, texel_offset;
struct hlsl_src coords, lod, ddx, ddy, sample_index, texel_offset;
enum hlsl_sampler_dim sampling_dim;
};
@@ -829,7 +830,7 @@ struct hlsl_resource_load_params
struct hlsl_type *format;
enum hlsl_resource_load_type type;
struct hlsl_ir_node *resource, *sampler;
struct hlsl_ir_node *coords, *lod, *sample_index, *texel_offset;
struct hlsl_ir_node *coords, *lod, *ddx, *ddy, *sample_index, *texel_offset;
enum hlsl_sampler_dim sampling_dim;
};