mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Return a uint1 from GetRenderTargetSampleCount().
This commit is contained in:
committed by
Henri Verbeet
parent
4cdea712d0
commit
4a5411aa6e
Notes:
Henri Verbeet
2025-05-12 15:43:59 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1487
@@ -4932,7 +4932,7 @@ static bool intrinsic_GetRenderTargetSampleCount(struct hlsl_ctx *ctx,
|
|||||||
"GetRenderTargetSampleCount() can only be used from a pixel shader using version 4.1 or higher.");
|
"GetRenderTargetSampleCount() can only be used from a pixel shader using version 4.1 or higher.");
|
||||||
|
|
||||||
hlsl_block_add_expr(ctx, params->instrs, HLSL_OP0_RASTERIZER_SAMPLE_COUNT,
|
hlsl_block_add_expr(ctx, params->instrs, HLSL_OP0_RASTERIZER_SAMPLE_COUNT,
|
||||||
operands, hlsl_get_scalar_type(ctx, HLSL_TYPE_UINT), loc);
|
operands, hlsl_get_vector_type(ctx, HLSL_TYPE_UINT, 1), loc);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@ probe (0, 0) rgba (4.0, 0.0, 0.0, 0.0)
|
|||||||
|
|
||||||
% Curiously GetRenderTargetSampleCount() returns a uint1, not a uint.
|
% Curiously GetRenderTargetSampleCount() returns a uint1, not a uint.
|
||||||
% In sm6 it is altered to return a uint.
|
% In sm6 it is altered to return a uint.
|
||||||
[pixel shader fail(sm>=6) todo]
|
[pixel shader fail(sm>=6)]
|
||||||
float4 main() : sv_target
|
float4 main() : sv_target
|
||||||
{
|
{
|
||||||
return GetRenderTargetSampleCount()[0];
|
return GetRenderTargetSampleCount()[0];
|
||||||
|
Reference in New Issue
Block a user