Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
7b621655
Commit
7b621655
authored
Apr 03, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 03, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Store the register index in struct wined3d_shader_dst_param.
parent
7245cd2b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
18 deletions
+22
-18
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-0
baseshader.c
dlls/wined3d/baseshader.c
+1
-0
glsl_shader.c
dlls/wined3d/glsl_shader.c
+19
-18
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/arb_program_shader.c
View file @
7b621655
...
@@ -1584,6 +1584,7 @@ static void shader_hw_mnxn(const struct wined3d_shader_instruction *ins)
...
@@ -1584,6 +1584,7 @@ static void shader_hw_mnxn(const struct wined3d_shader_instruction *ins)
}
}
for
(
i
=
0
;
i
<
nComponents
;
i
++
)
{
for
(
i
=
0
;
i
<
nComponents
;
i
++
)
{
tmp_dst
.
register_idx
=
ins
->
dst
[
0
].
register_idx
;
tmp_dst
.
token
=
((
ins
->
dst
[
0
].
token
)
&
~
WINED3DSP_WRITEMASK_ALL
)
|
(
WINED3DSP_WRITEMASK_0
<<
i
);
tmp_dst
.
token
=
((
ins
->
dst
[
0
].
token
)
&
~
WINED3DSP_WRITEMASK_ALL
)
|
(
WINED3DSP_WRITEMASK_0
<<
i
);
tmp_ins
.
src
[
1
]
=
ins
->
src
[
1
]
+
i
;
tmp_ins
.
src
[
1
]
=
ins
->
src
[
1
]
+
i
;
shader_hw_map2gl
(
&
tmp_ins
);
shader_hw_map2gl
(
&
tmp_ins
);
...
...
dlls/wined3d/baseshader.c
View file @
7b621655
...
@@ -850,6 +850,7 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
...
@@ -850,6 +850,7 @@ void shader_generate_main(IWineD3DBaseShader *iface, SHADER_BUFFER* buffer,
{
{
dst_param
.
addr_token
=
0
;
dst_param
.
addr_token
=
0
;
pToken
+=
shader_get_param
(
pToken
,
shader_version
,
&
dst_param
.
token
,
&
dst_param
.
addr_token
);
pToken
+=
shader_get_param
(
pToken
,
shader_version
,
&
dst_param
.
token
,
&
dst_param
.
addr_token
);
dst_param
.
register_idx
=
dst_param
.
token
&
WINED3DSP_REGNUM_MASK
;
}
}
/* Predication token */
/* Predication token */
...
...
dlls/wined3d/glsl_shader.c
View file @
7b621655
...
@@ -1917,7 +1917,7 @@ static void shader_glsl_cmp(const struct wined3d_shader_instruction *ins)
...
@@ -1917,7 +1917,7 @@ static void shader_glsl_cmp(const struct wined3d_shader_instruction *ins)
DWORD
src0regtype
=
shader_get_regtype
(
ins
->
src
[
0
]);
DWORD
src0regtype
=
shader_get_regtype
(
ins
->
src
[
0
]);
DWORD
src1regtype
=
shader_get_regtype
(
ins
->
src
[
1
]);
DWORD
src1regtype
=
shader_get_regtype
(
ins
->
src
[
1
]);
DWORD
src2regtype
=
shader_get_regtype
(
ins
->
src
[
2
]);
DWORD
src2regtype
=
shader_get_regtype
(
ins
->
src
[
2
]);
DWORD
dstreg
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
dstreg
=
ins
->
dst
[
0
].
register_idx
;
DWORD
dstregtype
=
shader_get_regtype
(
ins
->
dst
[
0
].
token
);
DWORD
dstregtype
=
shader_get_regtype
(
ins
->
dst
[
0
].
token
);
/* Cycle through all source0 channels */
/* Cycle through all source0 channels */
...
@@ -2086,6 +2086,7 @@ static void shader_glsl_mnxn(const struct wined3d_shader_instruction *ins)
...
@@ -2086,6 +2086,7 @@ static void shader_glsl_mnxn(const struct wined3d_shader_instruction *ins)
for
(
i
=
0
;
i
<
nComponents
;
++
i
)
for
(
i
=
0
;
i
<
nComponents
;
++
i
)
{
{
tmp_dst
.
register_idx
=
ins
->
dst
[
0
].
register_idx
;
tmp_dst
.
token
=
((
ins
->
dst
[
0
].
token
)
&
~
WINED3DSP_WRITEMASK_ALL
)
|
(
WINED3DSP_WRITEMASK_0
<<
i
);
tmp_dst
.
token
=
((
ins
->
dst
[
0
].
token
)
&
~
WINED3DSP_WRITEMASK_ALL
)
|
(
WINED3DSP_WRITEMASK_0
<<
i
);
tmp_ins
.
src
[
1
]
=
ins
->
src
[
1
]
+
i
;
tmp_ins
.
src
[
1
]
=
ins
->
src
[
1
]
+
i
;
shader_glsl_dot
(
&
tmp_ins
);
shader_glsl_dot
(
&
tmp_ins
);
...
@@ -2394,7 +2395,7 @@ static void pshader_glsl_tex(const struct wined3d_shader_instruction *ins)
...
@@ -2394,7 +2395,7 @@ static void pshader_glsl_tex(const struct wined3d_shader_instruction *ins)
/* 1.0-1.4: Use destination register as sampler source.
/* 1.0-1.4: Use destination register as sampler source.
* 2.0+: Use provided sampler source. */
* 2.0+: Use provided sampler source. */
if
(
shader_version
<
WINED3DPS_VERSION
(
2
,
0
))
sampler_idx
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
if
(
shader_version
<
WINED3DPS_VERSION
(
2
,
0
))
sampler_idx
=
ins
->
dst
[
0
].
register_idx
;
else
sampler_idx
=
ins
->
src
[
1
]
&
WINED3DSP_REGNUM_MASK
;
else
sampler_idx
=
ins
->
src
[
1
]
&
WINED3DSP_REGNUM_MASK
;
sampler_type
=
ins
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
sampler_type
=
ins
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
...
@@ -2513,7 +2514,7 @@ static void pshader_glsl_texcoord(const struct wined3d_shader_instruction *ins)
...
@@ -2513,7 +2514,7 @@ static void pshader_glsl_texcoord(const struct wined3d_shader_instruction *ins)
if
(
ins
->
reg_maps
->
shader_version
!=
WINED3DPS_VERSION
(
1
,
4
))
if
(
ins
->
reg_maps
->
shader_version
!=
WINED3DPS_VERSION
(
1
,
4
))
{
{
DWORD
reg
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
reg
=
ins
->
dst
[
0
].
register_idx
;
shader_addline
(
buffer
,
"clamp(gl_TexCoord[%u], 0.0, 1.0)%s);
\n
"
,
reg
,
dst_mask
);
shader_addline
(
buffer
,
"clamp(gl_TexCoord[%u], 0.0, 1.0)%s);
\n
"
,
reg
,
dst_mask
);
}
else
{
}
else
{
DWORD
reg
=
ins
->
src
[
0
]
&
WINED3DSP_REGNUM_MASK
;
DWORD
reg
=
ins
->
src
[
0
]
&
WINED3DSP_REGNUM_MASK
;
...
@@ -2555,7 +2556,7 @@ static void pshader_glsl_texdp3tex(const struct wined3d_shader_instruction *ins)
...
@@ -2555,7 +2556,7 @@ static void pshader_glsl_texdp3tex(const struct wined3d_shader_instruction *ins)
{
{
glsl_src_param_t
src0_param
;
glsl_src_param_t
src0_param
;
glsl_sample_function_t
sample_function
;
glsl_sample_function_t
sample_function
;
DWORD
sampler_idx
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
sampler_idx
=
ins
->
dst
[
0
].
register_idx
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
sampler_type
=
ins
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
DWORD
sampler_type
=
ins
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
UINT
mask_size
;
UINT
mask_size
;
...
@@ -2598,7 +2599,7 @@ static void pshader_glsl_texdp3tex(const struct wined3d_shader_instruction *ins)
...
@@ -2598,7 +2599,7 @@ static void pshader_glsl_texdp3tex(const struct wined3d_shader_instruction *ins)
static
void
pshader_glsl_texdp3
(
const
struct
wined3d_shader_instruction
*
ins
)
static
void
pshader_glsl_texdp3
(
const
struct
wined3d_shader_instruction
*
ins
)
{
{
glsl_src_param_t
src0_param
;
glsl_src_param_t
src0_param
;
DWORD
dstreg
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
dstreg
=
ins
->
dst
[
0
].
register_idx
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
dst_mask
;
DWORD
dst_mask
;
unsigned
int
mask_size
;
unsigned
int
mask_size
;
...
@@ -2640,7 +2641,7 @@ static void pshader_glsl_texdepth(const struct wined3d_shader_instruction *ins)
...
@@ -2640,7 +2641,7 @@ static void pshader_glsl_texdepth(const struct wined3d_shader_instruction *ins)
static
void
pshader_glsl_texm3x2depth
(
const
struct
wined3d_shader_instruction
*
ins
)
static
void
pshader_glsl_texm3x2depth
(
const
struct
wined3d_shader_instruction
*
ins
)
{
{
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
dstreg
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
dstreg
=
ins
->
dst
[
0
].
register_idx
;
glsl_src_param_t
src0_param
;
glsl_src_param_t
src0_param
;
shader_glsl_add_src_param
(
ins
,
ins
->
src
[
0
],
ins
->
src_addr
[
0
],
src_mask
,
&
src0_param
);
shader_glsl_add_src_param
(
ins
,
ins
->
src
[
0
],
ins
->
src_addr
[
0
],
src_mask
,
&
src0_param
);
...
@@ -2654,7 +2655,7 @@ static void pshader_glsl_texm3x2depth(const struct wined3d_shader_instruction *i
...
@@ -2654,7 +2655,7 @@ static void pshader_glsl_texm3x2depth(const struct wined3d_shader_instruction *i
static
void
pshader_glsl_texm3x2pad
(
const
struct
wined3d_shader_instruction
*
ins
)
static
void
pshader_glsl_texm3x2pad
(
const
struct
wined3d_shader_instruction
*
ins
)
{
{
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
reg
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
reg
=
ins
->
dst
[
0
].
register_idx
;
SHADER_BUFFER
*
buffer
=
ins
->
buffer
;
SHADER_BUFFER
*
buffer
=
ins
->
buffer
;
glsl_src_param_t
src0_param
;
glsl_src_param_t
src0_param
;
...
@@ -2668,7 +2669,7 @@ static void pshader_glsl_texm3x3pad(const struct wined3d_shader_instruction *ins
...
@@ -2668,7 +2669,7 @@ static void pshader_glsl_texm3x3pad(const struct wined3d_shader_instruction *ins
{
{
IWineD3DPixelShaderImpl
*
shader
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
shader
;
IWineD3DPixelShaderImpl
*
shader
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
shader
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
reg
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
reg
=
ins
->
dst
[
0
].
register_idx
;
SHADER_BUFFER
*
buffer
=
ins
->
buffer
;
SHADER_BUFFER
*
buffer
=
ins
->
buffer
;
SHADER_PARSE_STATE
*
current_state
=
&
shader
->
baseShader
.
parse_state
;
SHADER_PARSE_STATE
*
current_state
=
&
shader
->
baseShader
.
parse_state
;
glsl_src_param_t
src0_param
;
glsl_src_param_t
src0_param
;
...
@@ -2681,7 +2682,7 @@ static void pshader_glsl_texm3x3pad(const struct wined3d_shader_instruction *ins
...
@@ -2681,7 +2682,7 @@ static void pshader_glsl_texm3x3pad(const struct wined3d_shader_instruction *ins
static
void
pshader_glsl_texm3x2tex
(
const
struct
wined3d_shader_instruction
*
ins
)
static
void
pshader_glsl_texm3x2tex
(
const
struct
wined3d_shader_instruction
*
ins
)
{
{
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
reg
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
reg
=
ins
->
dst
[
0
].
register_idx
;
SHADER_BUFFER
*
buffer
=
ins
->
buffer
;
SHADER_BUFFER
*
buffer
=
ins
->
buffer
;
glsl_src_param_t
src0_param
;
glsl_src_param_t
src0_param
;
DWORD
sampler_type
=
ins
->
reg_maps
->
samplers
[
reg
]
&
WINED3DSP_TEXTURETYPE_MASK
;
DWORD
sampler_type
=
ins
->
reg_maps
->
samplers
[
reg
]
&
WINED3DSP_TEXTURETYPE_MASK
;
...
@@ -2702,7 +2703,7 @@ static void pshader_glsl_texm3x3tex(const struct wined3d_shader_instruction *ins
...
@@ -2702,7 +2703,7 @@ static void pshader_glsl_texm3x3tex(const struct wined3d_shader_instruction *ins
{
{
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
glsl_src_param_t
src0_param
;
glsl_src_param_t
src0_param
;
DWORD
reg
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
reg
=
ins
->
dst
[
0
].
register_idx
;
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
shader
;
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
shader
;
SHADER_PARSE_STATE
*
current_state
=
&
This
->
baseShader
.
parse_state
;
SHADER_PARSE_STATE
*
current_state
=
&
This
->
baseShader
.
parse_state
;
DWORD
sampler_type
=
ins
->
reg_maps
->
samplers
[
reg
]
&
WINED3DSP_TEXTURETYPE_MASK
;
DWORD
sampler_type
=
ins
->
reg_maps
->
samplers
[
reg
]
&
WINED3DSP_TEXTURETYPE_MASK
;
...
@@ -2727,7 +2728,7 @@ static void pshader_glsl_texm3x3(const struct wined3d_shader_instruction *ins)
...
@@ -2727,7 +2728,7 @@ static void pshader_glsl_texm3x3(const struct wined3d_shader_instruction *ins)
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
glsl_src_param_t
src0_param
;
glsl_src_param_t
src0_param
;
char
dst_mask
[
6
];
char
dst_mask
[
6
];
DWORD
reg
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
reg
=
ins
->
dst
[
0
].
register_idx
;
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
shader
;
IWineD3DPixelShaderImpl
*
This
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
shader
;
SHADER_PARSE_STATE
*
current_state
=
&
This
->
baseShader
.
parse_state
;
SHADER_PARSE_STATE
*
current_state
=
&
This
->
baseShader
.
parse_state
;
...
@@ -2745,7 +2746,7 @@ static void pshader_glsl_texm3x3(const struct wined3d_shader_instruction *ins)
...
@@ -2745,7 +2746,7 @@ static void pshader_glsl_texm3x3(const struct wined3d_shader_instruction *ins)
static
void
pshader_glsl_texm3x3spec
(
const
struct
wined3d_shader_instruction
*
ins
)
static
void
pshader_glsl_texm3x3spec
(
const
struct
wined3d_shader_instruction
*
ins
)
{
{
IWineD3DPixelShaderImpl
*
shader
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
shader
;
IWineD3DPixelShaderImpl
*
shader
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
shader
;
DWORD
reg
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
reg
=
ins
->
dst
[
0
].
register_idx
;
glsl_src_param_t
src0_param
;
glsl_src_param_t
src0_param
;
glsl_src_param_t
src1_param
;
glsl_src_param_t
src1_param
;
SHADER_BUFFER
*
buffer
=
ins
->
buffer
;
SHADER_BUFFER
*
buffer
=
ins
->
buffer
;
...
@@ -2776,7 +2777,7 @@ static void pshader_glsl_texm3x3spec(const struct wined3d_shader_instruction *in
...
@@ -2776,7 +2777,7 @@ static void pshader_glsl_texm3x3spec(const struct wined3d_shader_instruction *in
static
void
pshader_glsl_texm3x3vspec
(
const
struct
wined3d_shader_instruction
*
ins
)
static
void
pshader_glsl_texm3x3vspec
(
const
struct
wined3d_shader_instruction
*
ins
)
{
{
IWineD3DPixelShaderImpl
*
shader
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
shader
;
IWineD3DPixelShaderImpl
*
shader
=
(
IWineD3DPixelShaderImpl
*
)
ins
->
shader
;
DWORD
reg
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
reg
=
ins
->
dst
[
0
].
register_idx
;
SHADER_BUFFER
*
buffer
=
ins
->
buffer
;
SHADER_BUFFER
*
buffer
=
ins
->
buffer
;
SHADER_PARSE_STATE
*
current_state
=
&
shader
->
baseShader
.
parse_state
;
SHADER_PARSE_STATE
*
current_state
=
&
shader
->
baseShader
.
parse_state
;
glsl_src_param_t
src0_param
;
glsl_src_param_t
src0_param
;
...
@@ -2819,7 +2820,7 @@ static void pshader_glsl_texbem(const struct wined3d_shader_instruction *ins)
...
@@ -2819,7 +2820,7 @@ static void pshader_glsl_texbem(const struct wined3d_shader_instruction *ins)
DWORD
flags
;
DWORD
flags
;
char
coord_mask
[
6
];
char
coord_mask
[
6
];
sampler_idx
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
sampler_idx
=
ins
->
dst
[
0
].
register_idx
;
flags
=
deviceImpl
->
stateBlock
->
textureState
[
sampler_idx
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
];
flags
=
deviceImpl
->
stateBlock
->
textureState
[
sampler_idx
][
WINED3DTSS_TEXTURETRANSFORMFLAGS
];
sampler_type
=
ins
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
sampler_type
=
ins
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
...
@@ -2870,7 +2871,7 @@ static void pshader_glsl_texbem(const struct wined3d_shader_instruction *ins)
...
@@ -2870,7 +2871,7 @@ static void pshader_glsl_texbem(const struct wined3d_shader_instruction *ins)
static
void
pshader_glsl_bem
(
const
struct
wined3d_shader_instruction
*
ins
)
static
void
pshader_glsl_bem
(
const
struct
wined3d_shader_instruction
*
ins
)
{
{
glsl_src_param_t
src0_param
,
src1_param
;
glsl_src_param_t
src0_param
,
src1_param
;
DWORD
sampler_idx
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
sampler_idx
=
ins
->
dst
[
0
].
register_idx
;
shader_glsl_add_src_param
(
ins
,
ins
->
src
[
0
],
ins
->
src_addr
[
0
],
shader_glsl_add_src_param
(
ins
,
ins
->
src
[
0
],
ins
->
src_addr
[
0
],
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
,
&
src0_param
);
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
,
&
src0_param
);
...
@@ -2887,7 +2888,7 @@ static void pshader_glsl_bem(const struct wined3d_shader_instruction *ins)
...
@@ -2887,7 +2888,7 @@ static void pshader_glsl_bem(const struct wined3d_shader_instruction *ins)
static
void
pshader_glsl_texreg2ar
(
const
struct
wined3d_shader_instruction
*
ins
)
static
void
pshader_glsl_texreg2ar
(
const
struct
wined3d_shader_instruction
*
ins
)
{
{
glsl_src_param_t
src0_param
;
glsl_src_param_t
src0_param
;
DWORD
sampler_idx
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
sampler_idx
=
ins
->
dst
[
0
].
register_idx
;
DWORD
sampler_type
=
ins
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
DWORD
sampler_type
=
ins
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
glsl_sample_function_t
sample_function
;
glsl_sample_function_t
sample_function
;
...
@@ -2903,7 +2904,7 @@ static void pshader_glsl_texreg2ar(const struct wined3d_shader_instruction *ins)
...
@@ -2903,7 +2904,7 @@ static void pshader_glsl_texreg2ar(const struct wined3d_shader_instruction *ins)
static
void
pshader_glsl_texreg2gb
(
const
struct
wined3d_shader_instruction
*
ins
)
static
void
pshader_glsl_texreg2gb
(
const
struct
wined3d_shader_instruction
*
ins
)
{
{
glsl_src_param_t
src0_param
;
glsl_src_param_t
src0_param
;
DWORD
sampler_idx
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
sampler_idx
=
ins
->
dst
[
0
].
register_idx
;
DWORD
sampler_type
=
ins
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
DWORD
sampler_type
=
ins
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
glsl_sample_function_t
sample_function
;
glsl_sample_function_t
sample_function
;
...
@@ -2919,7 +2920,7 @@ static void pshader_glsl_texreg2gb(const struct wined3d_shader_instruction *ins)
...
@@ -2919,7 +2920,7 @@ static void pshader_glsl_texreg2gb(const struct wined3d_shader_instruction *ins)
static
void
pshader_glsl_texreg2rgb
(
const
struct
wined3d_shader_instruction
*
ins
)
static
void
pshader_glsl_texreg2rgb
(
const
struct
wined3d_shader_instruction
*
ins
)
{
{
glsl_src_param_t
src0_param
;
glsl_src_param_t
src0_param
;
DWORD
sampler_idx
=
ins
->
dst
[
0
].
token
&
WINED3DSP_REGNUM_MASK
;
DWORD
sampler_idx
=
ins
->
dst
[
0
].
register_idx
;
DWORD
sampler_type
=
ins
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
DWORD
sampler_type
=
ins
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
glsl_sample_function_t
sample_function
;
glsl_sample_function_t
sample_function
;
...
...
dlls/wined3d/wined3d_private.h
View file @
7b621655
...
@@ -452,6 +452,7 @@ typedef struct SHADER_OPCODE
...
@@ -452,6 +452,7 @@ typedef struct SHADER_OPCODE
struct
wined3d_shader_dst_param
struct
wined3d_shader_dst_param
{
{
UINT
register_idx
;
DWORD
token
;
DWORD
token
;
DWORD
addr_token
;
DWORD
addr_token
;
};
};
...
...
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