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
3d4fe0b7
Commit
3d4fe0b7
authored
Mar 29, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Mar 30, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of IWineD3DPixelShader.
parent
9ea2ee5f
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
77 additions
and
90 deletions
+77
-90
d3d10core_private.h
dlls/d3d10core/d3d10core_private.h
+1
-1
shader.c
dlls/d3d10core/shader.c
+2
-6
d3d8_private.h
dlls/d3d8/d3d8_private.h
+2
-3
device.c
dlls/d3d8/device.c
+9
-8
shader.c
dlls/d3d8/shader.c
+3
-3
d3d9_private.h
dlls/d3d9/d3d9_private.h
+2
-6
device.c
dlls/d3d9/device.c
+4
-4
shader.c
dlls/d3d9/shader.c
+4
-4
device.c
dlls/wined3d/device.c
+30
-23
glsl_shader.c
dlls/wined3d/glsl_shader.c
+2
-2
shader.c
dlls/wined3d/shader.c
+8
-9
stateblock.c
dlls/wined3d/stateblock.c
+4
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+3
-5
wined3d.idl
include/wine/wined3d.idl
+3
-12
No files found.
dlls/d3d10core/d3d10core_private.h
View file @
3d4fe0b7
...
...
@@ -195,7 +195,7 @@ struct d3d10_pixel_shader
const
struct
ID3D10PixelShaderVtbl
*
vtbl
;
LONG
refcount
;
IWineD3D
Pixel
Shader
*
wined3d_shader
;
IWineD3D
Base
Shader
*
wined3d_shader
;
struct
wined3d_shader_signature
output_signature
;
};
...
...
dlls/d3d10core/shader.c
View file @
3d4fe0b7
...
...
@@ -429,9 +429,7 @@ static ULONG STDMETHODCALLTYPE d3d10_pixel_shader_AddRef(ID3D10PixelShader *ifac
TRACE
(
"%p increasing refcount to %u
\n
"
,
This
,
refcount
);
if
(
refcount
==
1
)
{
IWineD3DPixelShader_AddRef
(
This
->
wined3d_shader
);
}
IWineD3DBaseShader_AddRef
(
This
->
wined3d_shader
);
return
refcount
;
}
...
...
@@ -444,9 +442,7 @@ static ULONG STDMETHODCALLTYPE d3d10_pixel_shader_Release(ID3D10PixelShader *ifa
TRACE
(
"%p decreasing refcount to %u
\n
"
,
This
,
refcount
);
if
(
!
refcount
)
{
IWineD3DPixelShader_Release
(
This
->
wined3d_shader
);
}
IWineD3DBaseShader_Release
(
This
->
wined3d_shader
);
return
refcount
;
}
...
...
dlls/d3d8/d3d8_private.h
View file @
3d4fe0b7
...
...
@@ -486,9 +486,8 @@ HRESULT vertexshader_init(IDirect3DVertexShader8Impl *shader, IDirect3DDevice8Im
typedef
struct
IDirect3DPixelShader8Impl
{
IDirect3DPixelShader8
IDirect3DPixelShader8_iface
;
LONG
ref
;
DWORD
handle
;
IWineD3DPixelShader
*
wineD3DPixelShader
;
DWORD
handle
;
IWineD3DBaseShader
*
wined3d_shader
;
}
IDirect3DPixelShader8Impl
;
HRESULT
pixelshader_init
(
IDirect3DPixelShader8Impl
*
shader
,
IDirect3DDevice8Impl
*
device
,
...
...
dlls/d3d8/device.c
View file @
3d4fe0b7
...
...
@@ -2410,7 +2410,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(IDirect3DDevice8 *ifac
}
TRACE
(
"(%p) : Setting shader %p
\n
"
,
This
,
shader
);
hr
=
IWineD3DDevice_SetPixelShader
(
This
->
WineD3DDevice
,
shader
->
wine
D3DPixelS
hader
);
hr
=
IWineD3DDevice_SetPixelShader
(
This
->
WineD3DDevice
,
shader
->
wine
d3d_s
hader
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -2419,7 +2419,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_SetPixelShader(IDirect3DDevice8 *ifac
static
HRESULT
WINAPI
IDirect3DDevice8Impl_GetPixelShader
(
IDirect3DDevice8
*
iface
,
DWORD
*
ppShader
)
{
IDirect3DDevice8Impl
*
This
=
impl_from_IDirect3DDevice8
(
iface
);
IWineD3D
Pixel
Shader
*
object
;
IWineD3D
Base
Shader
*
object
;
TRACE
(
"iface %p, shader %p.
\n
"
,
iface
,
ppShader
);
...
...
@@ -2433,8 +2433,8 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShader(IDirect3DDevice8 *ifac
if
(
object
)
{
IDirect3DPixelShader8Impl
*
d3d8_shader
;
d3d8_shader
=
IWineD3D
Pixel
Shader_GetParent
(
object
);
IWineD3D
Pixel
Shader_Release
(
object
);
d3d8_shader
=
IWineD3D
Base
Shader_GetParent
(
object
);
IWineD3D
Base
Shader_Release
(
object
);
*
ppShader
=
d3d8_shader
->
handle
;
}
else
...
...
@@ -2452,7 +2452,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(IDirect3DDevice8 *i
{
IDirect3DDevice8Impl
*
This
=
impl_from_IDirect3DDevice8
(
iface
);
IDirect3DPixelShader8Impl
*
shader
;
IWineD3D
Pixel
Shader
*
cur
;
IWineD3D
Base
Shader
*
cur
;
TRACE
(
"iface %p, shader %#x.
\n
"
,
iface
,
pShader
);
...
...
@@ -2469,8 +2469,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_DeletePixelShader(IDirect3DDevice8 *i
cur
=
IWineD3DDevice_GetPixelShader
(
This
->
WineD3DDevice
);
if
(
cur
)
{
if
(
cur
==
shader
->
wineD3DPixelShader
)
IDirect3DDevice8_SetPixelShader
(
iface
,
0
);
IWineD3DPixelShader_Release
(
cur
);
if
(
cur
==
shader
->
wined3d_shader
)
IDirect3DDevice8_SetPixelShader
(
iface
,
0
);
IWineD3DBaseShader_Release
(
cur
);
}
wined3d_mutex_unlock
();
...
...
@@ -2535,7 +2536,7 @@ static HRESULT WINAPI IDirect3DDevice8Impl_GetPixelShaderFunction(IDirect3DDevic
return
D3DERR_INVALIDCALL
;
}
hr
=
IWineD3D
PixelShader_GetFunction
(
shader
->
wineD3DPixelS
hader
,
pData
,
pSizeOfData
);
hr
=
IWineD3D
BaseShader_GetFunction
(
shader
->
wined3d_s
hader
,
pData
,
pSizeOfData
);
wined3d_mutex_unlock
();
return
hr
;
...
...
dlls/d3d8/shader.c
View file @
3d4fe0b7
...
...
@@ -225,7 +225,7 @@ static ULONG WINAPI d3d8_pixelshader_AddRef(IDirect3DPixelShader8 *iface)
if
(
refcount
==
1
)
{
wined3d_mutex_lock
();
IWineD3D
PixelShader_AddRef
(
shader
->
wineD3DPixelS
hader
);
IWineD3D
BaseShader_AddRef
(
shader
->
wined3d_s
hader
);
wined3d_mutex_unlock
();
}
...
...
@@ -242,7 +242,7 @@ static ULONG WINAPI d3d8_pixelshader_Release(IDirect3DPixelShader8 *iface)
if
(
!
refcount
)
{
wined3d_mutex_lock
();
IWineD3D
PixelShader_Release
(
shader
->
wineD3DPixelS
hader
);
IWineD3D
BaseShader_Release
(
shader
->
wined3d_s
hader
);
wined3d_mutex_unlock
();
}
...
...
@@ -278,7 +278,7 @@ HRESULT pixelshader_init(IDirect3DPixelShader8Impl *shader, IDirect3DDevice8Impl
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreatePixelShader
(
device
->
WineD3DDevice
,
byte_code
,
NULL
,
shader
,
&
d3d8_pixelshader_wined3d_parent_ops
,
&
shader
->
wine
D3DPixelS
hader
);
&
d3d8_pixelshader_wined3d_parent_ops
,
&
shader
->
wine
d3d_s
hader
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
dlls/d3d9/d3d9_private.h
View file @
3d4fe0b7
...
...
@@ -453,12 +453,8 @@ typedef struct IDirect3DPixelShader9Impl {
/* IUnknown fields */
const
IDirect3DPixelShader9Vtbl
*
lpVtbl
;
LONG
ref
;
/* IDirect3DPixelShader9 fields */
IWineD3DPixelShader
*
wineD3DPixelShader
;
/* Parent reference */
LPDIRECT3DDEVICE9EX
parentDevice
;
IWineD3DBaseShader
*
wined3d_shader
;
IDirect3DDevice9Ex
*
parentDevice
;
}
IDirect3DPixelShader9Impl
;
HRESULT
pixelshader_init
(
IDirect3DPixelShader9Impl
*
shader
,
...
...
dlls/d3d9/device.c
View file @
3d4fe0b7
...
...
@@ -2527,7 +2527,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShader(IDirect3DDevice9Ex *if
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_SetPixelShader
(((
IDirect3DDevice9Impl
*
)
iface
)
->
WineD3DDevice
,
shader
?
((
IDirect3DPixelShader9Impl
*
)
shader
)
->
wine
D3DPixelS
hader
:
NULL
);
shader
?
((
IDirect3DPixelShader9Impl
*
)
shader
)
->
wine
d3d_s
hader
:
NULL
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -2536,7 +2536,7 @@ static HRESULT WINAPI IDirect3DDevice9Impl_SetPixelShader(IDirect3DDevice9Ex *if
static
HRESULT
WINAPI
IDirect3DDevice9Impl_GetPixelShader
(
IDirect3DDevice9Ex
*
iface
,
IDirect3DPixelShader9
**
shader
)
{
IWineD3D
Pixel
Shader
*
wined3d_shader
;
IWineD3D
Base
Shader
*
wined3d_shader
;
TRACE
(
"iface %p, shader %p.
\n
"
,
iface
,
shader
);
...
...
@@ -2546,9 +2546,9 @@ static HRESULT WINAPI IDirect3DDevice9Impl_GetPixelShader(IDirect3DDevice9Ex *if
wined3d_shader
=
IWineD3DDevice_GetPixelShader
(((
IDirect3DDevice9Impl
*
)
iface
)
->
WineD3DDevice
);
if
(
wined3d_shader
)
{
*
shader
=
IWineD3D
Pixel
Shader_GetParent
(
wined3d_shader
);
*
shader
=
IWineD3D
Base
Shader_GetParent
(
wined3d_shader
);
IDirect3DPixelShader9_AddRef
(
*
shader
);
IWineD3D
Pixel
Shader_Release
(
wined3d_shader
);
IWineD3D
Base
Shader_Release
(
wined3d_shader
);
}
else
{
...
...
dlls/d3d9/shader.c
View file @
3d4fe0b7
...
...
@@ -179,7 +179,7 @@ static ULONG WINAPI d3d9_pixelshader_AddRef(IDirect3DPixelShader9 *iface)
{
IDirect3DDevice9Ex_AddRef
(
shader
->
parentDevice
);
wined3d_mutex_lock
();
IWineD3D
PixelShader_AddRef
(
shader
->
wineD3DPixelS
hader
);
IWineD3D
BaseShader_AddRef
(
shader
->
wined3d_s
hader
);
wined3d_mutex_unlock
();
}
...
...
@@ -198,7 +198,7 @@ static ULONG WINAPI d3d9_pixelshader_Release(IDirect3DPixelShader9 *iface)
IDirect3DDevice9Ex
*
device
=
shader
->
parentDevice
;
wined3d_mutex_lock
();
IWineD3D
PixelShader_Release
(
shader
->
wineD3DPixelS
hader
);
IWineD3D
BaseShader_Release
(
shader
->
wined3d_s
hader
);
wined3d_mutex_unlock
();
/* Release the device last, as it may cause the device to be destroyed. */
...
...
@@ -227,7 +227,7 @@ static HRESULT WINAPI d3d9_pixelshader_GetFunction(IDirect3DPixelShader9 *iface,
TRACE
(
"iface %p, data %p, data_size %p.
\n
"
,
iface
,
data
,
data_size
);
wined3d_mutex_lock
();
hr
=
IWineD3D
PixelShader_GetFunction
(((
IDirect3DPixelShader9Impl
*
)
iface
)
->
wineD3DPixelS
hader
,
data
,
data_size
);
hr
=
IWineD3D
BaseShader_GetFunction
(((
IDirect3DPixelShader9Impl
*
)
iface
)
->
wined3d_s
hader
,
data
,
data_size
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -263,7 +263,7 @@ HRESULT pixelshader_init(IDirect3DPixelShader9Impl *shader, IDirect3DDevice9Impl
wined3d_mutex_lock
();
hr
=
IWineD3DDevice_CreatePixelShader
(
device
->
WineD3DDevice
,
byte_code
,
NULL
,
shader
,
&
d3d9_pixelshader_wined3d_parent_ops
,
&
shader
->
wine
D3DPixelS
hader
);
&
d3d9_pixelshader_wined3d_parent_ops
,
&
shader
->
wine
d3d_s
hader
);
wined3d_mutex_unlock
();
if
(
FAILED
(
hr
))
{
...
...
dlls/wined3d/device.c
View file @
3d4fe0b7
...
...
@@ -1576,7 +1576,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateGeometryShader(IWineD3DDevice *if
static
HRESULT
WINAPI
IWineD3DDeviceImpl_CreatePixelShader
(
IWineD3DDevice
*
iface
,
const
DWORD
*
pFunction
,
const
struct
wined3d_shader_signature
*
output_signature
,
void
*
parent
,
const
struct
wined3d_parent_ops
*
parent_ops
,
IWineD3D
PixelShader
**
ppPixelS
hader
)
IWineD3D
BaseShader
**
s
hader
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DPixelShaderImpl
*
object
;
...
...
@@ -1601,7 +1601,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreatePixelShader(IWineD3DDevice *iface
}
TRACE
(
"Created pixel shader %p.
\n
"
,
object
);
*
ppPixelShader
=
(
IWineD3DPixel
Shader
*
)
object
;
*
shader
=
(
IWineD3DBase
Shader
*
)
object
;
return
WINED3D_OK
;
}
...
...
@@ -3743,48 +3743,55 @@ void IWineD3DDeviceImpl_FindTexUnitMap(IWineD3DDeviceImpl *This)
if
(
vs
)
device_map_vsamplers
(
This
,
ps
,
gl_info
);
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetPixelShader
(
IWineD3DDevice
*
iface
,
IWineD3D
PixelShader
*
pS
hader
)
static
HRESULT
WINAPI
IWineD3DDeviceImpl_SetPixelShader
(
IWineD3DDevice
*
iface
,
IWineD3D
BaseShader
*
s
hader
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DPixelShader
*
oldShader
=
(
IWineD3DPixelShader
*
)
This
->
updateStateBlock
->
state
.
pixel_shader
;
This
->
updateStateBlock
->
state
.
pixel_shader
=
(
IWineD3DPixelShaderImpl
*
)
pShader
;
This
->
updateStateBlock
->
changed
.
pixelShader
=
TRUE
;
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3DBaseShader
*
prev
=
(
IWineD3DBaseShader
*
)
device
->
updateStateBlock
->
state
.
pixel_shader
;
device
->
updateStateBlock
->
state
.
pixel_shader
=
(
IWineD3DPixelShaderImpl
*
)
shader
;
device
->
updateStateBlock
->
changed
.
pixelShader
=
TRUE
;
/* Handle recording of state blocks */
if
(
This
->
isRecordingState
)
{
if
(
device
->
isRecordingState
)
TRACE
(
"Recording... not performing anything
\n
"
);
}
if
(
This
->
isRecordingState
)
{
TRACE
(
"Recording... not performing anything
\n
"
);
if
(
pShader
)
IWineD3DPixelShader_AddRef
(
pShader
);
if
(
oldShader
)
IWineD3DPixelShader_Release
(
oldShader
);
if
(
device
->
isRecordingState
)
{
TRACE
(
"Recording... not performing anything.
\n
"
);
if
(
shader
)
IWineD3DBaseShader_AddRef
(
shader
);
if
(
prev
)
IWineD3DBaseShader_Release
(
prev
);
return
WINED3D_OK
;
}
if
(
pShader
==
oldShader
)
{
TRACE
(
"App is setting the old pixel shader over, nothing to do
\n
"
);
if
(
shader
==
prev
)
{
TRACE
(
"App is setting the old pixel shader over, nothing to do.
\n
"
);
return
WINED3D_OK
;
}
if
(
pShader
)
IWineD3DPixelShader_AddRef
(
pShader
);
if
(
oldShader
)
IWineD3DPixelShader_Release
(
oldShader
);
if
(
shader
)
IWineD3DBaseShader_AddRef
(
shader
);
if
(
prev
)
IWineD3DBaseShader_Release
(
prev
);
TRACE
(
"
(%p) : setting pShader(%p)
\n
"
,
This
,
pS
hader
);
IWineD3DDeviceImpl_MarkStateDirty
(
This
,
STATE_PIXELSHADER
);
TRACE
(
"
Setting shader %p.
\n
"
,
s
hader
);
IWineD3DDeviceImpl_MarkStateDirty
(
device
,
STATE_PIXELSHADER
);
return
WINED3D_OK
;
}
static
IWineD3D
Pixel
Shader
*
WINAPI
IWineD3DDeviceImpl_GetPixelShader
(
IWineD3DDevice
*
iface
)
static
IWineD3D
Base
Shader
*
WINAPI
IWineD3DDeviceImpl_GetPixelShader
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
IWineD3D
Pixel
Shader
*
shader
;
IWineD3D
Base
Shader
*
shader
;
TRACE
(
"iface %p.
\n
"
,
iface
);
shader
=
(
IWineD3DPixelShader
*
)
device
->
stateBlock
->
state
.
pixel_shader
;
if
(
shader
)
IWineD3DPixelShader_AddRef
(
shader
);
shader
=
(
IWineD3DBaseShader
*
)
device
->
stateBlock
->
state
.
pixel_shader
;
if
(
shader
)
IWineD3DBaseShader_AddRef
(
shader
);
TRACE
(
"Returning %p.
\n
"
,
shader
);
return
shader
;
...
...
dlls/wined3d/glsl_shader.c
View file @
3d4fe0b7
...
...
@@ -3641,7 +3641,7 @@ static void shader_glsl_dp2add(const struct wined3d_shader_instruction *ins)
}
}
static
void
shader_glsl_input_pack
(
IWineD3D
Pixel
Shader
*
iface
,
struct
wined3d_shader_buffer
*
buffer
,
static
void
shader_glsl_input_pack
(
IWineD3D
Base
Shader
*
iface
,
struct
wined3d_shader_buffer
*
buffer
,
const
struct
wined3d_shader_signature_element
*
input_signature
,
const
struct
wined3d_shader_reg_maps
*
reg_maps
,
enum
vertexprocessing_mode
vertexprocessing
)
{
...
...
@@ -4005,7 +4005,7 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context
/* Pack 3.0 inputs */
if
(
reg_maps
->
shader_version
.
major
>=
3
&&
args
->
vp_mode
!=
vertexshader
)
{
shader_glsl_input_pack
((
IWineD3D
PixelShader
*
)
This
,
buffer
,
shader_glsl_input_pack
((
IWineD3D
BaseShader
*
)
This
,
buffer
,
This
->
baseShader
.
input_signature
,
reg_maps
,
args
->
vp_mode
);
}
...
...
dlls/wined3d/shader.c
View file @
3d4fe0b7
...
...
@@ -1998,12 +1998,11 @@ HRESULT geometryshader_init(struct wined3d_geometryshader *shader, IWineD3DDevic
return
WINED3D_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
pixelshader_QueryInterface
(
IWineD3D
Pixel
Shader
*
iface
,
REFIID
riid
,
void
**
object
)
static
HRESULT
STDMETHODCALLTYPE
pixelshader_QueryInterface
(
IWineD3D
Base
Shader
*
iface
,
REFIID
riid
,
void
**
object
)
{
TRACE
(
"iface %p, riid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
if
(
IsEqualGUID
(
riid
,
&
IID_IWineD3DPixelShader
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DBaseShader
)
if
(
IsEqualGUID
(
riid
,
&
IID_IWineD3DBaseShader
)
||
IsEqualGUID
(
riid
,
&
IID_IWineD3DBase
)
||
IsEqualGUID
(
riid
,
&
IID_IUnknown
))
{
...
...
@@ -2018,7 +2017,7 @@ static HRESULT STDMETHODCALLTYPE pixelshader_QueryInterface(IWineD3DPixelShader
return
E_NOINTERFACE
;
}
static
ULONG
STDMETHODCALLTYPE
pixelshader_AddRef
(
IWineD3D
Pixel
Shader
*
iface
)
static
ULONG
STDMETHODCALLTYPE
pixelshader_AddRef
(
IWineD3D
Base
Shader
*
iface
)
{
IWineD3DPixelShaderImpl
*
shader
=
(
IWineD3DPixelShaderImpl
*
)
iface
;
ULONG
refcount
=
InterlockedIncrement
(
&
shader
->
baseShader
.
ref
);
...
...
@@ -2029,7 +2028,7 @@ static ULONG STDMETHODCALLTYPE pixelshader_AddRef(IWineD3DPixelShader *iface)
}
/* Do not call while under the GL lock. */
static
ULONG
STDMETHODCALLTYPE
pixelshader_Release
(
IWineD3D
Pixel
Shader
*
iface
)
static
ULONG
STDMETHODCALLTYPE
pixelshader_Release
(
IWineD3D
Base
Shader
*
iface
)
{
IWineD3DPixelShaderImpl
*
shader
=
(
IWineD3DPixelShaderImpl
*
)
iface
;
ULONG
refcount
=
InterlockedDecrement
(
&
shader
->
baseShader
.
ref
);
...
...
@@ -2046,21 +2045,21 @@ static ULONG STDMETHODCALLTYPE pixelshader_Release(IWineD3DPixelShader *iface)
return
refcount
;
}
static
void
*
STDMETHODCALLTYPE
pixelshader_GetParent
(
IWineD3D
Pixel
Shader
*
iface
)
static
void
*
STDMETHODCALLTYPE
pixelshader_GetParent
(
IWineD3D
Base
Shader
*
iface
)
{
TRACE
(
"iface %p.
\n
"
,
iface
);
return
((
IWineD3DBaseShaderImpl
*
)
iface
)
->
baseShader
.
parent
;
}
static
HRESULT
STDMETHODCALLTYPE
pixelshader_GetFunction
(
IWineD3D
Pixel
Shader
*
iface
,
void
*
data
,
UINT
*
data_size
)
static
HRESULT
STDMETHODCALLTYPE
pixelshader_GetFunction
(
IWineD3D
Base
Shader
*
iface
,
void
*
data
,
UINT
*
data_size
)
{
TRACE
(
"iface %p, data %p, data_size %p.
\n
"
,
iface
,
data
,
data_size
);
return
shader_get_function
((
IWineD3DBaseShaderImpl
*
)
iface
,
data
,
data_size
);
}
static
HRESULT
STDMETHODCALLTYPE
pixelshader_SetLocalConstantsF
(
IWineD3D
Pixel
Shader
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
pixelshader_SetLocalConstantsF
(
IWineD3D
Base
Shader
*
iface
,
UINT
start_idx
,
const
float
*
src_data
,
UINT
count
)
{
TRACE
(
"iface %p, start_idx %u, src_data %p, count %u.
\n
"
,
iface
,
start_idx
,
src_data
,
count
);
...
...
@@ -2069,7 +2068,7 @@ static HRESULT STDMETHODCALLTYPE pixelshader_SetLocalConstantsF(IWineD3DPixelSha
start_idx
,
src_data
,
count
);
}
static
const
IWineD3D
Pixel
ShaderVtbl
IWineD3DPixelShader_Vtbl
=
static
const
IWineD3D
Base
ShaderVtbl
IWineD3DPixelShader_Vtbl
=
{
/* IUnknown methods */
pixelshader_QueryInterface
,
...
...
dlls/wined3d/stateblock.c
View file @
3d4fe0b7
...
...
@@ -501,7 +501,7 @@ ULONG CDECL wined3d_stateblock_decref(struct wined3d_stateblock *stateblock)
if
(
stateblock
->
state
.
vertex_shader
)
IWineD3DBaseShader_Release
((
IWineD3DBaseShader
*
)
stateblock
->
state
.
vertex_shader
);
if
(
stateblock
->
state
.
pixel_shader
)
IWineD3D
PixelShader_Release
((
IWineD3DPixel
Shader
*
)
stateblock
->
state
.
pixel_shader
);
IWineD3D
BaseShader_Release
((
IWineD3DBase
Shader
*
)
stateblock
->
state
.
pixel_shader
);
for
(
counter
=
0
;
counter
<
LIGHTMAP_SIZE
;
++
counter
)
{
...
...
@@ -860,9 +860,9 @@ HRESULT CDECL wined3d_stateblock_capture(struct wined3d_stateblock *stateblock)
if
(
stateblock
->
changed
.
pixelShader
&&
stateblock
->
state
.
pixel_shader
!=
src_state
->
pixel_shader
)
{
if
(
src_state
->
pixel_shader
)
IWineD3D
PixelShader_AddRef
((
IWineD3DPixel
Shader
*
)
src_state
->
pixel_shader
);
IWineD3D
BaseShader_AddRef
((
IWineD3DBase
Shader
*
)
src_state
->
pixel_shader
);
if
(
stateblock
->
state
.
pixel_shader
)
IWineD3D
PixelShader_Release
((
IWineD3DPixel
Shader
*
)
stateblock
->
state
.
pixel_shader
);
IWineD3D
BaseShader_Release
((
IWineD3DBase
Shader
*
)
stateblock
->
state
.
pixel_shader
);
stateblock
->
state
.
pixel_shader
=
src_state
->
pixel_shader
;
}
...
...
@@ -923,7 +923,7 @@ HRESULT CDECL wined3d_stateblock_apply(const struct wined3d_stateblock *stateblo
apply_lights
(
device
,
&
stateblock
->
state
);
if
(
stateblock
->
changed
.
pixelShader
)
IWineD3DDevice_SetPixelShader
(
device
,
(
IWineD3D
Pixel
Shader
*
)
stateblock
->
state
.
pixel_shader
);
IWineD3DDevice_SetPixelShader
(
device
,
(
IWineD3D
Base
Shader
*
)
stateblock
->
state
.
pixel_shader
);
/* Pixel Shader Constants. */
for
(
i
=
0
;
i
<
stateblock
->
num_contained_ps_consts_f
;
++
i
)
...
...
dlls/wined3d/wined3d_private.h
View file @
3d4fe0b7
...
...
@@ -2861,11 +2861,9 @@ struct ps_np2fixup_info {
WORD
num_consts
;
};
typedef
struct
IWineD3DPixelShaderImpl
{
/* IUnknown parts */
const
IWineD3DPixelShaderVtbl
*
lpVtbl
;
/* IWineD3DBaseShader */
typedef
struct
IWineD3DPixelShaderImpl
{
const
IWineD3DBaseShaderVtbl
*
lpVtbl
;
IWineD3DBaseShaderClass
baseShader
;
/* Pixel shader input semantics */
...
...
include/wine/wined3d.idl
View file @
3d4fe0b7
...
...
@@ -2405,15 +2405,6 @@ interface IWineD3DBaseShader : IWineD3DBase
[
object
,
local
,
uuid
(
818503
da
-
6
f30
-
11
d9
-
c687
-
00046142
c14f
)
]
interface
IWineD3DPixelShader
:
IWineD3DBaseShader
{
}
[
object
,
local
,
uuid
(
6
d10a2ce
-
09
d0
-
4
a53
-
a427
-
11388
f9f8ca5
)
]
interface
IWineD3DDevice
:
IUnknown
...
...
@@ -2552,7 +2543,7 @@ interface IWineD3DDevice : IUnknown
[
in
]
const
struct
wined3d_shader_signature
*
output_signature
,
[
in
]
void
*
parent
,
[
in
]
const
struct
wined3d_parent_ops
*
parent_ops
,
[
out
]
IWineD3D
Pixel
Shader
**
shader
[
out
]
IWineD3D
Base
Shader
**
shader
)
;
HRESULT
CreatePalette
(
[
in
]
DWORD
flags
,
...
...
@@ -2714,9 +2705,9 @@ interface IWineD3DDevice : IUnknown
[
out
]
PALETTEENTRY
*
entries
)
;
HRESULT
SetPixelShader
(
[
in
]
IWineD3D
Pixel
Shader
*
shader
[
in
]
IWineD3D
Base
Shader
*
shader
)
;
IWineD3D
Pixel
Shader
*
GetPixelShader
(
IWineD3D
Base
Shader
*
GetPixelShader
(
)
;
HRESULT
SetPixelShaderConstantB
(
[
in
]
UINT
start_register
,
...
...
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