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
d485e045
Commit
d485e045
authored
Jul 26, 2011
by
Matteo Bruni
Committed by
Alexandre Julliard
Aug 25, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fetch currently active texture unit from the wined3d_context.
parent
f47f9f7c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
24 deletions
+4
-24
surface.c
dlls/wined3d/surface.c
+2
-10
volume.c
dlls/wined3d/volume.c
+2
-14
No files found.
dlls/wined3d/surface.c
View file @
d485e045
...
@@ -594,7 +594,6 @@ static void surface_bind_and_dirtify(struct wined3d_surface *surface,
...
@@ -594,7 +594,6 @@ static void surface_bind_and_dirtify(struct wined3d_surface *surface,
{
{
struct
wined3d_device
*
device
=
surface
->
resource
.
device
;
struct
wined3d_device
*
device
=
surface
->
resource
.
device
;
DWORD
active_sampler
;
DWORD
active_sampler
;
GLint
active_texture
;
/* We don't need a specific texture unit, but after binding the texture
/* We don't need a specific texture unit, but after binding the texture
* the current unit is dirty. Read the unit back instead of switching to
* the current unit is dirty. Read the unit back instead of switching to
...
@@ -604,15 +603,8 @@ static void surface_bind_and_dirtify(struct wined3d_surface *surface,
...
@@ -604,15 +603,8 @@ static void surface_bind_and_dirtify(struct wined3d_surface *surface,
* To be more specific, this is tricky because we can implicitly be
* To be more specific, this is tricky because we can implicitly be
* called from sampler() in state.c. This means we can't touch anything
* called from sampler() in state.c. This means we can't touch anything
* other than whatever happens to be the currently active texture, or we
* other than whatever happens to be the currently active texture, or we
* would risk marking already applied sampler states dirty again.
* would risk marking already applied sampler states dirty again. */
*
active_sampler
=
device
->
rev_tex_unit_map
[
context
->
active_texture
];
* TODO: Track the current active texture per GL context instead of using
* glGet(). */
ENTER_GL
();
glGetIntegerv
(
GL_ACTIVE_TEXTURE
,
&
active_texture
);
LEAVE_GL
();
active_sampler
=
device
->
rev_tex_unit_map
[
active_texture
-
GL_TEXTURE0_ARB
];
if
(
active_sampler
!=
WINED3D_UNMAPPED_STAGE
)
if
(
active_sampler
!=
WINED3D_UNMAPPED_STAGE
)
device_invalidate_state
(
device
,
STATE_SAMPLER
(
active_sampler
));
device_invalidate_state
(
device
,
STATE_SAMPLER
(
active_sampler
));
...
...
dlls/wined3d/volume.c
View file @
d485e045
...
@@ -37,20 +37,8 @@ static void volume_bind_and_dirtify(const struct wined3d_volume *volume, struct
...
@@ -37,20 +37,8 @@ static void volume_bind_and_dirtify(const struct wined3d_volume *volume, struct
* To be more specific, this is tricky because we can implicitly be called
* To be more specific, this is tricky because we can implicitly be called
* from sampler() in state.c. This means we can't touch anything other than
* from sampler() in state.c. This means we can't touch anything other than
* whatever happens to be the currently active texture, or we would risk
* whatever happens to be the currently active texture, or we would risk
* marking already applied sampler states dirty again.
* marking already applied sampler states dirty again. */
*
active_sampler
=
volume
->
resource
.
device
->
rev_tex_unit_map
[
context
->
active_texture
];
* TODO: Track the current active texture per GL context instead of using glGet
*/
if
(
context
->
gl_info
->
supported
[
ARB_MULTITEXTURE
])
{
GLint
active_texture
;
ENTER_GL
();
glGetIntegerv
(
GL_ACTIVE_TEXTURE
,
&
active_texture
);
LEAVE_GL
();
active_sampler
=
volume
->
resource
.
device
->
rev_tex_unit_map
[
active_texture
-
GL_TEXTURE0_ARB
];
}
else
{
active_sampler
=
0
;
}
if
(
active_sampler
!=
WINED3D_UNMAPPED_STAGE
)
if
(
active_sampler
!=
WINED3D_UNMAPPED_STAGE
)
device_invalidate_state
(
volume
->
resource
.
device
,
STATE_SAMPLER
(
active_sampler
));
device_invalidate_state
(
volume
->
resource
.
device
,
STATE_SAMPLER
(
active_sampler
));
...
...
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