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
a8fb1eee
Commit
a8fb1eee
authored
Jul 02, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Jul 03, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix NP2 fixups in GLSL fragment FFP replacement.
parent
30031f6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
8 deletions
+33
-8
glsl_shader.c
dlls/wined3d/glsl_shader.c
+33
-8
No files found.
dlls/wined3d/glsl_shader.c
View file @
a8fb1eee
...
...
@@ -7858,6 +7858,31 @@ static void glsl_vertex_pipe_texmatrix(struct wined3d_context *context,
context
->
constant_update_mask
|=
WINED3D_SHADER_CONST_FFP_TEXMATRIX
;
}
static
void
glsl_vertex_pipe_texmatrix_np2
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
DWORD
sampler
=
state_id
-
STATE_SAMPLER
(
0
);
const
struct
wined3d_texture
*
texture
=
state
->
textures
[
sampler
];
BOOL
np2
;
if
(
!
texture
)
return
;
if
(
sampler
>=
MAX_TEXTURES
)
return
;
if
((
np2
=
!
(
texture
->
flags
&
WINED3D_TEXTURE_POW2_MAT_IDENT
))
||
context
->
lastWasPow2Texture
&
(
1
<<
sampler
))
{
if
(
np2
)
context
->
lastWasPow2Texture
|=
1
<<
sampler
;
else
context
->
lastWasPow2Texture
&=
~
(
1
<<
sampler
);
context
->
constant_update_mask
|=
WINED3D_SHADER_CONST_FFP_TEXMATRIX
;
}
}
static
void
glsl_vertex_pipe_material
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
...
...
@@ -7996,28 +8021,28 @@ static const struct StateEntryTemplate glsl_vertex_pipe_vp_states[] =
* matrix. */
{
STATE_SAMPLER
(
0
),
{
0
,
NULL
},
ARB_TEXTURE_NON_POWER_OF_TWO
},
{
STATE_SAMPLER
(
0
),
{
0
,
NULL
},
WINED3D_GL_NORMALIZED_TEXRECT
},
{
STATE_SAMPLER
(
0
),
{
STATE_SAMPLER
(
0
),
glsl_vertex_pipe_texmatrix
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
0
),
{
STATE_SAMPLER
(
0
),
glsl_vertex_pipe_texmatrix
_np2
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
1
),
{
0
,
NULL
},
ARB_TEXTURE_NON_POWER_OF_TWO
},
{
STATE_SAMPLER
(
1
),
{
0
,
NULL
},
WINED3D_GL_NORMALIZED_TEXRECT
},
{
STATE_SAMPLER
(
1
),
{
STATE_SAMPLER
(
1
),
glsl_vertex_pipe_texmatrix
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
1
),
{
STATE_SAMPLER
(
1
),
glsl_vertex_pipe_texmatrix
_np2
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
2
),
{
0
,
NULL
},
ARB_TEXTURE_NON_POWER_OF_TWO
},
{
STATE_SAMPLER
(
2
),
{
0
,
NULL
},
WINED3D_GL_NORMALIZED_TEXRECT
},
{
STATE_SAMPLER
(
2
),
{
STATE_SAMPLER
(
2
),
glsl_vertex_pipe_texmatrix
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
2
),
{
STATE_SAMPLER
(
2
),
glsl_vertex_pipe_texmatrix
_np2
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
3
),
{
0
,
NULL
},
ARB_TEXTURE_NON_POWER_OF_TWO
},
{
STATE_SAMPLER
(
3
),
{
0
,
NULL
},
WINED3D_GL_NORMALIZED_TEXRECT
},
{
STATE_SAMPLER
(
3
),
{
STATE_SAMPLER
(
3
),
glsl_vertex_pipe_texmatrix
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
3
),
{
STATE_SAMPLER
(
3
),
glsl_vertex_pipe_texmatrix
_np2
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
4
),
{
0
,
NULL
},
ARB_TEXTURE_NON_POWER_OF_TWO
},
{
STATE_SAMPLER
(
4
),
{
0
,
NULL
},
WINED3D_GL_NORMALIZED_TEXRECT
},
{
STATE_SAMPLER
(
4
),
{
STATE_SAMPLER
(
4
),
glsl_vertex_pipe_texmatrix
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
4
),
{
STATE_SAMPLER
(
4
),
glsl_vertex_pipe_texmatrix
_np2
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
5
),
{
0
,
NULL
},
ARB_TEXTURE_NON_POWER_OF_TWO
},
{
STATE_SAMPLER
(
5
),
{
0
,
NULL
},
WINED3D_GL_NORMALIZED_TEXRECT
},
{
STATE_SAMPLER
(
5
),
{
STATE_SAMPLER
(
5
),
glsl_vertex_pipe_texmatrix
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
5
),
{
STATE_SAMPLER
(
5
),
glsl_vertex_pipe_texmatrix
_np2
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
6
),
{
0
,
NULL
},
ARB_TEXTURE_NON_POWER_OF_TWO
},
{
STATE_SAMPLER
(
6
),
{
0
,
NULL
},
WINED3D_GL_NORMALIZED_TEXRECT
},
{
STATE_SAMPLER
(
6
),
{
STATE_SAMPLER
(
6
),
glsl_vertex_pipe_texmatrix
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
6
),
{
STATE_SAMPLER
(
6
),
glsl_vertex_pipe_texmatrix
_np2
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
7
),
{
0
,
NULL
},
ARB_TEXTURE_NON_POWER_OF_TWO
},
{
STATE_SAMPLER
(
7
),
{
0
,
NULL
},
WINED3D_GL_NORMALIZED_TEXRECT
},
{
STATE_SAMPLER
(
7
),
{
STATE_SAMPLER
(
7
),
glsl_vertex_pipe_texmatrix
},
WINED3D_GL_EXT_NONE
},
{
STATE_SAMPLER
(
7
),
{
STATE_SAMPLER
(
7
),
glsl_vertex_pipe_texmatrix
_np2
},
WINED3D_GL_EXT_NONE
},
{
STATE_POINT_ENABLE
,
{
STATE_POINT_ENABLE
,
glsl_vertex_pipe_shader
},
WINED3D_GL_EXT_NONE
},
{
0
/* Terminate */
,
{
0
,
NULL
},
WINED3D_GL_EXT_NONE
},
};
...
...
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