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
9b48143c
Commit
9b48143c
authored
Dec 30, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass shader type and unmodified index to context_preload_texture().
parent
980711a8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
context.c
dlls/wined3d/context.c
+10
-6
No files found.
dlls/wined3d/context.c
View file @
9b48143c
...
@@ -353,18 +353,22 @@ static bool is_resource_rtv_bound(const struct wined3d_state *state,
...
@@ -353,18 +353,22 @@ static bool is_resource_rtv_bound(const struct wined3d_state *state,
/* Context activation is done by the caller. */
/* Context activation is done by the caller. */
static
void
context_preload_texture
(
struct
wined3d_context
*
context
,
static
void
context_preload_texture
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
unsigned
int
idx
)
const
struct
wined3d_state
*
state
,
enum
wined3d_shader_type
shader_type
,
unsigned
int
idx
)
{
{
struct
wined3d_texture
*
texture
;
struct
wined3d_texture
*
texture
;
unsigned
int
texture_idx
=
idx
;
if
(
!
(
texture
=
state
->
textures
[
idx
]))
if
(
shader_type
==
WINED3D_SHADER_TYPE_VERTEX
)
texture_idx
+=
WINED3D_VERTEX_SAMPLER_OFFSET
;
if
(
!
(
texture
=
state
->
textures
[
texture_idx
]))
return
;
return
;
if
(
is_resource_rtv_bound
(
state
,
&
texture
->
resource
)
if
(
is_resource_rtv_bound
(
state
,
&
texture
->
resource
)
||
(
state
->
fb
.
depth_stencil
&&
state
->
fb
.
depth_stencil
->
resource
==
&
texture
->
resource
))
||
(
state
->
fb
.
depth_stencil
&&
state
->
fb
.
depth_stencil
->
resource
==
&
texture
->
resource
))
context
->
uses_fbo_attached_resources
=
1
;
context
->
uses_fbo_attached_resources
=
1
;
wined3d_texture_load
(
texture
,
context
,
is_srgb_enabled
(
state
->
sampler_states
[
idx
]));
wined3d_texture_load
(
texture
,
context
,
is_srgb_enabled
(
state
->
sampler_states
[
texture_
idx
]));
}
}
/* Context activation is done by the caller. */
/* Context activation is done by the caller. */
...
@@ -377,7 +381,7 @@ void context_preload_textures(struct wined3d_context *context, const struct wine
...
@@ -377,7 +381,7 @@ void context_preload_textures(struct wined3d_context *context, const struct wine
for
(
i
=
0
;
i
<
WINED3D_MAX_VERTEX_SAMPLERS
;
++
i
)
for
(
i
=
0
;
i
<
WINED3D_MAX_VERTEX_SAMPLERS
;
++
i
)
{
{
if
(
state
->
shader
[
WINED3D_SHADER_TYPE_VERTEX
]
->
reg_maps
.
resource_info
[
i
].
type
)
if
(
state
->
shader
[
WINED3D_SHADER_TYPE_VERTEX
]
->
reg_maps
.
resource_info
[
i
].
type
)
context_preload_texture
(
context
,
state
,
WINED3D_
MAX_FRAGMENT_SAMPLERS
+
i
);
context_preload_texture
(
context
,
state
,
WINED3D_
SHADER_TYPE_VERTEX
,
i
);
}
}
}
}
...
@@ -386,7 +390,7 @@ void context_preload_textures(struct wined3d_context *context, const struct wine
...
@@ -386,7 +390,7 @@ void context_preload_textures(struct wined3d_context *context, const struct wine
for
(
i
=
0
;
i
<
WINED3D_MAX_FRAGMENT_SAMPLERS
;
++
i
)
for
(
i
=
0
;
i
<
WINED3D_MAX_FRAGMENT_SAMPLERS
;
++
i
)
{
{
if
(
state
->
shader
[
WINED3D_SHADER_TYPE_PIXEL
]
->
reg_maps
.
resource_info
[
i
].
type
)
if
(
state
->
shader
[
WINED3D_SHADER_TYPE_PIXEL
]
->
reg_maps
.
resource_info
[
i
].
type
)
context_preload_texture
(
context
,
state
,
i
);
context_preload_texture
(
context
,
state
,
WINED3D_SHADER_TYPE_PIXEL
,
i
);
}
}
}
}
else
else
...
@@ -396,7 +400,7 @@ void context_preload_textures(struct wined3d_context *context, const struct wine
...
@@ -396,7 +400,7 @@ void context_preload_textures(struct wined3d_context *context, const struct wine
while
(
ffu_map
)
while
(
ffu_map
)
{
{
i
=
wined3d_bit_scan
(
&
ffu_map
);
i
=
wined3d_bit_scan
(
&
ffu_map
);
context_preload_texture
(
context
,
state
,
i
);
context_preload_texture
(
context
,
state
,
WINED3D_SHADER_TYPE_PIXEL
,
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