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
e6076c8d
Commit
e6076c8d
authored
Sep 21, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move the OpenGL view class to struct wined3d_format_gl.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
62ef7516
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
11 deletions
+19
-11
utils.c
dlls/wined3d/utils.c
+8
-8
view.c
dlls/wined3d/view.c
+9
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+2
-1
No files found.
dlls/wined3d/utils.c
View file @
e6076c8d
...
...
@@ -2991,23 +2991,23 @@ static GLenum lookup_gl_view_class(GLenum internal_format)
return
GL_NONE
;
}
static
void
query_view_class
(
struct
wined3d_format
*
format
)
static
void
query_view_class
(
struct
wined3d_format
_gl
*
format
)
{
GLenum
internal_view_class
,
gamma_view_class
,
rt_view_class
;
internal_view_class
=
lookup_gl_view_class
(
format
->
glInternal
);
gamma_view_class
=
lookup_gl_view_class
(
format
->
glGammaInternal
);
rt_view_class
=
lookup_gl_view_class
(
format
->
rtInternal
);
internal_view_class
=
lookup_gl_view_class
(
format
->
f
.
glInternal
);
gamma_view_class
=
lookup_gl_view_class
(
format
->
f
.
glGammaInternal
);
rt_view_class
=
lookup_gl_view_class
(
format
->
f
.
rtInternal
);
if
(
internal_view_class
==
gamma_view_class
||
gamma_view_class
==
rt_view_class
)
{
format
->
gl_
view_class
=
internal_view_class
;
format
->
view_class
=
internal_view_class
;
TRACE
(
"Format %s is member of GL view class %#x.
\n
"
,
debug_d3dformat
(
format
->
id
),
format
->
gl_
view_class
);
debug_d3dformat
(
format
->
f
.
id
),
format
->
view_class
);
}
else
{
format
->
gl_
view_class
=
GL_NONE
;
format
->
view_class
=
GL_NONE
;
}
}
...
...
@@ -3083,7 +3083,7 @@ static void query_internal_format(struct wined3d_adapter *adapter,
}
}
query_view_class
(
format
);
query_view_class
(
wined3d_format_gl_mutable
(
format
)
);
if
(
format
->
glInternal
&&
format
->
flags
[
WINED3D_GL_RES_TYPE_RB
]
&
(
WINED3DFMT_FLAG_RENDERTARGET
|
WINED3DFMT_FLAG_DEPTH
|
WINED3DFMT_FLAG_STENCIL
))
...
...
dlls/wined3d/view.c
View file @
e6076c8d
...
...
@@ -531,7 +531,11 @@ static void wined3d_render_target_view_cs_init(void *object)
if
(
resource
->
format
->
id
!=
view
->
format
->
id
||
(
view
->
layer_count
!=
1
&&
view
->
layer_count
!=
depth_or_layer_count
))
{
if
(
resource
->
format
->
gl_view_class
!=
view
->
format
->
gl_view_class
)
GLenum
resource_class
,
view_class
;
resource_class
=
wined3d_format_gl
(
resource
->
format
)
->
view_class
;
view_class
=
wined3d_format_gl
(
view
->
format
)
->
view_class
;
if
(
resource_class
!=
view_class
)
{
FIXME
(
"Render target view not supported, resource format %s, view format %s.
\n
"
,
debug_d3dformat
(
resource
->
format
->
id
),
debug_d3dformat
(
view
->
format
->
id
));
...
...
@@ -722,7 +726,10 @@ static void wined3d_shader_resource_view_cs_init(void *object)
else
{
struct
wined3d_texture
*
texture
=
texture_from_resource
(
resource
);
GLenum
resource_class
,
view_class
;
resource_class
=
wined3d_format_gl
(
resource
->
format
)
->
view_class
;
view_class
=
wined3d_format_gl
(
view_format
)
->
view_class
;
view_target
=
get_texture_view_target
(
gl_info
,
desc
,
texture
);
if
(
resource
->
format
->
id
==
view_format
->
id
&&
texture
->
target
==
view_target
...
...
@@ -737,7 +744,7 @@ static void wined3d_shader_resource_view_cs_init(void *object)
FIXME
(
"Swapchain shader resource views not supported.
\n
"
);
}
else
if
(
resource
->
format
->
typeless_id
==
view_format
->
typeless_id
&&
resource
->
format
->
gl_view_class
==
view_format
->
gl_
view_class
)
&&
resource
_class
==
view_class
)
{
create_texture_view
(
&
view
->
gl_view
,
view_target
,
desc
,
texture
,
view_format
);
}
...
...
dlls/wined3d/wined3d_private.h
View file @
e6076c8d
...
...
@@ -4359,7 +4359,6 @@ struct wined3d_format
unsigned
int
width
,
unsigned
int
height
,
unsigned
int
depth
);
enum
wined3d_format_id
typeless_id
;
GLenum
gl_view_class
;
};
const
struct
wined3d_format
*
wined3d_get_format
(
const
struct
wined3d_adapter
*
adapter
,
...
...
@@ -4385,6 +4384,8 @@ struct wined3d_format_gl
GLenum
vtx_type
;
GLint
vtx_format
;
GLenum
view_class
;
};
static
inline
const
struct
wined3d_format_gl
*
wined3d_format_gl
(
const
struct
wined3d_format
*
format
)
...
...
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