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
84f90f6e
Commit
84f90f6e
authored
Nov 14, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10: Add a stub ID3D10StateBlock implementation.
parent
2112f48e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
147 additions
and
1 deletion
+147
-1
Makefile.in
dlls/d3d10/Makefile.in
+1
-0
d3d10.spec
dlls/d3d10/d3d10.spec
+1
-1
stateblock.c
dlls/d3d10/stateblock.c
+145
-0
No files found.
dlls/d3d10/Makefile.in
View file @
84f90f6e
...
...
@@ -6,6 +6,7 @@ C_SRCS = \
d3d10_main.c
\
effect.c
\
shader.c
\
stateblock.c
\
utils.c
RC_SRCS
=
version.rc
...
...
dlls/d3d10/d3d10.spec
View file @
84f90f6e
...
...
@@ -5,7 +5,7 @@
@ stdcall D3D10CreateDeviceAndSwapChain(ptr long ptr long long ptr ptr ptr)
@ stdcall D3D10CreateEffectFromMemory(ptr long long ptr ptr ptr)
@ stub D3D10CreateEffectPoolFromMemory
@ st
ub D3D10CreateStateBlock
@ st
dcall D3D10CreateStateBlock(ptr ptr ptr)
@ stub D3D10DisassembleEffect
@ stub D3D10DisassembleShader
@ stdcall D3D10GetGeometryShaderProfile(ptr)
...
...
dlls/d3d10/stateblock.c
0 → 100644
View file @
84f90f6e
/*
* Copyright 2011 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*
*/
#include "config.h"
#include "wine/port.h"
#include "d3d10_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d10
);
struct
d3d10_stateblock
{
ID3D10StateBlock
ID3D10StateBlock_iface
;
LONG
refcount
;
};
static
inline
struct
d3d10_stateblock
*
impl_from_ID3D10StateBlock
(
ID3D10StateBlock
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d3d10_stateblock
,
ID3D10StateBlock_iface
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_stateblock_QueryInterface
(
ID3D10StateBlock
*
iface
,
REFIID
iid
,
void
**
object
)
{
struct
d3d10_stateblock
*
stateblock
;
TRACE
(
"iface %p, iid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
iid
),
object
);
stateblock
=
impl_from_ID3D10StateBlock
(
iface
);
if
(
IsEqualGUID
(
iid
,
&
IID_ID3D10StateBlock
)
||
IsEqualGUID
(
iid
,
&
IID_IUnknown
))
{
IUnknown_AddRef
(
&
stateblock
->
ID3D10StateBlock_iface
);
*
object
=
&
stateblock
->
ID3D10StateBlock_iface
;
return
S_OK
;
}
WARN
(
"%s not implemented, returning E_NOINTERFACE.
\n
"
,
debugstr_guid
(
iid
));
*
object
=
NULL
;
return
E_NOINTERFACE
;
}
static
ULONG
STDMETHODCALLTYPE
d3d10_stateblock_AddRef
(
ID3D10StateBlock
*
iface
)
{
struct
d3d10_stateblock
*
stateblock
=
impl_from_ID3D10StateBlock
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
stateblock
->
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
stateblock
,
refcount
);
return
refcount
;
}
static
ULONG
STDMETHODCALLTYPE
d3d10_stateblock_Release
(
ID3D10StateBlock
*
iface
)
{
struct
d3d10_stateblock
*
stateblock
=
impl_from_ID3D10StateBlock
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
stateblock
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
stateblock
,
refcount
);
if
(
!
refcount
)
HeapFree
(
GetProcessHeap
(),
0
,
stateblock
);
return
refcount
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_stateblock_Capture
(
ID3D10StateBlock
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_stateblock_Apply
(
ID3D10StateBlock
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_stateblock_ReleaseAllDeviceObjects
(
ID3D10StateBlock
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d10_stateblock_GetDevice
(
ID3D10StateBlock
*
iface
,
ID3D10Device
**
device
)
{
FIXME
(
"iface %p, device %p stub!
\n
"
,
iface
,
device
);
return
E_NOTIMPL
;
}
static
const
struct
ID3D10StateBlockVtbl
d3d10_stateblock_vtbl
=
{
/* IUnknown methods */
d3d10_stateblock_QueryInterface
,
d3d10_stateblock_AddRef
,
d3d10_stateblock_Release
,
/* ID3D10StateBlock methods */
d3d10_stateblock_Capture
,
d3d10_stateblock_Apply
,
d3d10_stateblock_ReleaseAllDeviceObjects
,
d3d10_stateblock_GetDevice
,
};
HRESULT
WINAPI
D3D10CreateStateBlock
(
ID3D10Device
*
device
,
D3D10_STATE_BLOCK_MASK
*
mask
,
ID3D10StateBlock
**
stateblock
)
{
struct
d3d10_stateblock
*
object
;
FIXME
(
"device %p, mask %p, stateblock %p stub!
\n
"
,
device
,
mask
,
stateblock
);
object
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
object
));
if
(
!
object
)
{
ERR
(
"Failed to allocate D3D10 stateblock object memory.
\n
"
);
return
E_OUTOFMEMORY
;
}
object
->
ID3D10StateBlock_iface
.
lpVtbl
=
&
d3d10_stateblock_vtbl
;
object
->
refcount
=
1
;
TRACE
(
"Created stateblock %p.
\n
"
,
object
);
*
stateblock
=
&
object
->
ID3D10StateBlock_iface
;
return
S_OK
;
}
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