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
5fcffb10
Commit
5fcffb10
authored
Jun 12, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_context_gl structure to wined3d_texture_gl_bind().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6811cc64
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
11 deletions
+10
-11
state.c
dlls/wined3d/state.c
+1
-1
texture.c
dlls/wined3d/texture.c
+7
-8
view.c
dlls/wined3d/view.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/state.c
View file @
5fcffb10
...
@@ -3617,7 +3617,7 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
...
@@ -3617,7 +3617,7 @@ static void sampler(struct wined3d_context *context, const struct wined3d_state
wined3d_sampler_desc_from_sampler_states
(
&
desc
,
context
,
sampler_states
,
texture_gl
);
wined3d_sampler_desc_from_sampler_states
(
&
desc
,
context
,
sampler_states
,
texture_gl
);
wined3d_texture_gl_bind
(
texture_gl
,
context
,
srgb
);
wined3d_texture_gl_bind
(
texture_gl
,
context
_gl
,
srgb
);
if
((
entry
=
wine_rb_get
(
&
device
->
samplers
,
&
desc
)))
if
((
entry
=
wine_rb_get
(
&
device
->
samplers
,
&
desc
)))
{
{
...
...
dlls/wined3d/texture.c
View file @
5fcffb10
...
@@ -934,18 +934,17 @@ void wined3d_gl_texture_swizzle_from_color_fixup(GLint swizzle[4], struct color_
...
@@ -934,18 +934,17 @@ void wined3d_gl_texture_swizzle_from_color_fixup(GLint swizzle[4], struct color_
/* Context activation is done by the caller. */
/* Context activation is done by the caller. */
void
wined3d_texture_gl_bind
(
struct
wined3d_texture_gl
*
texture_gl
,
void
wined3d_texture_gl_bind
(
struct
wined3d_texture_gl
*
texture_gl
,
struct
wined3d_context
*
context
,
BOOL
srgb
)
struct
wined3d_context
_gl
*
context_gl
,
BOOL
srgb
)
{
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
const
struct
wined3d_format
*
format
=
texture_gl
->
t
.
resource
.
format
;
const
struct
wined3d_format
*
format
=
texture_gl
->
t
.
resource
.
format
;
const
struct
wined3d_gl_info
*
gl_info
=
context_gl
->
c
.
gl_info
;
const
struct
color_fixup_desc
fixup
=
format
->
color_fixup
;
const
struct
color_fixup_desc
fixup
=
format
->
color_fixup
;
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
struct
gl_texture
*
gl_tex
;
struct
gl_texture
*
gl_tex
;
GLenum
target
;
GLenum
target
;
TRACE
(
"texture_gl %p, context
%p, srgb %#x.
\n
"
,
texture_gl
,
context
,
srgb
);
TRACE
(
"texture_gl %p, context
_gl %p, srgb %#x.
\n
"
,
texture_gl
,
context_gl
,
srgb
);
if
(
!
needs_separate_srgb_gl_texture
(
context
,
&
texture_gl
->
t
))
if
(
!
needs_separate_srgb_gl_texture
(
&
context_gl
->
c
,
&
texture_gl
->
t
))
srgb
=
FALSE
;
srgb
=
FALSE
;
/* sRGB mode cache for preload() calls outside drawprim. */
/* sRGB mode cache for preload() calls outside drawprim. */
...
@@ -988,7 +987,7 @@ void wined3d_texture_gl_bind(struct wined3d_texture_gl *texture_gl,
...
@@ -988,7 +987,7 @@ void wined3d_texture_gl_bind(struct wined3d_texture_gl *texture_gl,
gl_tex
->
sampler_desc
.
max_anisotropy
=
1
;
gl_tex
->
sampler_desc
.
max_anisotropy
=
1
;
gl_tex
->
sampler_desc
.
compare
=
FALSE
;
gl_tex
->
sampler_desc
.
compare
=
FALSE
;
gl_tex
->
sampler_desc
.
comparison_func
=
WINED3D_CMP_LESSEQUAL
;
gl_tex
->
sampler_desc
.
comparison_func
=
WINED3D_CMP_LESSEQUAL
;
if
(
context
->
gl_info
->
supported
[
EXT_TEXTURE_SRGB_DECODE
])
if
(
gl_info
->
supported
[
EXT_TEXTURE_SRGB_DECODE
])
gl_tex
->
sampler_desc
.
srgb_decode
=
TRUE
;
gl_tex
->
sampler_desc
.
srgb_decode
=
TRUE
;
else
else
gl_tex
->
sampler_desc
.
srgb_decode
=
srgb
;
gl_tex
->
sampler_desc
.
srgb_decode
=
srgb
;
...
@@ -1046,7 +1045,7 @@ void wined3d_texture_gl_bind(struct wined3d_texture_gl *texture_gl,
...
@@ -1046,7 +1045,7 @@ void wined3d_texture_gl_bind(struct wined3d_texture_gl *texture_gl,
checkGLcall
(
"glTexParameteri(GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY)"
);
checkGLcall
(
"glTexParameteri(GL_DEPTH_TEXTURE_MODE_ARB, GL_INTENSITY)"
);
}
}
if
(
!
is_identity_fixup
(
fixup
)
&&
can_use_texture_swizzle
(
context
->
d3d_info
,
format
))
if
(
!
is_identity_fixup
(
fixup
)
&&
can_use_texture_swizzle
(
context
_gl
->
c
.
d3d_info
,
format
))
{
{
GLint
swizzle
[
4
];
GLint
swizzle
[
4
];
...
@@ -1080,7 +1079,7 @@ void wined3d_texture_gl_bind_and_dirtify(struct wined3d_texture_gl *texture_gl,
...
@@ -1080,7 +1079,7 @@ void wined3d_texture_gl_bind_and_dirtify(struct wined3d_texture_gl *texture_gl,
context_invalidate_compute_state
(
&
context_gl
->
c
,
STATE_COMPUTE_SHADER_RESOURCE_BINDING
);
context_invalidate_compute_state
(
&
context_gl
->
c
,
STATE_COMPUTE_SHADER_RESOURCE_BINDING
);
context_invalidate_state
(
&
context_gl
->
c
,
STATE_GRAPHICS_SHADER_RESOURCE_BINDING
);
context_invalidate_state
(
&
context_gl
->
c
,
STATE_GRAPHICS_SHADER_RESOURCE_BINDING
);
wined3d_texture_gl_bind
(
texture_gl
,
&
context_gl
->
c
,
srgb
);
wined3d_texture_gl_bind
(
texture_gl
,
context_gl
,
srgb
);
}
}
/* Context activation is done by the caller (state handler). */
/* Context activation is done by the caller (state handler). */
...
...
dlls/wined3d/view.c
View file @
5fcffb10
...
@@ -850,7 +850,7 @@ void wined3d_shader_resource_view_gl_bind(struct wined3d_shader_resource_view_gl
...
@@ -850,7 +850,7 @@ void wined3d_shader_resource_view_gl_bind(struct wined3d_shader_resource_view_gl
}
}
texture_gl
=
wined3d_texture_gl
(
wined3d_texture_from_resource
(
view_gl
->
v
.
resource
));
texture_gl
=
wined3d_texture_gl
(
wined3d_texture_from_resource
(
view_gl
->
v
.
resource
));
wined3d_texture_gl_bind
(
texture_gl
,
context
,
FALSE
);
wined3d_texture_gl_bind
(
texture_gl
,
context
_gl
,
FALSE
);
wined3d_sampler_bind
(
sampler
,
unit
,
texture_gl
,
context
);
wined3d_sampler_bind
(
sampler
,
unit
,
texture_gl
,
context
);
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
5fcffb10
...
@@ -3620,7 +3620,7 @@ static inline GLenum wined3d_texture_gl_get_sub_resource_target(const struct win
...
@@ -3620,7 +3620,7 @@ static inline GLenum wined3d_texture_gl_get_sub_resource_target(const struct win
void
wined3d_texture_gl_apply_sampler_desc
(
struct
wined3d_texture_gl
*
texture_gl
,
void
wined3d_texture_gl_apply_sampler_desc
(
struct
wined3d_texture_gl
*
texture_gl
,
const
struct
wined3d_sampler_desc
*
sampler_desc
,
const
struct
wined3d_context_gl
*
context_gl
)
DECLSPEC_HIDDEN
;
const
struct
wined3d_sampler_desc
*
sampler_desc
,
const
struct
wined3d_context_gl
*
context_gl
)
DECLSPEC_HIDDEN
;
void
wined3d_texture_gl_bind
(
struct
wined3d_texture_gl
*
texture_gl
,
void
wined3d_texture_gl_bind
(
struct
wined3d_texture_gl
*
texture_gl
,
struct
wined3d_context
*
context
,
BOOL
srgb
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
_gl
*
context_gl
,
BOOL
srgb
)
DECLSPEC_HIDDEN
;
void
wined3d_texture_gl_bind_and_dirtify
(
struct
wined3d_texture_gl
*
texture_gl
,
void
wined3d_texture_gl_bind_and_dirtify
(
struct
wined3d_texture_gl
*
texture_gl
,
struct
wined3d_context_gl
*
context_gl
,
BOOL
srgb
)
DECLSPEC_HIDDEN
;
struct
wined3d_context_gl
*
context_gl
,
BOOL
srgb
)
DECLSPEC_HIDDEN
;
void
wined3d_texture_gl_prepare_texture
(
struct
wined3d_texture_gl
*
texture_gl
,
void
wined3d_texture_gl_prepare_texture
(
struct
wined3d_texture_gl
*
texture_gl
,
...
...
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