diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index dc292014..069c9c9e 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -2881,6 +2881,7 @@ static bool lower_separate_samples(struct hlsl_ctx *ctx, struct hlsl_ir_node *in load = hlsl_ir_resource_load(instr); if (load->load_type != HLSL_RESOURCE_SAMPLE + && load->load_type != HLSL_RESOURCE_SAMPLE_GRAD && load->load_type != HLSL_RESOURCE_SAMPLE_LOD && load->load_type != HLSL_RESOURCE_SAMPLE_LOD_BIAS) return false; @@ -6977,7 +6978,8 @@ static void sm1_generate_vsir_sampler_dcls(struct hlsl_ctx *ctx, break; case HLSL_SAMPLER_DIM_GENERIC: - /* These can appear in sm4-style combined sample instructions. */ + /* These can appear in sm4-style separate sample + * instructions that haven't been lowered. */ hlsl_fixme(ctx, &var->loc, "Generic samplers need to be lowered."); continue; diff --git a/tests/hlsl/sample-grad.shader_test b/tests/hlsl/sample-grad.shader_test index 0e873326..49e003f8 100644 --- a/tests/hlsl/sample-grad.shader_test +++ b/tests/hlsl/sample-grad.shader_test @@ -58,7 +58,7 @@ probe (0,0) rgba (0.0, 0.0, 1.0, 0.0) [require] shader model >= 3.0 -[pixel shader todo(sm<4)] +[pixel shader] sampler s; Texture2D t; uniform float4 grad; @@ -70,11 +70,11 @@ float4 main() : sv_target [test] uniform 0 float4 0.0 0.0 0.0 0.0 -todo(msl | sm<4) draw quad +todo(msl) draw quad probe (0, 0) rgba (1.0, 0.0, 1.0, 0.0) uniform 0 float4 1.0 1.0 1.0 1.0 -todo(msl | sm<4) draw quad +todo(msl) draw quad probe (0, 0) rgba (0.0, 0.0, 1.0, 0.0) uniform 0 float4 2.0 2.0 2.0 2.0 -todo(msl | sm<4) draw quad +todo(msl) draw quad probe (0, 0) rgba (0.0, 0.0, 1.0, 0.0)