Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
af0a4b69
Commit
af0a4b69
authored
Mar 03, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass gl_info to basetexture_bind().
parent
75c8e9f7
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
18 deletions
+22
-18
basetexture.c
dlls/wined3d/basetexture.c
+2
-2
cubetexture.c
dlls/wined3d/cubetexture.c
+4
-4
state.c
dlls/wined3d/state.c
+1
-1
surface.c
dlls/wined3d/surface.c
+2
-1
texture.c
dlls/wined3d/texture.c
+4
-4
volume.c
dlls/wined3d/volume.c
+1
-1
volumetexture.c
dlls/wined3d/volumetexture.c
+4
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+4
-2
No files found.
dlls/wined3d/basetexture.c
View file @
af0a4b69
...
...
@@ -238,9 +238,9 @@ void basetexture_set_dirty(IWineD3DBaseTextureImpl *texture, BOOL dirty)
}
/* Context activation is done by the caller. */
HRESULT
basetexture_bind
(
IWineD3DBaseTextureImpl
*
texture
,
BOOL
srgb
,
BOOL
*
set_surface_desc
)
HRESULT
basetexture_bind
(
IWineD3DBaseTextureImpl
*
texture
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
,
BOOL
*
set_surface_desc
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
texture
->
resource
.
device
->
adapter
->
gl_info
;
HRESULT
hr
=
WINED3D_OK
;
GLenum
textureDimensions
;
BOOL
isNewTexture
=
FALSE
;
...
...
dlls/wined3d/cubetexture.c
View file @
af0a4b69
...
...
@@ -28,18 +28,18 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d_texture
);
/* Context activation is done by the caller. */
static
HRESULT
cubetexture_bind
(
IWineD3DBaseTextureImpl
*
texture
,
BOOL
srgb
)
static
HRESULT
cubetexture_bind
(
IWineD3DBaseTextureImpl
*
texture
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
)
{
BOOL
set_gl_texture_desc
;
HRESULT
hr
;
TRACE
(
"texture %p,
srgb %#x.
\n
"
,
texture
,
srgb
);
TRACE
(
"texture %p,
gl_info %p, srgb %#x.
\n
"
,
texture
,
gl_info
,
srgb
);
hr
=
basetexture_bind
(
texture
,
srgb
,
&
set_gl_texture_desc
);
hr
=
basetexture_bind
(
texture
,
gl_info
,
srgb
,
&
set_gl_texture_desc
);
if
(
set_gl_texture_desc
&&
SUCCEEDED
(
hr
))
{
UINT
sub_count
=
texture
->
baseTexture
.
level_count
*
texture
->
baseTexture
.
layer_count
;
const
struct
wined3d_gl_info
*
gl_info
=
&
texture
->
resource
.
device
->
adapter
->
gl_info
;
BOOL
srgb_tex
=
!
gl_info
->
supported
[
EXT_TEXTURE_SRGB_DECODE
]
&&
texture
->
baseTexture
.
is_srgb
;
GLuint
name
=
srgb_tex
?
texture
->
baseTexture
.
texture_srgb
.
name
:
texture
->
baseTexture
.
texture_rgb
.
name
;
UINT
i
;
...
...
dlls/wined3d/state.c
View file @
af0a4b69
...
...
@@ -3646,7 +3646,7 @@ static void sampler(DWORD state_id, struct wined3d_stateblock *stateblock, struc
IWineD3DBaseTextureImpl
*
texture
=
state
->
textures
[
sampler
];
BOOL
srgb
=
state
->
sampler_states
[
sampler
][
WINED3DSAMP_SRGBTEXTURE
];
texture
->
baseTexture
.
texture_ops
->
texture_bind
(
texture
,
srgb
);
texture
->
baseTexture
.
texture_ops
->
texture_bind
(
texture
,
gl_info
,
srgb
);
basetexture_apply_state_changes
(
texture
,
state
->
sampler_states
[
sampler
],
gl_info
);
...
...
dlls/wined3d/surface.c
View file @
af0a4b69
...
...
@@ -701,9 +701,10 @@ void surface_bind(IWineD3DSurfaceImpl *surface, BOOL srgb)
if
(
surface
->
container
.
type
==
WINED3D_CONTAINER_TEXTURE
)
{
IWineD3DBaseTextureImpl
*
texture
=
surface
->
container
.
u
.
texture
;
const
struct
wined3d_gl_info
*
gl_info
=
&
texture
->
resource
.
device
->
adapter
->
gl_info
;
TRACE
(
"Passing to container (%p).
\n
"
,
texture
);
texture
->
baseTexture
.
texture_ops
->
texture_bind
(
texture
,
srgb
);
texture
->
baseTexture
.
texture_ops
->
texture_bind
(
texture
,
gl_info
,
srgb
);
}
else
{
...
...
dlls/wined3d/texture.c
View file @
af0a4b69
...
...
@@ -28,17 +28,17 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d_texture
);
/* Context activation is done by the caller. */
static
HRESULT
texture_bind
(
IWineD3DBaseTextureImpl
*
texture
,
BOOL
srgb
)
static
HRESULT
texture_bind
(
IWineD3DBaseTextureImpl
*
texture
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
)
{
BOOL
set_gl_texture_desc
;
HRESULT
hr
;
TRACE
(
"texture %p,
srgb %#x.
\n
"
,
texture
,
srgb
);
TRACE
(
"texture %p,
gl_info %p, srgb %#x.
\n
"
,
texture
,
gl_info
,
srgb
);
hr
=
basetexture_bind
(
texture
,
srgb
,
&
set_gl_texture_desc
);
hr
=
basetexture_bind
(
texture
,
gl_info
,
srgb
,
&
set_gl_texture_desc
);
if
(
set_gl_texture_desc
&&
SUCCEEDED
(
hr
))
{
const
struct
wined3d_gl_info
*
gl_info
=
&
texture
->
resource
.
device
->
adapter
->
gl_info
;
BOOL
srgb_tex
=
!
gl_info
->
supported
[
EXT_TEXTURE_SRGB_DECODE
]
&&
texture
->
baseTexture
.
is_srgb
;
struct
gl_texture
*
gl_tex
;
UINT
i
;
...
...
dlls/wined3d/volume.c
View file @
af0a4b69
...
...
@@ -60,7 +60,7 @@ static void volume_bind_and_dirtify(struct IWineD3DVolumeImpl *volume)
IWineD3DDeviceImpl_MarkStateDirty
(
volume
->
resource
.
device
,
STATE_SAMPLER
(
active_sampler
));
}
container
->
baseTexture
.
texture_ops
->
texture_bind
(
container
,
FALSE
);
container
->
baseTexture
.
texture_ops
->
texture_bind
(
container
,
gl_info
,
FALSE
);
}
void
volume_add_dirty_box
(
struct
IWineD3DVolumeImpl
*
volume
,
const
WINED3DBOX
*
dirty_box
)
...
...
dlls/wined3d/volumetexture.c
View file @
af0a4b69
...
...
@@ -27,13 +27,14 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d_texture
);
/* Context activation is done by the caller. */
static
HRESULT
volumetexture_bind
(
IWineD3DBaseTextureImpl
*
texture
,
BOOL
srgb
)
static
HRESULT
volumetexture_bind
(
IWineD3DBaseTextureImpl
*
texture
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
)
{
BOOL
dummy
;
TRACE
(
"texture %p,
srgb %#x.
\n
"
,
texture
,
srgb
);
TRACE
(
"texture %p,
gl_info %p, srgb %#x.
\n
"
,
texture
,
gl_info
,
srgb
);
return
basetexture_bind
(
texture
,
srgb
,
&
dummy
);
return
basetexture_bind
(
texture
,
gl_info
,
srgb
,
&
dummy
);
}
/* Do not call while under the GL lock. */
...
...
dlls/wined3d/wined3d_private.h
View file @
af0a4b69
...
...
@@ -1871,7 +1871,8 @@ struct gl_texture
struct
wined3d_texture_ops
{
HRESULT
(
*
texture_bind
)(
struct
IWineD3DBaseTextureImpl
*
texture
,
BOOL
srgb
);
HRESULT
(
*
texture_bind
)(
struct
IWineD3DBaseTextureImpl
*
texture
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
);
void
(
*
texture_preload
)(
struct
IWineD3DBaseTextureImpl
*
texture
,
enum
WINED3DSRGB
srgb
);
};
...
...
@@ -1919,7 +1920,8 @@ static inline struct gl_texture *basetexture_get_gl_texture(IWineD3DBaseTextureI
void
basetexture_apply_state_changes
(
IWineD3DBaseTextureImpl
*
texture
,
const
DWORD
samplerStates
[
WINED3D_HIGHEST_SAMPLER_STATE
+
1
],
const
struct
wined3d_gl_info
*
gl_info
)
DECLSPEC_HIDDEN
;
HRESULT
basetexture_bind
(
IWineD3DBaseTextureImpl
*
texture
,
BOOL
srgb
,
BOOL
*
set_surface_desc
)
DECLSPEC_HIDDEN
;
HRESULT
basetexture_bind
(
IWineD3DBaseTextureImpl
*
texture
,
const
struct
wined3d_gl_info
*
gl_info
,
BOOL
srgb
,
BOOL
*
set_surface_desc
)
DECLSPEC_HIDDEN
;
void
basetexture_cleanup
(
IWineD3DBaseTextureImpl
*
texture
)
DECLSPEC_HIDDEN
;
void
basetexture_generate_mipmaps
(
IWineD3DBaseTextureImpl
*
texture
)
DECLSPEC_HIDDEN
;
WINED3DTEXTUREFILTERTYPE
basetexture_get_autogen_filter_type
(
IWineD3DBaseTextureImpl
*
texture
)
DECLSPEC_HIDDEN
;
...
...
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