Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
a67ee02a
Commit
a67ee02a
authored
Sep 17, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Recognize the SM4 dcl_outputTopology opcode.
parent
0fbb9842
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
2 deletions
+41
-2
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-0
glsl_shader.c
dlls/wined3d/glsl_shader.c
+1
-0
shader.c
dlls/wined3d/shader.c
+3
-1
shader_sm4.c
dlls/wined3d/shader_sm4.c
+35
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
a67ee02a
...
@@ -5100,6 +5100,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
...
@@ -5100,6 +5100,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_CUT */
NULL
,
/* WINED3DSIH_CUT */
NULL
,
/* WINED3DSIH_DCL */
shader_hw_nop
,
/* WINED3DSIH_DCL */
shader_hw_nop
,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */
shader_hw_nop
,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */
shader_hw_nop
,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */
shader_hw_nop
,
/* WINED3DSIH_DCL_VERTICES_OUT */
shader_hw_nop
,
/* WINED3DSIH_DCL_VERTICES_OUT */
shader_hw_nop
,
/* WINED3DSIH_DEF */
shader_hw_nop
,
/* WINED3DSIH_DEF */
shader_hw_nop
,
/* WINED3DSIH_DEFB */
shader_hw_nop
,
/* WINED3DSIH_DEFB */
shader_hw_nop
,
...
...
dlls/wined3d/glsl_shader.c
View file @
a67ee02a
...
@@ -5032,6 +5032,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
...
@@ -5032,6 +5032,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_CUT */
NULL
,
/* WINED3DSIH_CUT */
NULL
,
/* WINED3DSIH_DCL */
shader_glsl_nop
,
/* WINED3DSIH_DCL */
shader_glsl_nop
,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */
shader_glsl_nop
,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */
shader_glsl_nop
,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */
shader_glsl_nop
,
/* WINED3DSIH_DCL_VERTICES_OUT */
shader_glsl_nop
,
/* WINED3DSIH_DCL_VERTICES_OUT */
shader_glsl_nop
,
/* WINED3DSIH_DEF */
shader_glsl_nop
,
/* WINED3DSIH_DEF */
shader_glsl_nop
,
/* WINED3DSIH_DEFB */
shader_glsl_nop
,
/* WINED3DSIH_DEFB */
shader_glsl_nop
,
...
...
dlls/wined3d/shader.c
View file @
a67ee02a
...
@@ -51,6 +51,7 @@ static const char * const shader_opcode_names[] =
...
@@ -51,6 +51,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_CUT */
"cut"
,
/* WINED3DSIH_CUT */
"cut"
,
/* WINED3DSIH_DCL */
"dcl"
,
/* WINED3DSIH_DCL */
"dcl"
,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */
"dcl_inputPrimitive"
,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */
"dcl_inputPrimitive"
,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */
"dcl_outputTopology"
,
/* WINED3DSIH_DCL_VERTICES_OUT */
"dcl_maxOutputVertexCount"
,
/* WINED3DSIH_DCL_VERTICES_OUT */
"dcl_maxOutputVertexCount"
,
/* WINED3DSIH_DEF */
"def"
,
/* WINED3DSIH_DEF */
"def"
,
/* WINED3DSIH_DEFB */
"defb"
,
/* WINED3DSIH_DEFB */
"defb"
,
...
@@ -1366,7 +1367,8 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
...
@@ -1366,7 +1367,8 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
TRACE
(
" "
);
TRACE
(
" "
);
shader_dump_dst_param
(
&
ins
.
declaration
.
semantic
.
reg
,
&
shader_version
);
shader_dump_dst_param
(
&
ins
.
declaration
.
semantic
.
reg
,
&
shader_version
);
}
}
else
if
(
ins
.
handler_idx
==
WINED3DSIH_DCL_INPUT_PRIMITIVE
)
else
if
(
ins
.
handler_idx
==
WINED3DSIH_DCL_INPUT_PRIMITIVE
||
ins
.
handler_idx
==
WINED3DSIH_DCL_OUTPUT_TOPOLOGY
)
{
{
TRACE
(
"%s "
,
shader_opcode_names
[
ins
.
handler_idx
]);
TRACE
(
"%s "
,
shader_opcode_names
[
ins
.
handler_idx
]);
shader_dump_primitive_type
(
ins
.
declaration
.
primitive_type
);
shader_dump_primitive_type
(
ins
.
declaration
.
primitive_type
);
...
...
dlls/wined3d/shader_sm4.c
View file @
a67ee02a
...
@@ -101,6 +101,7 @@ enum wined3d_sm4_opcode
...
@@ -101,6 +101,7 @@ enum wined3d_sm4_opcode
WINED3D_SM4_OP_USHR
=
0x55
,
WINED3D_SM4_OP_USHR
=
0x55
,
WINED3D_SM4_OP_UTOF
=
0x56
,
WINED3D_SM4_OP_UTOF
=
0x56
,
WINED3D_SM4_OP_XOR
=
0x57
,
WINED3D_SM4_OP_XOR
=
0x57
,
WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY
=
0x5c
,
WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE
=
0x5d
,
WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE
=
0x5d
,
WINED3D_SM4_OP_DCL_VERTICES_OUT
=
0x5e
,
WINED3D_SM4_OP_DCL_VERTICES_OUT
=
0x5e
,
};
};
...
@@ -116,6 +117,13 @@ enum wined3d_sm4_register_type
...
@@ -116,6 +117,13 @@ enum wined3d_sm4_register_type
WINED3D_SM4_RT_NULL
=
0xd
,
WINED3D_SM4_RT_NULL
=
0xd
,
};
};
enum
wined3d_sm4_output_primitive_type
{
WINED3D_SM4_OUTPUT_PT_POINTLIST
=
0x1
,
WINED3D_SM4_OUTPUT_PT_LINELIST
=
0x3
,
WINED3D_SM4_OUTPUT_PT_TRIANGLESTRIP
=
0x5
,
};
enum
wined3d_sm4_input_primitive_type
enum
wined3d_sm4_input_primitive_type
{
{
WINED3D_SM4_INPUT_PT_POINT
=
0x1
,
WINED3D_SM4_INPUT_PT_POINT
=
0x1
,
...
@@ -213,6 +221,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
...
@@ -213,6 +221,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
{
WINED3D_SM4_OP_USHR
,
WINED3DSIH_USHR
,
"U"
,
"UU"
},
{
WINED3D_SM4_OP_USHR
,
WINED3DSIH_USHR
,
"U"
,
"UU"
},
{
WINED3D_SM4_OP_UTOF
,
WINED3DSIH_UTOF
,
"F"
,
"U"
},
{
WINED3D_SM4_OP_UTOF
,
WINED3DSIH_UTOF
,
"F"
,
"U"
},
{
WINED3D_SM4_OP_XOR
,
WINED3DSIH_XOR
,
"U"
,
"UU"
},
{
WINED3D_SM4_OP_XOR
,
WINED3DSIH_XOR
,
"U"
,
"UU"
},
{
WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY
,
WINED3DSIH_DCL_OUTPUT_TOPOLOGY
,
""
,
""
},
{
WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE
,
WINED3DSIH_DCL_INPUT_PRIMITIVE
,
""
,
""
},
{
WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE
,
WINED3DSIH_DCL_INPUT_PRIMITIVE
,
""
,
""
},
{
WINED3D_SM4_OP_DCL_VERTICES_OUT
,
WINED3DSIH_DCL_VERTICES_OUT
,
""
,
""
},
{
WINED3D_SM4_OP_DCL_VERTICES_OUT
,
WINED3DSIH_DCL_VERTICES_OUT
,
""
,
""
},
};
};
...
@@ -235,6 +244,16 @@ static const enum wined3d_shader_register_type register_type_table[] =
...
@@ -235,6 +244,16 @@ static const enum wined3d_shader_register_type register_type_table[] =
/* WINED3D_SM4_RT_NULL */
WINED3DSPR_NULL
,
/* WINED3D_SM4_RT_NULL */
WINED3DSPR_NULL
,
};
};
static
const
enum
wined3d_primitive_type
output_primitive_type_table
[]
=
{
/* UNKNOWN */
WINED3D_PT_UNDEFINED
,
/* WINED3D_SM4_OUTPUT_PT_POINTLIST */
WINED3D_PT_POINTLIST
,
/* UNKNOWN */
WINED3D_PT_UNDEFINED
,
/* WINED3D_SM4_OUTPUT_PT_LINELIST */
WINED3D_PT_LINELIST
,
/* UNKNOWN */
WINED3D_PT_UNDEFINED
,
/* WINED3D_SM4_OUTPUT_PT_TRIANGLESTRIP */
WINED3D_PT_TRIANGLESTRIP
,
};
static
const
enum
wined3d_primitive_type
input_primitive_type_table
[]
=
static
const
enum
wined3d_primitive_type
input_primitive_type_table
[]
=
{
{
/* UNKNOWN */
WINED3D_PT_UNDEFINED
,
/* UNKNOWN */
WINED3D_PT_UNDEFINED
,
...
@@ -562,7 +581,22 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
...
@@ -562,7 +581,22 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
FIXME
(
"Skipping modifier 0x%08x.
\n
"
,
modifier
);
FIXME
(
"Skipping modifier 0x%08x.
\n
"
,
modifier
);
}
}
if
(
opcode
==
WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE
)
if
(
opcode
==
WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY
)
{
enum
wined3d_sm4_output_primitive_type
primitive_type
;
primitive_type
=
(
opcode_token
&
WINED3D_SM4_PRIMITIVE_TYPE_MASK
)
>>
WINED3D_SM4_PRIMITIVE_TYPE_SHIFT
;
if
(
primitive_type
>=
sizeof
(
output_primitive_type_table
)
/
sizeof
(
*
output_primitive_type_table
))
{
FIXME
(
"Unhandled output primitive type %#x.
\n
"
,
primitive_type
);
ins
->
declaration
.
primitive_type
=
WINED3D_PT_UNDEFINED
;
}
else
{
ins
->
declaration
.
primitive_type
=
output_primitive_type_table
[
primitive_type
];
}
}
else
if
(
opcode
==
WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE
)
{
{
enum
wined3d_sm4_input_primitive_type
primitive_type
;
enum
wined3d_sm4_input_primitive_type
primitive_type
;
...
...
dlls/wined3d/wined3d_private.h
View file @
a67ee02a
...
@@ -440,6 +440,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
...
@@ -440,6 +440,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_CUT
,
WINED3DSIH_CUT
,
WINED3DSIH_DCL
,
WINED3DSIH_DCL
,
WINED3DSIH_DCL_INPUT_PRIMITIVE
,
WINED3DSIH_DCL_INPUT_PRIMITIVE
,
WINED3DSIH_DCL_OUTPUT_TOPOLOGY
,
WINED3DSIH_DCL_VERTICES_OUT
,
WINED3DSIH_DCL_VERTICES_OUT
,
WINED3DSIH_DEF
,
WINED3DSIH_DEF
,
WINED3DSIH_DEFB
,
WINED3DSIH_DEFB
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment