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
695c69f6
Commit
695c69f6
authored
Mar 09, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use shader_glsl_get_write_mask_size() to calculate the write mask size.
parent
362bc0d6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
glsl_shader.c
dlls/wined3d/glsl_shader.c
+7
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-1
No files found.
dlls/wined3d/glsl_shader.c
View file @
695c69f6
...
...
@@ -2492,6 +2492,7 @@ static void pshader_glsl_texdp3tex(const SHADER_OPCODE_ARG *arg)
DWORD
sampler_idx
=
arg
->
dst
&
WINED3DSP_REGNUM_MASK
;
DWORD
src_mask
=
WINED3DSP_WRITEMASK_0
|
WINED3DSP_WRITEMASK_1
|
WINED3DSP_WRITEMASK_2
;
DWORD
sampler_type
=
arg
->
reg_maps
->
samplers
[
sampler_idx
]
&
WINED3DSP_TEXTURETYPE_MASK
;
UINT
mask_size
;
shader_glsl_add_src_param
(
arg
,
arg
->
src
[
0
],
arg
->
src_addr
[
0
],
src_mask
,
&
src0_param
);
...
...
@@ -2501,8 +2502,10 @@ static void pshader_glsl_texdp3tex(const SHADER_OPCODE_ARG *arg)
* It is a dependent read - not valid with conditional NP2 textures
*/
shader_glsl_get_sample_function
(
sampler_type
,
0
,
&
sample_function
);
mask_size
=
shader_glsl_get_write_mask_size
(
sample_function
.
coord_mask
);
switch
(
count_bits
(
sample_function
.
coord_mask
))
{
switch
(
mask_size
)
{
case
1
:
sprintf
(
coord_param
,
"dot(gl_TexCoord[%u].xyz, %s)"
,
sampler_idx
,
src0_param
.
param_str
);
...
...
@@ -2517,8 +2520,10 @@ static void pshader_glsl_texdp3tex(const SHADER_OPCODE_ARG *arg)
sprintf
(
coord_param
,
"vec3(dot(gl_TexCoord[%u].xyz, %s), 0.0, 0.0)"
,
sampler_idx
,
src0_param
.
param_str
);
break
;
default:
FIXME
(
"Unexpected mask bitcount %d
\n
"
,
count_bits
(
sample_function
.
coord_mask
));
FIXME
(
"Unexpected mask size %u
\n
"
,
mask_size
);
break
;
}
shader_glsl_gen_sample_code
(
arg
,
sampler_idx
,
coord_param
,
&
sample_function
,
WINED3DVS_NOSWIZZLE
,
...
...
dlls/wined3d/wined3d_private.h
View file @
695c69f6
...
...
@@ -2099,7 +2099,6 @@ BOOL getDepthStencilBits(WINED3DFORMAT fmt, short *depthSize, short *stencilSize
/* Math utils */
void
multiply_matrix
(
WINED3DMATRIX
*
dest
,
const
WINED3DMATRIX
*
src1
,
const
WINED3DMATRIX
*
src2
);
unsigned
int
count_bits
(
unsigned
int
mask
);
UINT
wined3d_log2i
(
UINT32
x
);
/* TODO: Make this dynamic, based on shader limits ? */
...
...
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