mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Handle HLSL_RESOURCE_SAMPLE_LOD in sm1_generate_vsir_instr_resource_load().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58063
This commit is contained in:
committed by
Henri Verbeet
parent
969b6f5946
commit
83e54bdc0c
Notes:
Henri Verbeet
2025-07-23 17:30:15 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1637
@@ -2018,6 +2018,7 @@ static void d3dbc_write_vsir_instruction(struct d3dbc_compiler *d3dbc, const str
|
||||
case VSIR_OP_SINCOS:
|
||||
case VSIR_OP_SLT:
|
||||
case VSIR_OP_TEXLD:
|
||||
case VSIR_OP_TEXLDL:
|
||||
case VSIR_OP_TEXLDD:
|
||||
d3dbc_write_instruction(d3dbc, ins);
|
||||
break;
|
||||
|
@@ -9403,6 +9403,10 @@ static void sm1_generate_vsir_instr_resource_load(struct hlsl_ctx *ctx,
|
||||
flags |= VKD3DSI_TEXLD_PROJECT;
|
||||
break;
|
||||
|
||||
case HLSL_RESOURCE_SAMPLE_LOD:
|
||||
opcode = VSIR_OP_TEXLDL;
|
||||
break;
|
||||
|
||||
case HLSL_RESOURCE_SAMPLE_LOD_BIAS:
|
||||
opcode = VSIR_OP_TEXLD;
|
||||
flags |= VKD3DSI_TEXLD_BIAS;
|
||||
|
@@ -14,7 +14,7 @@ levels 2
|
||||
|
||||
0.0 0.0 1.0 0.0
|
||||
|
||||
[pixel shader todo(sm<4)]
|
||||
[pixel shader]
|
||||
sampler s;
|
||||
Texture2D t;
|
||||
uniform float level;
|
||||
@@ -26,20 +26,20 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 0.0 0.0 0.0 0.0
|
||||
todo(sm<4) draw quad
|
||||
draw quad
|
||||
probe (0, 0) rgba (1.0, 0.0, 1.0, 0.0)
|
||||
uniform 0 float4 0.5 0.0 0.0 0.0
|
||||
todo(sm<4) draw quad
|
||||
draw quad
|
||||
probe (0, 0) rgba (0.5, 0.0, 1.0, 0.0)
|
||||
uniform 0 float4 1.0 0.0 0.0 0.0
|
||||
todo(sm<4) draw quad
|
||||
draw quad
|
||||
probe (0, 0) rgba (0.0, 0.0, 1.0, 0.0)
|
||||
|
||||
[require]
|
||||
shader model >= 3.0
|
||||
options: backcompat
|
||||
|
||||
[pixel shader fail(sm>=5.1) todo(sm<4 | sm>=5.1)]
|
||||
[pixel shader fail(sm>=5.1) todo(sm>=5.1)]
|
||||
sampler s;
|
||||
float level;
|
||||
|
||||
@@ -50,11 +50,11 @@ float4 main() : sv_target
|
||||
|
||||
[test]
|
||||
uniform 0 float4 0.0 0.0 0.0 0.0
|
||||
todo(sm<4) draw quad
|
||||
draw quad
|
||||
probe (0, 0) rgba (1.0, 0.0, 1.0, 0.0)
|
||||
uniform 0 float4 0.5 0.0 0.0 0.0
|
||||
todo(sm<4) draw quad
|
||||
draw quad
|
||||
probe (0, 0) rgba (0.5, 0.0, 1.0, 0.0)
|
||||
uniform 0 float4 1.0 0.0 0.0 0.0
|
||||
todo(sm<4) draw quad
|
||||
draw quad
|
||||
probe (0, 0) rgba (0.0, 0.0, 1.0, 0.0)
|
||||
|
Reference in New Issue
Block a user