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
6d948e1a
Commit
6d948e1a
authored
Oct 01, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Recognize the SM4 dcl_constantBuffer opcode.
parent
2ad58089
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
3 deletions
+27
-3
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
+7
-0
shader_sm4.c
dlls/wined3d/shader_sm4.c
+13
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+5
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
6d948e1a
...
...
@@ -5101,6 +5101,7 @@ static const SHADER_HANDLER shader_arb_instruction_handler_table[WINED3DSIH_TABL
/* WINED3DSIH_CRS */
shader_hw_map2gl
,
/* WINED3DSIH_CUT */
NULL
,
/* WINED3DSIH_DCL */
shader_hw_nop
,
/* WINED3DSIH_DCL_CONSTANT_BUFFER */
shader_hw_nop
,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */
shader_hw_nop
,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */
shader_hw_nop
,
/* WINED3DSIH_DCL_VERTICES_OUT */
shader_hw_nop
,
...
...
dlls/wined3d/glsl_shader.c
View file @
6d948e1a
...
...
@@ -5120,6 +5120,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB
/* WINED3DSIH_CRS */
shader_glsl_cross
,
/* WINED3DSIH_CUT */
shader_glsl_cut
,
/* WINED3DSIH_DCL */
shader_glsl_nop
,
/* WINED3DSIH_DCL_CONSTANT_BUFFER */
shader_glsl_nop
,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */
shader_glsl_nop
,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */
shader_glsl_nop
,
/* WINED3DSIH_DCL_VERTICES_OUT */
shader_glsl_nop
,
...
...
dlls/wined3d/shader.c
View file @
6d948e1a
...
...
@@ -50,6 +50,7 @@ static const char * const shader_opcode_names[] =
/* WINED3DSIH_CRS */
"crs"
,
/* WINED3DSIH_CUT */
"cut"
,
/* WINED3DSIH_DCL */
"dcl"
,
/* WINED3DSIH_DCL_CONSTANT_BUFFER */
"dcl_constantBuffer"
,
/* WINED3DSIH_DCL_INPUT_PRIMITIVE */
"dcl_inputPrimitive"
,
/* WINED3DSIH_DCL_OUTPUT_TOPOLOGY */
"dcl_outputTopology"
,
/* WINED3DSIH_DCL_VERTICES_OUT */
"dcl_maxOutputVertexCount"
,
...
...
@@ -1367,6 +1368,12 @@ static void shader_trace_init(const struct wined3d_shader_frontend *fe, void *fe
TRACE
(
" "
);
shader_dump_dst_param
(
&
ins
.
declaration
.
semantic
.
reg
,
&
shader_version
);
}
else
if
(
ins
.
handler_idx
==
WINED3DSIH_DCL_CONSTANT_BUFFER
)
{
TRACE
(
"%s "
,
shader_opcode_names
[
ins
.
handler_idx
]);
shader_dump_src_param
(
&
ins
.
declaration
.
src
,
&
shader_version
);
TRACE
(
", %s"
,
ins
.
flags
&
WINED3DSI_INDEXED_DYNAMIC
?
"dynamicIndexed"
:
"immediateIndexed"
);
}
else
if
(
ins
.
handler_idx
==
WINED3DSIH_DCL_INPUT_PRIMITIVE
||
ins
.
handler_idx
==
WINED3DSIH_DCL_OUTPUT_TOPOLOGY
)
{
...
...
dlls/wined3d/shader_sm4.c
View file @
6d948e1a
...
...
@@ -32,6 +32,9 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d_bytecode);
#define WINED3D_SM4_PRIMITIVE_TYPE_SHIFT 11
#define WINED3D_SM4_PRIMITIVE_TYPE_MASK (0x7 << WINED3D_SM4_PRIMITIVE_TYPE_SHIFT)
#define WINED3D_SM4_INDEX_TYPE_SHIFT 11
#define WINED3D_SM4_INDEX_TYPE_MASK (0x1 << WINED3D_SM4_INDEX_TYPE_SHIFT)
#define WINED3D_SM4_OPCODE_MASK 0xff
#define WINED3D_SM4_REGISTER_MODIFIER (1 << 31)
...
...
@@ -102,6 +105,7 @@ enum wined3d_sm4_opcode
WINED3D_SM4_OP_USHR
=
0x55
,
WINED3D_SM4_OP_UTOF
=
0x56
,
WINED3D_SM4_OP_XOR
=
0x57
,
WINED3D_SM4_OP_DCL_CONSTANT_BUFFER
=
0x59
,
WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY
=
0x5c
,
WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE
=
0x5d
,
WINED3D_SM4_OP_DCL_VERTICES_OUT
=
0x5e
,
...
...
@@ -222,6 +226,7 @@ static const struct wined3d_sm4_opcode_info opcode_table[] =
{
WINED3D_SM4_OP_USHR
,
WINED3DSIH_USHR
,
"U"
,
"UU"
},
{
WINED3D_SM4_OP_UTOF
,
WINED3DSIH_UTOF
,
"F"
,
"U"
},
{
WINED3D_SM4_OP_XOR
,
WINED3DSIH_XOR
,
"U"
,
"UU"
},
{
WINED3D_SM4_OP_DCL_CONSTANT_BUFFER
,
WINED3DSIH_DCL_CONSTANT_BUFFER
,
""
,
""
},
{
WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY
,
WINED3DSIH_DCL_OUTPUT_TOPOLOGY
,
""
,
""
},
{
WINED3D_SM4_OP_DCL_INPUT_PRIMITIVE
,
WINED3DSIH_DCL_INPUT_PRIMITIVE
,
""
,
""
},
{
WINED3D_SM4_OP_DCL_VERTICES_OUT
,
WINED3DSIH_DCL_VERTICES_OUT
,
""
,
""
},
...
...
@@ -592,7 +597,14 @@ static void shader_sm4_read_instruction(void *data, const DWORD **ptr, struct wi
FIXME
(
"Skipping modifier 0x%08x.
\n
"
,
modifier
);
}
if
(
opcode
==
WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY
)
if
(
opcode
==
WINED3D_SM4_OP_DCL_CONSTANT_BUFFER
)
{
shader_sm4_read_src_param
(
priv
,
&
p
,
WINED3D_DATA_FLOAT
,
&
ins
->
declaration
.
src
,
NULL
);
if
(
opcode_token
&
WINED3D_SM4_INDEX_TYPE_MASK
)
ins
->
flags
|=
WINED3DSI_INDEXED_DYNAMIC
;
}
else
if
(
opcode
==
WINED3D_SM4_OP_DCL_OUTPUT_TOPOLOGY
)
{
enum
wined3d_sm4_output_primitive_type
primitive_type
;
...
...
dlls/wined3d/wined3d_private.h
View file @
6d948e1a
...
...
@@ -374,8 +374,9 @@ enum wined3d_shader_dst_modifier
};
/* Undocumented opcode control to identify projective texture lookups in ps 2.0 and later */
#define WINED3DSI_TEXLD_PROJECT 1
#define WINED3DSI_TEXLD_BIAS 2
#define WINED3DSI_TEXLD_PROJECT 0x1
#define WINED3DSI_TEXLD_BIAS 0x2
#define WINED3DSI_INDEXED_DYNAMIC 0x4
enum
wined3d_shader_rel_op
{
...
...
@@ -439,6 +440,7 @@ enum WINED3D_SHADER_INSTRUCTION_HANDLER
WINED3DSIH_CRS
,
WINED3DSIH_CUT
,
WINED3DSIH_DCL
,
WINED3DSIH_DCL_CONSTANT_BUFFER
,
WINED3DSIH_DCL_INPUT_PRIMITIVE
,
WINED3DSIH_DCL_OUTPUT_TOPOLOGY
,
WINED3DSIH_DCL_VERTICES_OUT
,
...
...
@@ -670,6 +672,7 @@ struct wined3d_shader_instruction
{
struct
wined3d_shader_semantic
semantic
;
enum
wined3d_primitive_type
primitive_type
;
struct
wined3d_shader_src_param
src
;
UINT
count
;
}
declaration
;
};
...
...
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