wined3d: Refuse pixel shaders declaring POSITION0 inputs.

This commit is contained in:
Matteo Bruni 2015-02-06 15:25:34 +01:00 committed by Alexandre Julliard
parent 74b4516bfa
commit 1612dc4dc9
1 changed files with 3 additions and 0 deletions

View File

@ -690,6 +690,9 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
ERR("Invalid input register index %u.\n", reg_idx);
break;
}
if (shader_version.type == WINED3D_SHADER_TYPE_PIXEL && shader_version.major == 3
&& semantic->usage == WINED3D_DECL_USAGE_POSITION && !semantic->usage_idx)
return WINED3DERR_INVALIDCALL;
reg_maps->input_registers |= 1 << reg_idx;
shader_signature_from_semantic(&input_signature[reg_idx], semantic);
break;