From 1612dc4dc971324e73d8d6e8b6bf2e223580b13a Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Fri, 6 Feb 2015 15:25:34 +0100 Subject: [PATCH] wined3d: Refuse pixel shaders declaring POSITION0 inputs. --- dlls/wined3d/shader.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c index e1164dbea1a..766e91f96ff 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -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;