mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Enforce PSIZE component count for sm1 VS output.
This commit is contained in:
parent
aa1ce9e295
commit
f50b20ddd6
Notes:
Henri Verbeet
2024-11-05 20:06:25 +01:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1247
@ -6519,6 +6519,11 @@ static void generate_vsir_signature_entry(struct hlsl_ctx *ctx, struct vsir_prog
|
|||||||
sysval = VKD3D_SHADER_SV_POSITION;
|
sysval = VKD3D_SHADER_SV_POSITION;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!ascii_strcasecmp(var->semantic.name, "PSIZE") && output
|
||||||
|
&& program->shader_version.type == VKD3D_SHADER_TYPE_VERTEX && var->data_type->dimx > 1)
|
||||||
|
hlsl_error(ctx, &var->loc, VKD3D_SHADER_ERROR_HLSL_INVALID_SEMANTIC,
|
||||||
|
"PSIZE output must have only 1 component in this shader model.");
|
||||||
|
|
||||||
mask = (1 << var->data_type->dimx) - 1;
|
mask = (1 << var->data_type->dimx) - 1;
|
||||||
use_mask = mask; /* FIXME: retrieve use mask accurately. */
|
use_mask = mask; /* FIXME: retrieve use mask accurately. */
|
||||||
component_type = VKD3D_SHADER_COMPONENT_FLOAT;
|
component_type = VKD3D_SHADER_COMPONENT_FLOAT;
|
||||||
|
@ -9,7 +9,7 @@ shader model < 4.0
|
|||||||
-0.5 0 20
|
-0.5 0 20
|
||||||
0.5 0 40
|
0.5 0 40
|
||||||
|
|
||||||
[vertex shader fail todo]
|
[vertex shader fail]
|
||||||
void main(inout float4 pos : position, out float2 size : psize)
|
void main(inout float4 pos : position, out float2 size : psize)
|
||||||
{
|
{
|
||||||
size = 1;
|
size = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user