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
34ab198f
Commit
34ab198f
authored
May 08, 2019
by
Henri Verbeet
Committed by
Alexandre Julliard
May 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass a wined3d_context_gl structure to context_load_tex_coords().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d76bf253
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
9 deletions
+11
-9
context.c
dlls/wined3d/context.c
+7
-6
state.c
dlls/wined3d/state.c
+2
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-2
No files found.
dlls/wined3d/context.c
View file @
34ab198f
...
...
@@ -5036,19 +5036,19 @@ void context_unload_tex_coords(const struct wined3d_context *context)
}
}
void
context_load_tex_coords
(
const
struct
wined3d_context
*
context
,
const
struct
wined3d_stream_info
*
si
,
GLuint
*
current_bo
,
const
struct
wined3d_state
*
state
)
void
wined3d_context_gl_load_tex_coords
(
const
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_stream_info
*
si
,
GLuint
*
current_bo
,
const
struct
wined3d_state
*
state
)
{
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
const
struct
wined3d_gl_info
*
gl_info
=
context
_gl
->
c
.
gl_info
;
const
struct
wined3d_format_gl
*
format_gl
;
unsigned
int
mapped_stage
=
0
;
unsigned
int
texture_idx
;
for
(
texture_idx
=
0
;
texture_idx
<
context
->
d3d_info
->
limits
.
ffp_blend_stages
;
++
texture_idx
)
for
(
texture_idx
=
0
;
texture_idx
<
context
_gl
->
c
.
d3d_info
->
limits
.
ffp_blend_stages
;
++
texture_idx
)
{
unsigned
int
coord_idx
=
state
->
texture_states
[
texture_idx
][
WINED3D_TSS_TEXCOORD_INDEX
];
if
((
mapped_stage
=
context
->
tex_unit_map
[
texture_idx
])
==
WINED3D_UNMAPPED_STAGE
)
if
((
mapped_stage
=
context
_gl
->
c
.
tex_unit_map
[
texture_idx
])
==
WINED3D_UNMAPPED_STAGE
)
continue
;
if
(
mapped_stage
>=
gl_info
->
limits
.
texture_coords
)
...
...
@@ -5116,6 +5116,7 @@ static void context_unload_vertex_data(struct wined3d_context *context)
static
void
context_load_vertex_data
(
struct
wined3d_context
*
context
,
const
struct
wined3d_stream_info
*
si
,
const
struct
wined3d_state
*
state
)
{
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
const
struct
wined3d_gl_info
*
gl_info
=
context
->
gl_info
;
const
struct
wined3d_stream_info_element
*
e
;
const
struct
wined3d_format_gl
*
format_gl
;
...
...
@@ -5305,7 +5306,7 @@ static void context_load_vertex_data(struct wined3d_context *context,
}
/* Texture coordinates */
context_load_tex_coords
(
context
,
si
,
&
current_bo
,
state
);
wined3d_context_gl_load_tex_coords
(
context_gl
,
si
,
&
current_bo
,
state
);
}
static
void
context_unload_numbered_array
(
struct
wined3d_context
*
context
,
unsigned
int
i
)
...
...
dlls/wined3d/state.c
View file @
34ab198f
...
...
@@ -3315,6 +3315,7 @@ static void transform_texture(struct wined3d_context *context, const struct wine
static
void
tex_coordindex
(
struct
wined3d_context
*
context
,
const
struct
wined3d_state
*
state
,
DWORD
state_id
)
{
DWORD
stage
=
(
state_id
-
STATE_TEXTURESTAGE
(
0
,
0
))
/
(
WINED3D_HIGHEST_TEXTURE_STATE
+
1
);
struct
wined3d_context_gl
*
context_gl
=
wined3d_context_gl
(
context
);
static
const
GLfloat
s_plane
[]
=
{
1
.
0
f
,
0
.
0
f
,
0
.
0
f
,
0
.
0
f
};
static
const
GLfloat
t_plane
[]
=
{
0
.
0
f
,
1
.
0
f
,
0
.
0
f
,
0
.
0
f
};
static
const
GLfloat
r_plane
[]
=
{
0
.
0
f
,
0
.
0
f
,
1
.
0
f
,
0
.
0
f
};
...
...
@@ -3483,7 +3484,7 @@ static void tex_coordindex(struct wined3d_context *context, const struct wined3d
GLuint
curVBO
=
gl_info
->
supported
[
ARB_VERTEX_BUFFER_OBJECT
]
?
~
0U
:
0
;
context_unload_tex_coords
(
context
);
context_load_tex_coords
(
context
,
&
context
->
stream_info
,
&
curVBO
,
state
);
wined3d_context_gl_load_tex_coords
(
context_gl
,
&
context
->
stream_info
,
&
curVBO
,
state
);
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
34ab198f
...
...
@@ -2054,6 +2054,8 @@ void wined3d_context_gl_bind_texture(struct wined3d_context_gl *context_gl,
void
wined3d_context_gl_cleanup
(
struct
wined3d_context_gl
*
context_gl
)
DECLSPEC_HIDDEN
;
HRESULT
wined3d_context_gl_init
(
struct
wined3d_context_gl
*
context_gl
,
struct
wined3d_swapchain
*
swapchain
)
DECLSPEC_HIDDEN
;
void
wined3d_context_gl_load_tex_coords
(
const
struct
wined3d_context_gl
*
context_gl
,
const
struct
wined3d_stream_info
*
si
,
GLuint
*
current_bo
,
const
struct
wined3d_state
*
state
)
DECLSPEC_HIDDEN
;
struct
wined3d_fb_state
{
...
...
@@ -2236,8 +2238,6 @@ void context_gl_resource_released(struct wined3d_device *device,
GLuint
name
,
BOOL
rb_namespace
)
DECLSPEC_HIDDEN
;
void
context_invalidate_compute_state
(
struct
wined3d_context
*
context
,
DWORD
state_id
)
DECLSPEC_HIDDEN
;
void
context_invalidate_state
(
struct
wined3d_context
*
context
,
DWORD
state_id
)
DECLSPEC_HIDDEN
;
void
context_load_tex_coords
(
const
struct
wined3d_context
*
context
,
const
struct
wined3d_stream_info
*
si
,
GLuint
*
current_bo
,
const
struct
wined3d_state
*
state
)
DECLSPEC_HIDDEN
;
void
*
context_map_bo_address
(
struct
wined3d_context
*
context
,
const
struct
wined3d_bo_address
*
data
,
size_t
size
,
GLenum
binding
,
DWORD
flags
)
DECLSPEC_HIDDEN
;
struct
wined3d_context
*
context_reacquire
(
const
struct
wined3d_device
*
device
,
...
...
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