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
5097623d
Commit
5097623d
authored
Sep 30, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_state structure to device_preload_texture().
parent
285e6d24
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
device.c
dlls/wined3d/device.c
+7
-8
No files found.
dlls/wined3d/device.c
View file @
5097623d
...
...
@@ -453,20 +453,19 @@ void device_update_stream_info(IWineD3DDeviceImpl *device, const struct wined3d_
}
}
static
void
device_preload_texture
(
IWineD3DStateBlockImpl
*
stateblock
,
unsigned
int
idx
)
static
void
device_preload_texture
(
const
struct
wined3d_state
*
state
,
unsigned
int
idx
)
{
IWineD3DBaseTextureImpl
*
texture
;
enum
WINED3DSRGB
srgb
;
if
(
!
(
texture
=
state
block
->
state
.
textures
[
idx
]))
return
;
srgb
=
state
block
->
state
.
sampler_states
[
idx
][
WINED3DSAMP_SRGBTEXTURE
]
?
SRGB_SRGB
:
SRGB_RGB
;
if
(
!
(
texture
=
state
->
textures
[
idx
]))
return
;
srgb
=
state
->
sampler_states
[
idx
][
WINED3DSAMP_SRGBTEXTURE
]
?
SRGB_SRGB
:
SRGB_RGB
;
texture
->
baseTexture
.
internal_preload
((
IWineD3DBaseTexture
*
)
texture
,
srgb
);
}
void
device_preload_textures
(
IWineD3DDeviceImpl
*
device
)
{
IWineD3DStateBlockImpl
*
stateblock
=
device
->
stateBlock
;
const
struct
wined3d_state
*
state
=
&
stateblock
->
state
;
const
struct
wined3d_state
*
state
=
&
device
->
stateBlock
->
state
;
unsigned
int
i
;
if
(
use_vs
(
state
))
...
...
@@ -474,7 +473,7 @@ void device_preload_textures(IWineD3DDeviceImpl *device)
for
(
i
=
0
;
i
<
MAX_VERTEX_SAMPLERS
;
++
i
)
{
if
(
state
->
vertex_shader
->
baseShader
.
reg_maps
.
sampler_type
[
i
])
device_preload_texture
(
state
block
,
MAX_FRAGMENT_SAMPLERS
+
i
);
device_preload_texture
(
state
,
MAX_FRAGMENT_SAMPLERS
+
i
);
}
}
...
...
@@ -483,7 +482,7 @@ void device_preload_textures(IWineD3DDeviceImpl *device)
for
(
i
=
0
;
i
<
MAX_FRAGMENT_SAMPLERS
;
++
i
)
{
if
(
state
->
pixel_shader
->
baseShader
.
reg_maps
.
sampler_type
[
i
])
device_preload_texture
(
state
block
,
i
);
device_preload_texture
(
state
,
i
);
}
}
else
...
...
@@ -493,7 +492,7 @@ void device_preload_textures(IWineD3DDeviceImpl *device)
for
(
i
=
0
;
ffu_map
;
ffu_map
>>=
1
,
++
i
)
{
if
(
ffu_map
&
1
)
device_preload_texture
(
state
block
,
i
);
device_preload_texture
(
state
,
i
);
}
}
}
...
...
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