Commit f9fafb36 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Use the "sysval_semantic" field instead of "semantic_name" to recognize SV_POSITION.

parent 1b08196c
...@@ -4167,7 +4167,7 @@ static void shader_glsl_input_pack(const struct wined3d_shader *shader, struct w ...@@ -4167,7 +4167,7 @@ static void shader_glsl_input_pack(const struct wined3d_shader *shader, struct w
if (vertexprocessing == vertexshader) if (vertexprocessing == vertexshader)
{ {
if (!strcmp(semantic_name, "SV_POSITION") && !semantic_idx) if (input->sysval_semantic == WINED3D_SV_POSITION)
shader_addline(buffer, "ps_in[%u]%s = vpos%s;\n", shader_addline(buffer, "ps_in[%u]%s = vpos%s;\n",
shader->u.ps.input_reg_map[input->register_idx], reg_mask, reg_mask); shader->u.ps.input_reg_map[input->register_idx], reg_mask, reg_mask);
else else
......
...@@ -1045,7 +1045,7 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st ...@@ -1045,7 +1045,7 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st
{ {
reg_maps->input_registers |= 1 << input_signature->elements[i].register_idx; reg_maps->input_registers |= 1 << input_signature->elements[i].register_idx;
if (shader_version.type == WINED3D_SHADER_TYPE_PIXEL if (shader_version.type == WINED3D_SHADER_TYPE_PIXEL
&& !strcmp(input_signature->elements[i].semantic_name, "SV_POSITION")) && input_signature->elements[i].sysval_semantic == WINED3D_SV_POSITION)
reg_maps->vpos = 1; reg_maps->vpos = 1;
} }
} }
......
...@@ -767,6 +767,8 @@ enum wined3d_decl_usage ...@@ -767,6 +767,8 @@ enum wined3d_decl_usage
enum wined3d_sysval_semantic enum wined3d_sysval_semantic
{ {
WINED3D_SV_POSITION = 1,
WINED3D_SV_DEPTH = 0xffffffff, WINED3D_SV_DEPTH = 0xffffffff,
WINED3D_SV_TARGET0 = 0, WINED3D_SV_TARGET0 = 0,
WINED3D_SV_TARGET1 = 1, WINED3D_SV_TARGET1 = 1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment