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
d262752a
Commit
d262752a
authored
Oct 28, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Handle lack of NPOT support for depth blts.
parent
80818bfc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
surface.c
dlls/wined3d/surface.c
+15
-8
No files found.
dlls/wined3d/surface.c
View file @
d262752a
...
@@ -4126,6 +4126,7 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
...
@@ -4126,6 +4126,7 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
if
(
location
==
SFLAG_DS_OFFSCREEN
)
{
if
(
location
==
SFLAG_DS_OFFSCREEN
)
{
if
(
This
->
Flags
&
SFLAG_DS_ONSCREEN
)
{
if
(
This
->
Flags
&
SFLAG_DS_ONSCREEN
)
{
GLint
old_binding
=
0
;
GLint
old_binding
=
0
;
GLenum
bind_target
;
TRACE
(
"(%p) Copying onscreen depth buffer to depth texture
\n
"
,
This
);
TRACE
(
"(%p) Copying onscreen depth buffer to depth texture
\n
"
,
This
);
...
@@ -4138,9 +4139,15 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
...
@@ -4138,9 +4139,15 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
/* Note that we use depth_blt here as well, rather than glCopyTexImage2D
/* Note that we use depth_blt here as well, rather than glCopyTexImage2D
* directly on the FBO texture. That's because we need to flip. */
* directly on the FBO texture. That's because we need to flip. */
GL_EXTCALL
(
glBindFramebufferEXT
(
GL_FRAMEBUFFER_EXT
,
0
));
GL_EXTCALL
(
glBindFramebufferEXT
(
GL_FRAMEBUFFER_EXT
,
0
));
glGetIntegerv
(
GL_TEXTURE_BINDING_2D
,
&
old_binding
);
if
(
This
->
glDescription
.
target
==
GL_TEXTURE_RECTANGLE_ARB
)
{
glBindTexture
(
GL_TEXTURE_2D
,
device
->
depth_blt_texture
);
glGetIntegerv
(
GL_TEXTURE_BINDING_RECTANGLE_ARB
,
&
old_binding
);
glCopyTexImage2D
(
This
->
glDescription
.
target
,
bind_target
=
GL_TEXTURE_RECTANGLE_ARB
;
}
else
{
glGetIntegerv
(
GL_TEXTURE_BINDING_2D
,
&
old_binding
);
bind_target
=
GL_TEXTURE_2D
;
}
glBindTexture
(
bind_target
,
device
->
depth_blt_texture
);
glCopyTexImage2D
(
bind_target
,
This
->
glDescription
.
level
,
This
->
glDescription
.
level
,
This
->
glDescription
.
glFormatInternal
,
This
->
glDescription
.
glFormatInternal
,
0
,
0
,
...
@@ -4148,10 +4155,10 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
...
@@ -4148,10 +4155,10 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
This
->
currentDesc
.
Width
,
This
->
currentDesc
.
Width
,
This
->
currentDesc
.
Height
,
This
->
currentDesc
.
Height
,
0
);
0
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MIN_FILTER
,
GL_NEAREST
);
glTexParameteri
(
bind_target
,
GL_TEXTURE_MIN_FILTER
,
GL_NEAREST
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
glTexParameteri
(
bind_target
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
glTexParameteri
(
GL_TEXTURE_2D
,
GL_DEPTH_TEXTURE_MODE_ARB
,
GL_LUMINANCE
);
glTexParameteri
(
bind_target
,
GL_DEPTH_TEXTURE_MODE_ARB
,
GL_LUMINANCE
);
glBindTexture
(
GL_TEXTURE_2D
,
old_binding
);
glBindTexture
(
bind_target
,
old_binding
);
/* Setup the destination */
/* Setup the destination */
if
(
!
device
->
depth_blt_rb
)
{
if
(
!
device
->
depth_blt_rb
)
{
...
@@ -4174,7 +4181,7 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
...
@@ -4174,7 +4181,7 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
context_attach_depth_stencil_fbo
(
device
,
GL_FRAMEBUFFER_EXT
,
iface
,
FALSE
);
context_attach_depth_stencil_fbo
(
device
,
GL_FRAMEBUFFER_EXT
,
iface
,
FALSE
);
/* Do the actual blit */
/* Do the actual blit */
surface_depth_blt
(
This
,
device
->
depth_blt_texture
,
This
->
currentDesc
.
Width
,
This
->
currentDesc
.
Height
,
GL_TEXTURE_2D
);
surface_depth_blt
(
This
,
device
->
depth_blt_texture
,
This
->
currentDesc
.
Width
,
This
->
currentDesc
.
Height
,
bind_target
);
checkGLcall
(
"depth_blt"
);
checkGLcall
(
"depth_blt"
);
if
(
device
->
activeContext
->
current_fbo
)
{
if
(
device
->
activeContext
->
current_fbo
)
{
...
...
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