mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-04 20:57:25 +00:00
wined3d: Do not check the input signature element count for sm4+ shaders in shader_spirv_compile_arguments_init().
Shader model 4 fragment shaders can have more than 12 input varyings. That's fine though, because we don't need to build a varying map for them in the first place. Note that in principle the ERR in question could still be triggered by e.g. attempting to use a shader model 4 fragment shader with a shader model 3 vertex shader.
This commit is contained in:
parent
d6ac41a9f4
commit
47be32f3d1
|
@ -169,14 +169,13 @@ static void shader_spirv_compile_arguments_init(struct shader_spirv_compile_argu
|
|||
{
|
||||
struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL];
|
||||
|
||||
if (ps)
|
||||
if (shader->reg_maps.shader_version.major < 4 && ps)
|
||||
{
|
||||
struct shader_spirv_graphics_program_vk *vs_program = shader->backend_data;
|
||||
struct shader_spirv_graphics_program_vk *ps_program = ps->backend_data;
|
||||
|
||||
if (ps_program->signature_info.input.element_count > ARRAY_SIZE(args->u.vs.varying_map))
|
||||
ERR("Unexpected inter-stage varying count %u.\n", ps_program->signature_info.input.element_count);
|
||||
if (shader->reg_maps.shader_version.major < 4)
|
||||
vkd3d_shader_build_varying_map(&vs_program->signature_info.output,
|
||||
&ps_program->signature_info.input, &args->u.vs.varying_count, args->u.vs.varying_map);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue