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
4034a29f
Commit
4034a29f
authored
Oct 27, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Oct 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Move depth_blt to surface.c.
parent
a26d67b1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
40 deletions
+40
-40
drawprim.c
dlls/wined3d/drawprim.c
+0
-37
surface.c
dlls/wined3d/surface.c
+40
-2
wined3d_private.h
dlls/wined3d/wined3d_private.h
+0
-1
No files found.
dlls/wined3d/drawprim.c
View file @
4034a29f
...
...
@@ -653,43 +653,6 @@ static void drawStridedSlowVs(IWineD3DDevice *iface, WineDirect3DVertexStridedDa
glEnd
();
}
void
depth_blt
(
IWineD3DDevice
*
iface
,
GLuint
texture
,
GLsizei
w
,
GLsizei
h
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
GLint
old_binding
=
0
;
glPushAttrib
(
GL_ENABLE_BIT
|
GL_DEPTH_BUFFER_BIT
|
GL_COLOR_BUFFER_BIT
|
GL_VIEWPORT_BIT
);
glDisable
(
GL_CULL_FACE
);
glEnable
(
GL_BLEND
);
glDisable
(
GL_ALPHA_TEST
);
glDisable
(
GL_SCISSOR_TEST
);
glDisable
(
GL_STENCIL_TEST
);
glEnable
(
GL_DEPTH_TEST
);
glDepthFunc
(
GL_ALWAYS
);
glDepthMask
(
GL_TRUE
);
glBlendFunc
(
GL_ZERO
,
GL_ONE
);
glViewport
(
0
,
0
,
w
,
h
);
GL_EXTCALL
(
glActiveTextureARB
(
GL_TEXTURE0_ARB
));
glGetIntegerv
(
GL_TEXTURE_BINDING_2D
,
&
old_binding
);
glBindTexture
(
GL_TEXTURE_2D
,
texture
);
This
->
shader_backend
->
shader_select_depth_blt
(
iface
);
glBegin
(
GL_TRIANGLE_STRIP
);
glVertex2f
(
-
1
.
0
f
,
-
1
.
0
f
);
glVertex2f
(
1
.
0
f
,
-
1
.
0
f
);
glVertex2f
(
-
1
.
0
f
,
1
.
0
f
);
glVertex2f
(
1
.
0
f
,
1
.
0
f
);
glEnd
();
glBindTexture
(
GL_TEXTURE_2D
,
old_binding
);
glPopAttrib
();
This
->
shader_backend
->
shader_deselect_depth_blt
(
iface
);
}
static
inline
void
drawStridedInstanced
(
IWineD3DDevice
*
iface
,
WineDirect3DVertexStridedData
*
sd
,
UINT
numberOfVertices
,
GLenum
glPrimitiveType
,
const
void
*
idxData
,
short
idxSize
,
ULONG
minIndex
,
ULONG
startIdx
,
ULONG
startVertex
)
{
...
...
dlls/wined3d/surface.c
View file @
4034a29f
...
...
@@ -3954,6 +3954,44 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) {
return
WINED3D_OK
;
}
static
void
surface_depth_blt
(
IWineD3DSurfaceImpl
*
This
,
GLuint
texture
,
GLsizei
w
,
GLsizei
h
)
{
IWineD3DDeviceImpl
*
device
=
This
->
resource
.
wineD3DDevice
;
GLint
old_binding
=
0
;
glPushAttrib
(
GL_ENABLE_BIT
|
GL_DEPTH_BUFFER_BIT
|
GL_COLOR_BUFFER_BIT
|
GL_VIEWPORT_BIT
);
glDisable
(
GL_CULL_FACE
);
glEnable
(
GL_BLEND
);
glDisable
(
GL_ALPHA_TEST
);
glDisable
(
GL_SCISSOR_TEST
);
glDisable
(
GL_STENCIL_TEST
);
glEnable
(
GL_DEPTH_TEST
);
glDepthFunc
(
GL_ALWAYS
);
glDepthMask
(
GL_TRUE
);
glBlendFunc
(
GL_ZERO
,
GL_ONE
);
glViewport
(
0
,
0
,
w
,
h
);
GL_EXTCALL
(
glActiveTextureARB
(
GL_TEXTURE0_ARB
));
glGetIntegerv
(
GL_TEXTURE_BINDING_2D
,
&
old_binding
);
glBindTexture
(
GL_TEXTURE_2D
,
texture
);
device
->
shader_backend
->
shader_select_depth_blt
((
IWineD3DDevice
*
)
device
);
glBegin
(
GL_TRIANGLE_STRIP
);
glVertex2f
(
-
1
.
0
f
,
-
1
.
0
f
);
glVertex2f
(
1
.
0
f
,
-
1
.
0
f
);
glVertex2f
(
-
1
.
0
f
,
1
.
0
f
);
glVertex2f
(
1
.
0
f
,
1
.
0
f
);
glEnd
();
glBindTexture
(
GL_TEXTURE_2D
,
old_binding
);
glPopAttrib
();
device
->
shader_backend
->
shader_deselect_depth_blt
((
IWineD3DDevice
*
)
device
);
}
void
surface_modify_ds_location
(
IWineD3DSurface
*
iface
,
DWORD
location
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
...
...
@@ -4037,7 +4075,7 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
context_attach_depth_stencil_fbo
(
device
,
GL_FRAMEBUFFER_EXT
,
iface
,
FALSE
);
/* Do the actual blit */
depth_blt
((
IWineD3DDevice
*
)
device
,
device
->
depth_blt_texture
,
This
->
currentDesc
.
Width
,
This
->
currentDesc
.
Height
);
surface_depth_blt
(
This
,
device
->
depth_blt_texture
,
This
->
currentDesc
.
Width
,
This
->
currentDesc
.
Height
);
checkGLcall
(
"depth_blt"
);
if
(
device
->
activeContext
->
current_fbo
)
{
...
...
@@ -4059,7 +4097,7 @@ void surface_load_ds_location(IWineD3DSurface *iface, DWORD location) {
GL_EXTCALL
(
glBindFramebufferEXT
(
GL_FRAMEBUFFER_EXT
,
0
));
checkGLcall
(
"glBindFramebuffer()"
);
depth_blt
((
IWineD3DDevice
*
)
device
,
This
->
glDescription
.
textureName
,
This
->
currentDesc
.
Width
,
This
->
currentDesc
.
Height
);
surface_depth_blt
(
This
,
This
->
glDescription
.
textureName
,
This
->
currentDesc
.
Width
,
This
->
currentDesc
.
Height
);
checkGLcall
(
"depth_blt"
);
if
(
device
->
activeContext
->
current_fbo
)
{
...
...
dlls/wined3d/wined3d_private.h
View file @
4034a29f
...
...
@@ -2442,5 +2442,4 @@ static inline BOOL use_ps(IWineD3DDeviceImpl *device) {
void
stretch_rect_fbo
(
IWineD3DDevice
*
iface
,
IWineD3DSurface
*
src_surface
,
WINED3DRECT
*
src_rect
,
IWineD3DSurface
*
dst_surface
,
WINED3DRECT
*
dst_rect
,
const
WINED3DTEXTUREFILTERTYPE
filter
,
BOOL
flip
);
void
depth_blt
(
IWineD3DDevice
*
iface
,
GLuint
texture
,
GLsizei
w
,
GLsizei
h
);
#endif
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