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
7c675b52
Commit
7c675b52
authored
Aug 31, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Queries don't need parents.
parent
2ef40090
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
47 deletions
+19
-47
query.c
dlls/d3d9/query.c
+1
-1
device.c
dlls/wined3d/device.c
+3
-3
query.c
dlls/wined3d/query.c
+12
-37
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-3
wined3d.idl
include/wine/wined3d.idl
+2
-3
No files found.
dlls/d3d9/query.c
View file @
7c675b52
...
...
@@ -158,7 +158,7 @@ HRESULT query_init(IDirect3DQuery9Impl *query, IDirect3DDevice9Impl *device, D3D
query
->
ref
=
1
;
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreateQuery
(
device
->
WineD3DDevice
,
type
,
&
query
->
wineD3DQuery
,
(
IUnknown
*
)
query
);
hr
=
IWineD3DDevice_CreateQuery
(
device
->
WineD3DDevice
,
type
,
&
query
->
wineD3DQuery
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
dlls/wined3d/device.c
View file @
7c675b52
...
...
@@ -1230,13 +1230,13 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateCubeTexture(IWineD3DDevice *iface
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreateQuery
(
IWineD3DDevice
*
iface
,
WINED3DQUERYTYPE
type
,
IWineD3DQuery
**
query
,
IUnknown
*
parent
)
WINED3DQUERYTYPE
type
,
IWineD3DQuery
**
query
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DQueryImpl
*
object
;
HRESULT
hr
;
TRACE
(
"iface %p, type %#x, query %p
, parent %p.
\n
"
,
iface
,
type
,
query
,
parent
);
TRACE
(
"iface %p, type %#x, query %p
.
\n
"
,
iface
,
type
,
query
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
...
...
@@ -1245,7 +1245,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateQuery(IWineD3DDevice *iface,
return
E_OUTOFMEMORY
;
}
hr
=
query_init
(
object
,
This
,
type
,
parent
);
hr
=
query_init
(
object
,
This
,
type
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize query, hr %#x.
\n
"
,
hr
);
...
...
dlls/wined3d/query.c
View file @
7c675b52
...
...
@@ -230,27 +230,21 @@ void wined3d_event_query_issue(struct wined3d_event_query *query, IWineD3DDevice
context_release
(
context
);
}
/*
* Occlusion Queries:
* http://www.gris.uni-tuebingen.de/~bartz/Publications/paper/hww98.pdf
* http://oss.sgi.com/projects/ogl-sample/registry/ARB/occlusion_query.txt
*/
/* *******************************************
IWineD3DQuery IUnknown parts follow
******************************************* */
static
HRESULT
WINAPI
IWineD3DQueryImpl_QueryInterface
(
IWineD3DQuery
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
)
static
HRESULT
WINAPI
IWineD3DQueryImpl_QueryInterface
(
IWineD3DQuery
*
iface
,
REFIID
riid
,
void
**
object
)
{
IWineD3DQueryImpl
*
This
=
(
IWineD3DQueryImpl
*
)
iface
;
TRACE
(
"(%p)->(%s,%p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppobj
);
if
(
IsEqualGUID
(
riid
,
&
IID_I
Unknown
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DBase
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DQuery
))
{
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
)
;
if
(
IsEqualGUID
(
riid
,
&
IID_I
WineD3DQuery
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
)
)
{
IUnknown_AddRef
(
iface
);
*
ppobj
=
This
;
*
object
=
iface
;
return
S_OK
;
}
*
ppobj
=
NULL
;
WARN
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
riid
));
*
object
=
NULL
;
return
E_NOINTERFACE
;
}
...
...
@@ -288,21 +282,6 @@ static ULONG WINAPI IWineD3DQueryImpl_Release(IWineD3DQuery *iface) {
return
ref
;
}
/* *******************************************
IWineD3DQuery IWineD3DQuery parts follow
******************************************* */
static
HRESULT
WINAPI
IWineD3DQueryImpl_GetParent
(
IWineD3DQuery
*
iface
,
IUnknown
**
parent
)
{
TRACE
(
"iface %p, parent %p.
\n
"
,
iface
,
parent
);
*
parent
=
(
IUnknown
*
)
parent
;
IUnknown_AddRef
(
*
parent
);
TRACE
(
"Returning %p.
\n
"
,
*
parent
);
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DOcclusionQueryImpl_GetData
(
IWineD3DQuery
*
iface
,
void
*
pData
,
DWORD
dwSize
,
DWORD
dwGetDataFlags
)
{
IWineD3DQueryImpl
*
This
=
(
IWineD3DQueryImpl
*
)
iface
;
struct
wined3d_occlusion_query
*
query
=
This
->
extendedData
;
...
...
@@ -554,7 +533,6 @@ static const IWineD3DQueryVtbl IWineD3DEventQuery_Vtbl =
IWineD3DQueryImpl_AddRef
,
IWineD3DQueryImpl_Release
,
/*** IWineD3Dquery methods ***/
IWineD3DQueryImpl_GetParent
,
IWineD3DEventQueryImpl_GetData
,
IWineD3DEventQueryImpl_GetDataSize
,
IWineD3DQueryImpl_GetType
,
...
...
@@ -568,15 +546,13 @@ static const IWineD3DQueryVtbl IWineD3DOcclusionQuery_Vtbl =
IWineD3DQueryImpl_AddRef
,
IWineD3DQueryImpl_Release
,
/*** IWineD3Dquery methods ***/
IWineD3DQueryImpl_GetParent
,
IWineD3DOcclusionQueryImpl_GetData
,
IWineD3DOcclusionQueryImpl_GetDataSize
,
IWineD3DQueryImpl_GetType
,
IWineD3DOcclusionQueryImpl_Issue
};
HRESULT
query_init
(
IWineD3DQueryImpl
*
query
,
IWineD3DDeviceImpl
*
device
,
WINED3DQUERYTYPE
type
,
IUnknown
*
parent
)
HRESULT
query_init
(
IWineD3DQueryImpl
*
query
,
IWineD3DDeviceImpl
*
device
,
WINED3DQUERYTYPE
type
)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
...
...
@@ -638,7 +614,6 @@ HRESULT query_init(IWineD3DQueryImpl *query, IWineD3DDeviceImpl *device,
query
->
type
=
type
;
query
->
state
=
QUERY_CREATED
;
query
->
device
=
device
;
query
->
parent
=
parent
;
query
->
ref
=
1
;
return
WINED3D_OK
;
...
...
dlls/wined3d/wined3d_private.h
View file @
7c675b52
...
...
@@ -2442,7 +2442,6 @@ typedef struct IWineD3DQueryImpl
const
IWineD3DQueryVtbl
*
lpVtbl
;
LONG
ref
;
/* Note: Ref counting not required */
IUnknown
*
parent
;
IWineD3DDeviceImpl
*
device
;
/* IWineD3DQuery fields */
...
...
@@ -2452,8 +2451,7 @@ typedef struct IWineD3DQueryImpl
void
*
extendedData
;
}
IWineD3DQueryImpl
;
HRESULT
query_init
(
IWineD3DQueryImpl
*
query
,
IWineD3DDeviceImpl
*
device
,
WINED3DQUERYTYPE
type
,
IUnknown
*
parent
)
DECLSPEC_HIDDEN
;
HRESULT
query_init
(
IWineD3DQueryImpl
*
query
,
IWineD3DDeviceImpl
*
device
,
WINED3DQUERYTYPE
type
)
DECLSPEC_HIDDEN
;
/* IWineD3DBuffer */
...
...
include/wine/wined3d.idl
View file @
7c675b52
...
...
@@ -2658,7 +2658,7 @@ interface IWineD3DStateBlock : IUnknown
local
,
uuid
(
905
ddbac
-
6
f30
-
11
d9
-
c687
-
00046142
c14f
)
]
interface
IWineD3DQuery
:
I
WineD3DBase
interface
IWineD3DQuery
:
I
Unknown
{
HRESULT
GetData
(
[
out
]
void
*
data
,
...
...
@@ -2888,8 +2888,7 @@ interface IWineD3DDevice : IUnknown
)
;
HRESULT
CreateQuery
(
[
in
]
WINED3DQUERYTYPE
type
,
[
out
]
IWineD3DQuery
**
query
,
[
in
]
IUnknown
*
parent
[
out
]
IWineD3DQuery
**
query
)
;
HRESULT
CreateSwapChain
(
[
in
]
WINED3DPRESENT_PARAMETERS
*
present_parameters
,
...
...
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