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
42a8041c
Commit
42a8041c
authored
Apr 29, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Handle the sampler type shift in the frontend.
parent
65321dd1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
14 deletions
+15
-14
baseshader.c
dlls/wined3d/baseshader.c
+6
-2
wined3d_private_types.h
dlls/wined3d/wined3d_private_types.h
+9
-12
No files found.
dlls/wined3d/baseshader.c
View file @
42a8041c
...
...
@@ -38,6 +38,10 @@ WINE_DECLARE_DEBUG_CHANNEL(d3d);
#define WINED3DSP_DCL_USAGEINDEX_SHIFT 16
#define WINED3DSP_DCL_USAGEINDEX_MASK (0xf << WINED3DSP_DCL_USAGEINDEX_SHIFT)
/* DCL sampler type */
#define WINED3DSP_TEXTURETYPE_SHIFT 27
#define WINED3DSP_TEXTURETYPE_MASK (0xf << WINED3DSP_TEXTURETYPE_SHIFT)
/* Opcode-related masks */
#define WINED3DSI_OPCODE_MASK 0x0000ffff
...
...
@@ -269,7 +273,7 @@ static void shader_sm1_read_semantic(const DWORD **ptr, struct wined3d_shader_se
semantic
->
usage
=
(
usage_token
&
WINED3DSP_DCL_USAGE_MASK
)
>>
WINED3DSP_DCL_USAGE_SHIFT
;
semantic
->
usage_idx
=
(
usage_token
&
WINED3DSP_DCL_USAGEINDEX_MASK
)
>>
WINED3DSP_DCL_USAGEINDEX_SHIFT
;
semantic
->
sampler_type
=
usage_token
&
WINED3DSP_TEXTURETYPE_MASK
;
semantic
->
sampler_type
=
(
usage_token
&
WINED3DSP_TEXTURETYPE_MASK
)
>>
WINED3DSP_TEXTURETYPE_SHIFT
;
shader_parse_dst_param
(
dst_token
,
NULL
,
&
semantic
->
reg
);
}
...
...
@@ -824,7 +828,7 @@ static void shader_dump_decl_usage(DWORD decl, DWORD param, DWORD shader_version
TRACE
(
"dcl"
);
if
(
regtype
==
WINED3DSPR_SAMPLER
)
{
DWORD
ttype
=
decl
&
WINED3DSP_TEXTURETYPE_MASK
;
DWORD
ttype
=
(
decl
&
WINED3DSP_TEXTURETYPE_MASK
)
>>
WINED3DSP_TEXTURETYPE_SHIFT
;
switch
(
ttype
)
{
case
WINED3DSTT_2D
:
TRACE
(
"_2d"
);
break
;
...
...
dlls/wined3d/wined3d_private_types.h
View file @
42a8041c
...
...
@@ -31,18 +31,15 @@
#define WINED3DFMT_FLAG_RENDERTARGET 0x10
#define WINED3DFMT_FLAG_FOURCC 0x20
/** DCL sampler texture type **/
#define WINED3DSP_TEXTURETYPE_SHIFT 27
#define WINED3DSP_TEXTURETYPE_MASK 0x78000000
typedef
enum
_WINED3DSAMPLER_TEXTURE_TYPE
{
WINED3DSTT_UNKNOWN
=
0
<<
WINED3DSP_TEXTURETYPE_SHIFT
,
WINED3DSTT_1D
=
1
<<
WINED3DSP_TEXTURETYPE_SHIFT
,
WINED3DSTT_2D
=
2
<<
WINED3DSP_TEXTURETYPE_SHIFT
,
WINED3DSTT_CUBE
=
3
<<
WINED3DSP_TEXTURETYPE_SHIFT
,
WINED3DSTT_VOLUME
=
4
<<
WINED3DSP_TEXTURETYPE_SHIFT
,
WINED3DSTT_FORCE_DWORD
=
0x7FFFFFFF
typedef
enum
_WINED3DSAMPLER_TEXTURE_TYPE
{
WINED3DSTT_UNKNOWN
=
0
,
WINED3DSTT_1D
=
1
,
WINED3DSTT_2D
=
2
,
WINED3DSTT_CUBE
=
3
,
WINED3DSTT_VOLUME
=
4
,
WINED3DSTT_FORCE_DWORD
=
0x7FFFFFFF
}
WINED3DSAMPLER_TEXTURE_TYPE
;
/** Register types **/
...
...
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