wined3d: Cleanup shader constants code a little bit.

Improved bounds checking.
oldstable
H. Verbeet 2005-12-20 11:46:52 +01:00 committed by Alexandre Julliard
parent 5c6311688c
commit 4e7b2557b5
2 changed files with 211 additions and 212 deletions

View File

@ -3796,146 +3796,142 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetVertexShader(IWineD3DDevice *iface, IWineD3
return D3D_OK;
}
#define GET_SHADER_CONSTANT(_vertexshaderconstant, _count, _sizecount) \
count = min(_count, MAX_VSHADER_CONSTANTS - (StartRegister + 1)); \
if (NULL == pConstantData || count < 0 /* || _count != count */ ) \
return D3DERR_INVALIDCALL; \
memcpy(pConstantData, This->updateStateBlock->_vertexshaderconstant + (StartRegister * _sizecount), count * (sizeof(*pConstantData) * _sizecount));
#define SET_SHADER_CONSTANT(_vertexshaderconstant, _count, _sizecount) \
int count = min(_count, MAX_VSHADER_CONSTANTS - (StartRegister + 1)); \
if (NULL == pConstantData || count < 0 /* || _count != count */ ) \
return D3DERR_INVALIDCALL; \
memcpy(This->updateStateBlock->_vertexshaderconstant + (StartRegister * _sizecount), pConstantData, count * (sizeof(*pConstantData) * _sizecount)); \
This->updateStateBlock->changed.vertexShader = TRUE; \
This->updateStateBlock->set.vertexShader = TRUE;
HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstantB(IWineD3DDevice *iface, UINT StartRegister, CONST BOOL *pConstantData, UINT BoolCount){
HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstant(IWineD3DDevice *iface, void *dstData, const void *srcData, UINT type, UINT start, UINT count, UINT registersize) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i;
SET_SHADER_CONSTANT(vertexShaderConstantB, BoolCount, 1);
/* populate the bitmap that says which constant type we should load */
for (i = StartRegister; i < BoolCount + StartRegister; ++i) {
int i;
int cnt = min(count, MAX_VSHADER_CONSTANTS - (start + 1));
TRACE("(iface %p, dstData %p, srcData %p, type %d, start %d, count %d, registersize %d)\n",
iface, dstData, srcData, type, start, count, registersize);
if (type != WINESHADERCNST_NONE) {
if (srcData == NULL || cnt < 0) {
return D3DERR_INVALIDCALL;
}
CopyMemory((char *)dstData + (start * registersize), srcData, cnt * registersize);
}
for (i = start; i < cnt + start; ++i) {
This->updateStateBlock->changed.vertexShaderConstants[i] = TRUE;
This->updateStateBlock->set.vertexShaderConstants[i] = TRUE;
This->updateStateBlock->vertexShaderConstantT[i] = WINESHADERCNST_BOOL;
TRACE("(%p) : Setting vsb %d to %d\n", This->updateStateBlock, i, pConstantData[i - StartRegister]);
This->updateStateBlock->vertexShaderConstantT[i] = type;
}
return D3D_OK;
}
HRESULT WINAPI IWineD3DDeviceImpl_GetVertexShaderConstant(IWineD3DDevice *iface, void *dstData, const void *srcData, UINT type, UINT start, UINT count, UINT registersize) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i;
int cnt = min(count, MAX_VSHADER_CONSTANTS - (start + 1));
TRACE("(iface %p, dstData %p, srcData %p, type %d, start %d, count %d, registersize %d)\n",
iface, dstData, srcData, type, start, count, registersize);
/* Verify that the requested shader constant was populated with the correct type */
for (i = start; i < cnt + start; ++i) {
if (This->updateStateBlock->vertexShaderConstantT[i] != type) {
TRACE("(%p) : Caller requested 0x%x while type is 0x%x. Returning D3DERR_INVALIDCALL\n",
This, type, This->updateStateBlock->vertexShaderConstantT[i]);
return D3DERR_INVALIDCALL;
}
}
if (dstData == NULL || cnt < 0) {
return D3DERR_INVALIDCALL;
}
CopyMemory(dstData, (char *)srcData + (start * registersize), cnt * registersize);
return D3D_OK;
}
HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstantB(IWineD3DDevice *iface, UINT StartRegister, CONST BOOL *pConstantData, UINT BoolCount){
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
return IWineD3DDeviceImpl_SetVertexShaderConstant(iface,
This->updateStateBlock->vertexShaderConstantB,
pConstantData,
WINESHADERCNST_BOOL,
StartRegister,
BoolCount,
sizeof(*pConstantData));
}
HRESULT WINAPI IWineD3DDeviceImpl_GetVertexShaderConstantB(IWineD3DDevice *iface, UINT StartRegister, BOOL *pConstantData, UINT BoolCount){
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i, count;
/* verify that the requested shader constant was populated with a boolean */
for (i = StartRegister; i < BoolCount; ++i) {
if (This->updateStateBlock->vertexShaderConstantT[i] != WINESHADERCNST_BOOL) {
/* the constant for this register isn't a boolean */
WARN("(%p) : Caller requested a boolean where stateblock (%p) entry is a %s. Returning D3DERR_INVALIDCALL\n", This,This->updateStateBlock,
This->updateStateBlock->vertexShaderConstantT[i] == WINESHADERCNST_INTEGER ? "integer" : "float");
return D3DERR_INVALIDCALL;
}
}
GET_SHADER_CONSTANT(vertexShaderConstantB, BoolCount, 1);
return D3D_OK;
return IWineD3DDeviceImpl_GetVertexShaderConstant(iface,
pConstantData,
This->updateStateBlock->vertexShaderConstantB,
WINESHADERCNST_BOOL,
StartRegister,
BoolCount,
sizeof(*pConstantData));
}
HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstantI(IWineD3DDevice *iface, UINT StartRegister, CONST int *pConstantData, UINT Vector4iCount){
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i;
SET_SHADER_CONSTANT(vertexShaderConstantI, Vector4iCount, 4);
/* populate the bitmap that says which constant type we should load */
for (i = StartRegister; i < StartRegister + Vector4iCount; ++i) {
This->updateStateBlock->changed.vertexShaderConstants[i] = TRUE;
This->updateStateBlock->set.vertexShaderConstants[i] = TRUE;
This->updateStateBlock->vertexShaderConstantT[i] = WINESHADERCNST_INTEGER;
TRACE("(%p) : Setting vsi %d to %d\n", This->updateStateBlock, i, pConstantData[i - StartRegister]);
}
return D3D_OK;
return IWineD3DDeviceImpl_SetVertexShaderConstant(iface,
This->updateStateBlock->vertexShaderConstantI,
pConstantData,
WINESHADERCNST_INTEGER,
StartRegister,
Vector4iCount,
4 * sizeof(*pConstantData));
}
HRESULT WINAPI IWineD3DDeviceImpl_GetVertexShaderConstantI(IWineD3DDevice *iface, UINT StartRegister, int *pConstantData, UINT Vector4iCount){
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i, count;
/* verify that the requested shader constant was populated with a integer */
for (i = StartRegister; i < Vector4iCount; ++i) {
if (This->updateStateBlock->vertexShaderConstantT[i] != WINESHADERCNST_INTEGER) {
/* the constant for this register isn't a integer */
WARN("(%p) : Caller requested a integer where stateblock (%p) entry is a %s. Returning D3DERR_INVALIDCALL\n", This, This->updateStateBlock,
This->updateStateBlock->vertexShaderConstantT[i] == WINESHADERCNST_BOOL ? "boolean" : "float");
return D3DERR_INVALIDCALL;
}
}
GET_SHADER_CONSTANT(vertexShaderConstantI, Vector4iCount, 4);
return D3D_OK;
return IWineD3DDeviceImpl_GetVertexShaderConstant(iface,
pConstantData,
This->updateStateBlock->vertexShaderConstantI,
WINESHADERCNST_INTEGER,
StartRegister,
Vector4iCount,
4 * sizeof(*pConstantData));
}
HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstantF(IWineD3DDevice *iface, UINT StartRegister, CONST float *pConstantData, UINT Vector4fCount){
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i;
SET_SHADER_CONSTANT(vertexShaderConstantF, Vector4fCount, 4);
/* populate the bitmap that says which constant type we should load */
for (i = StartRegister; i < StartRegister + Vector4fCount; ++i) {
This->updateStateBlock->changed.vertexShaderConstants[i] = TRUE;
This->updateStateBlock->set.vertexShaderConstants[i] = TRUE;
This->updateStateBlock->vertexShaderConstantT[i] = WINESHADERCNST_FLOAT;
TRACE("(%p) : Setting vsf %d to %f\n", This->updateStateBlock, i, pConstantData[i - StartRegister]);
}
return D3D_OK;
return IWineD3DDeviceImpl_SetVertexShaderConstant(iface,
This->updateStateBlock->vertexShaderConstantF,
pConstantData,
WINESHADERCNST_FLOAT,
StartRegister,
Vector4fCount,
4 * sizeof(*pConstantData));
}
HRESULT WINAPI IWineD3DDeviceImpl_GetVertexShaderConstantF(IWineD3DDevice *iface, UINT StartRegister, float *pConstantData, UINT Vector4fCount){
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i, count;
/* verify that the requested shader constant was populated with a float */
for (i = StartRegister; i < Vector4fCount; ++i) {
if (This->updateStateBlock->vertexShaderConstantT[i] != WINESHADERCNST_FLOAT) {
/* the constant for this register isn't a float */
WARN("(%p) : Caller requested a float where stateblock (%p) entry is a %s. Returning D3DERR_INVALIDCALL\n", This, This->updateStateBlock,
This->updateStateBlock->vertexShaderConstantT[i] == WINESHADERCNST_BOOL ? "boolean" : "integer");
return D3DERR_INVALIDCALL;
}
}
GET_SHADER_CONSTANT(vertexShaderConstantF, Vector4fCount, 4);
return D3D_OK;
return IWineD3DDeviceImpl_GetVertexShaderConstant(iface,
pConstantData,
This->updateStateBlock->vertexShaderConstantF,
WINESHADERCNST_FLOAT,
StartRegister,
Vector4fCount,
4 * sizeof(*pConstantData));
}
HRESULT WINAPI IWineD3DDeviceImpl_SetVertexShaderConstantN(IWineD3DDevice *iface, UINT StartRegister, UINT VectorNCount){
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i;
/* populate the bitmap that says which constant type we should load */
for (i = StartRegister; i < StartRegister + VectorNCount; ++i) {
This->updateStateBlock->changed.vertexShaderConstants[i] = TRUE;
This->updateStateBlock->set.vertexShaderConstants[i] = TRUE;
This->updateStateBlock->vertexShaderConstantT[i] = WINESHADERCNST_NONE;
TRACE("(%p) : Setting vsf %d\n", This, i);
}
return D3D_OK;
return IWineD3DDeviceImpl_SetVertexShaderConstant(iface,
NULL,
NULL,
WINESHADERCNST_NONE,
StartRegister,
VectorNCount,
0);
}
#undef SET_SHADER_CONSTANT
#undef GET_SHADER_CONSTANT
HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShader(IWineD3DDevice *iface, IWineD3DPixelShader *pShader) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
IWineD3DPixelShader *oldShader = This->updateStateBlock->pixelShader;
@ -3979,150 +3975,141 @@ HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShader(IWineD3DDevice *iface, IWineD3D
return D3D_OK;
}
#define GET_SHADER_CONSTANT(_pixelshaderconstant, _count, _sizecount) \
count = min(_count, MAX_PSHADER_CONSTANTS - (StartRegister + 1)); \
if (NULL == pConstantData || count < 0 /* || _count != count */ ) \
return D3DERR_INVALIDCALL; \
memcpy(pConstantData, This->updateStateBlock->_pixelshaderconstant + (StartRegister * _sizecount), count * (sizeof(*pConstantData) * _sizecount)); \
#define SET_SHADER_CONSTANT(_pixelshaderconstant, _count, _sizecount) \
int count = min(_count, MAX_PSHADER_CONSTANTS - (StartRegister + 1)); \
if (NULL == pConstantData || count < 0 /* || _count != count */ ) \
return D3DERR_INVALIDCALL; \
memcpy(This->updateStateBlock->_pixelshaderconstant + (StartRegister * _sizecount), pConstantData, count * (sizeof(*pConstantData) * _sizecount));
HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstantB(IWineD3DDevice *iface, UINT StartRegister, CONST BOOL *pConstantData, UINT BoolCount) {
HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstant(IWineD3DDevice *iface, void *dstData, const void *srcData, UINT type, UINT start, UINT count, UINT registersize) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i;
int cnt = min(count, MAX_PSHADER_CONSTANTS - (start + 1));
SET_SHADER_CONSTANT(pixelShaderConstantB, BoolCount, 1);
TRACE("(iface %p, dstData %p, srcData %p, type %d, start %d, count %d, registersize %d)\n",
iface, dstData, srcData, type, start, count, registersize);
/* populate the bitmap that says which constant type we should load */
for (i = StartRegister; i < BoolCount + StartRegister; ++i) {
if (type != WINESHADERCNST_NONE) {
if (srcData == NULL || cnt < 0) {
return D3DERR_INVALIDCALL;
}
CopyMemory((char *)dstData + (start * registersize), srcData, cnt * registersize);
}
for (i = start; i < cnt + start; ++i) {
This->updateStateBlock->changed.pixelShaderConstants[i] = TRUE;
This->updateStateBlock->set.pixelShaderConstants[i] = TRUE;
This->updateStateBlock->pixelShaderConstantT[i] = WINESHADERCNST_BOOL;
TRACE("(%p) : Setting psb %d to %d\n", This->updateStateBlock, i, pConstantData[i - StartRegister]);
This->updateStateBlock->pixelShaderConstantT[i] = type;
}
return D3D_OK;
}
HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShaderConstant(IWineD3DDevice *iface, void *dstData, const void *srcData, UINT type, UINT start, UINT count, UINT registersize) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i;
int cnt = min(count, MAX_PSHADER_CONSTANTS - (start + 1));
TRACE("(iface %p, dstData %p, srcData %p, type %d, start %d, count %d, registersize %d)\n",
iface, dstData, srcData, type, start, count, registersize);
/* Verify that the requested shader constant was populated with the correct type */
for (i = start; i < cnt + start; ++i) {
if (This->updateStateBlock->pixelShaderConstantT[i] != type) {
TRACE("(%p) : Caller requested 0x%x while type is 0x%x. Returning D3DERR_INVALIDCALL\n",
This, type, This->updateStateBlock->pixelShaderConstantT[i]);
return D3DERR_INVALIDCALL;
}
}
if (dstData == NULL || cnt < 0) {
return D3DERR_INVALIDCALL;
}
CopyMemory(dstData, (char *)srcData + (start * registersize), cnt * registersize);
return D3D_OK;
}
HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstantB(IWineD3DDevice *iface, UINT StartRegister, CONST BOOL *pConstantData, UINT BoolCount) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
return IWineD3DDeviceImpl_SetPixelShaderConstant(iface,
This->updateStateBlock->pixelShaderConstantB,
pConstantData,
WINESHADERCNST_BOOL,
StartRegister,
BoolCount,
sizeof(*pConstantData));
}
HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShaderConstantB(IWineD3DDevice *iface, UINT StartRegister, BOOL *pConstantData, UINT BoolCount) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i, count;
/* verify that the requested shader constant was populated with a integer */
for (i = StartRegister; i < BoolCount; ++i) {
if (WINESHADERCNST_BOOL != This->updateStateBlock->pixelShaderConstantT[i]) {
/* the constant for this register isn't a boolean */
WARN("(%p) : Caller requested a integer where stateblock (%p) entry is a %s. Returning D3DERR_INVALIDCALL\n", This, This->updateStateBlock,
WINESHADERCNST_INTEGER == This->updateStateBlock->vertexShaderConstantT[i] ? "integer" : "float");
return D3DERR_INVALIDCALL;
}
}
GET_SHADER_CONSTANT(pixelShaderConstantB, BoolCount, 1);
return D3D_OK;
return IWineD3DDeviceImpl_GetPixelShaderConstant(iface,
pConstantData,
This->updateStateBlock->pixelShaderConstantB,
WINESHADERCNST_BOOL,
StartRegister,
BoolCount,
sizeof(*pConstantData));
}
HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstantI(IWineD3DDevice *iface, UINT StartRegister, CONST int *pConstantData, UINT Vector4iCount) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i;
SET_SHADER_CONSTANT(pixelShaderConstantI, Vector4iCount, 4);
/* populate the bitmap that says which constant type we should load */
for (i = StartRegister; i < Vector4iCount + StartRegister; ++i) {
This->updateStateBlock->changed.pixelShaderConstants[i] = TRUE;
This->updateStateBlock->set.pixelShaderConstants[i] = TRUE;
This->updateStateBlock->pixelShaderConstantT[i] = WINESHADERCNST_INTEGER;
TRACE("(%p) : Setting psb %d to %d\n", This->updateStateBlock, i, pConstantData[i - StartRegister]);
}
return D3D_OK;
return IWineD3DDeviceImpl_SetPixelShaderConstant(iface,
This->updateStateBlock->pixelShaderConstantI,
pConstantData,
WINESHADERCNST_INTEGER,
StartRegister,
Vector4iCount,
4 * sizeof(*pConstantData));
}
HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShaderConstantI(IWineD3DDevice *iface, UINT StartRegister, int *pConstantData, UINT Vector4iCount) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i, count;
/* verify that the requested shader constant was populated with a integer */
for (i = StartRegister; i < Vector4iCount; ++i) {
if (WINESHADERCNST_INTEGER != This->updateStateBlock->pixelShaderConstantT[i]) {
/* the constant for this register isn't a integer */
WARN("(%p) : Caller requested a integer where stateblock (%p) entry is a %s. Returning D3DERR_INVALIDCALL\n", This, This->updateStateBlock,
WINESHADERCNST_BOOL == This->updateStateBlock->vertexShaderConstantT[i] ? "boolean" : "float");
return D3DERR_INVALIDCALL;
}
}
GET_SHADER_CONSTANT(pixelShaderConstantI, Vector4iCount, 4);
return D3D_OK;
return IWineD3DDeviceImpl_GetPixelShaderConstant(iface,
pConstantData,
This->updateStateBlock->pixelShaderConstantI,
WINESHADERCNST_INTEGER,
StartRegister,
Vector4iCount,
4 * sizeof(*pConstantData));
}
HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstantF(IWineD3DDevice *iface, UINT StartRegister, CONST float *pConstantData, UINT Vector4fCount) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i;
SET_SHADER_CONSTANT(pixelShaderConstantF, Vector4fCount, 4);
/* populate the bitmap that says which constant type we should load */
for (i = StartRegister; i < Vector4fCount + StartRegister; ++i) {
This->updateStateBlock->changed.pixelShaderConstants[i] = TRUE;
This->updateStateBlock->set.pixelShaderConstants[i] = TRUE;
This->updateStateBlock->pixelShaderConstantT[i] = WINESHADERCNST_FLOAT;
TRACE("(%p) : Setting psb %d to %f\n", This->updateStateBlock, i, pConstantData[i - StartRegister]);
}
return D3D_OK;
return IWineD3DDeviceImpl_SetPixelShaderConstant(iface,
This->updateStateBlock->pixelShaderConstantF,
pConstantData,
WINESHADERCNST_FLOAT,
StartRegister,
Vector4fCount,
4 * sizeof(*pConstantData));
}
HRESULT WINAPI IWineD3DDeviceImpl_GetPixelShaderConstantF(IWineD3DDevice *iface, UINT StartRegister, float *pConstantData, UINT Vector4fCount) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i, count;
/* verify that the requested shader constant was populated with a integer */
for (i = StartRegister; i < Vector4fCount; ++i) {
if (WINESHADERCNST_FLOAT != This->updateStateBlock->pixelShaderConstantT[i]) {
/* the constant for this register isn't a float */
WARN("(%p) : Caller requested a integer where stateblock (%p) entry is a %s. Returning D3DERR_INVALIDCALL\n", This, This->updateStateBlock,
WINESHADERCNST_BOOL == This->updateStateBlock->vertexShaderConstantT[i] ? "boolean" : "integer");
return D3DERR_INVALIDCALL;
}
}
GET_SHADER_CONSTANT(pixelShaderConstantF, Vector4fCount, 4);
return D3D_OK;
return IWineD3DDeviceImpl_GetPixelShaderConstant(iface,
pConstantData,
This->updateStateBlock->pixelShaderConstantF,
WINESHADERCNST_FLOAT,
StartRegister,
Vector4fCount,
4 * sizeof(*pConstantData));
}
HRESULT WINAPI IWineD3DDeviceImpl_SetPixelShaderConstantN(IWineD3DDevice *iface, UINT StartRegister, UINT VectorNCount){
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
int i;
/* populate the bitmap that says which constant type we should load */
for (i = StartRegister; i < StartRegister + VectorNCount; ++i) {
This->updateStateBlock->changed.pixelShaderConstants[i] = TRUE;
This->updateStateBlock->set.pixelShaderConstants[i] = TRUE;
This->updateStateBlock->pixelShaderConstantT[i] = WINESHADERCNST_NONE;
TRACE("(%p) : Setting vsf %d\n", This, i);
}
return D3D_OK;
return IWineD3DDeviceImpl_SetPixelShaderConstant(iface,
NULL,
NULL,
WINESHADERCNST_NONE,
StartRegister,
VectorNCount,
0);
}
#undef SET_SHADER_CONSTANT
#undef GET_SHADER_CONSTANT
HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface, UINT SrcStartIndex, UINT DestIndex, UINT VertexCount, IWineD3DVertexBuffer* pDestBuffer, IWineD3DVertexBuffer* pVertexDecl, DWORD Flags) {
IWineD3DDeviceImpl *This = (IWineD3DDeviceImpl *)iface;
FIXME("(%p) : stub\n", This);
@ -6456,6 +6443,8 @@ const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
IWineD3DDeviceImpl_GetPaletteEntries,
IWineD3DDeviceImpl_SetPixelShader,
IWineD3DDeviceImpl_GetPixelShader,
IWineD3DDeviceImpl_SetPixelShaderConstant,
IWineD3DDeviceImpl_GetPixelShaderConstant,
IWineD3DDeviceImpl_SetPixelShaderConstantB,
IWineD3DDeviceImpl_GetPixelShaderConstantB,
IWineD3DDeviceImpl_SetPixelShaderConstantI,
@ -6487,6 +6476,8 @@ const IWineD3DDeviceVtbl IWineD3DDevice_Vtbl =
IWineD3DDeviceImpl_GetVertexDeclaration,
IWineD3DDeviceImpl_SetVertexShader,
IWineD3DDeviceImpl_GetVertexShader,
IWineD3DDeviceImpl_SetVertexShaderConstant,
IWineD3DDeviceImpl_GetVertexShaderConstant,
IWineD3DDeviceImpl_SetVertexShaderConstantB,
IWineD3DDeviceImpl_GetVertexShaderConstantB,
IWineD3DDeviceImpl_SetVertexShaderConstantI,

View File

@ -326,6 +326,8 @@ DECLARE_INTERFACE_(IWineD3DDevice,IUnknown)
STDMETHOD(GetPaletteEntries)(THIS_ UINT PaletteNumber,PALETTEENTRY* pEntries) PURE;
STDMETHOD(SetPixelShader)(THIS_ struct IWineD3DPixelShader *pShader) PURE;
STDMETHOD(GetPixelShader)(THIS_ struct IWineD3DPixelShader **ppShader) PURE;
STDMETHOD(SetPixelShaderConstant)(THIS_ void *dstData, const void *srcData, UINT type, UINT start, UINT count, UINT countsize);
STDMETHOD(GetPixelShaderConstant)(THIS_ void *dstData, const void *srcData, UINT type, UINT start, UINT count, UINT countsize);
STDMETHOD(SetPixelShaderConstantB)(THIS_ UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount) PURE;
STDMETHOD(GetPixelShaderConstantB)(THIS_ UINT StartRegister, BOOL* pConstantData, UINT BoolCount) PURE;
STDMETHOD(SetPixelShaderConstantI)(THIS_ UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) PURE;
@ -357,6 +359,8 @@ DECLARE_INTERFACE_(IWineD3DDevice,IUnknown)
STDMETHOD(GetVertexDeclaration)(THIS_ struct IWineD3DVertexDeclaration** ppDecl) PURE;
STDMETHOD(SetVertexShader)(THIS_ struct IWineD3DVertexShader* pShader) PURE;
STDMETHOD(GetVertexShader)(THIS_ struct IWineD3DVertexShader** ppShader) PURE;
STDMETHOD(SetVertexShaderConstant)(THIS_ void *dstData, const void *srcData, UINT type, UINT start, UINT count, UINT countsize);
STDMETHOD(GetVertexShaderConstant)(THIS_ void *dstData, const void *srcData, UINT type, UINT start, UINT count, UINT countsize);
STDMETHOD(SetVertexShaderConstantB)(THIS_ UINT StartRegister, CONST BOOL* pConstantData, UINT BoolCount) PURE;
STDMETHOD(GetVertexShaderConstantB)(THIS_ UINT StartRegister, BOOL* pConstantData, UINT BoolCount) PURE;
STDMETHOD(SetVertexShaderConstantI)(THIS_ UINT StartRegister, CONST int* pConstantData, UINT Vector4iCount) PURE;
@ -456,6 +460,8 @@ DECLARE_INTERFACE_(IWineD3DDevice,IUnknown)
#define IWineD3DDevice_GetPaletteEntries(p,a,b) (p)->lpVtbl->GetPaletteEntries(p,a,b)
#define IWineD3DDevice_SetPixelShader(p,a) (p)->lpVtbl->SetPixelShader(p,a)
#define IWineD3DDevice_GetPixelShader(p,a) (p)->lpVtbl->GetPixelShader(p,a)
#define IWineD3DDevice_SetPixelShaderConstant(p,a,b,c,d,e,f); (p)->lpVtbl->SetPixelShaderConstant(p,a,b,c,d,e,f)
#define IWineD3DDevice_GetPixelShaderConstant(p,a,b,c,d,e,f); (p)->lpVtbl->GetPixelShaderConstant(p,a,b,c,d,e,f)
#define IWineD3DDevice_SetPixelShaderConstantB(p,a,b,c) (p)->lpVtbl->SetPixelShaderConstantB(p,a,b,c)
#define IWineD3DDevice_GetPixelShaderConstantB(p,a,b,c) (p)->lpVtbl->GetPixelShaderConstantB(p,a,b,c)
#define IWineD3DDevice_SetPixelShaderConstantI(p,a,b,c) (p)->lpVtbl->SetPixelShaderConstantI(p,a,b,c)
@ -489,6 +495,8 @@ DECLARE_INTERFACE_(IWineD3DDevice,IUnknown)
#define IWineD3DDevice_GetVertexDeclaration(p,a) (p)->lpVtbl->GetVertexDeclaration(p,a)
#define IWineD3DDevice_SetVertexShader(p,a) (p)->lpVtbl->SetVertexShader(p,a)
#define IWineD3DDevice_GetVertexShader(p,a) (p)->lpVtbl->GetVertexShader(p,a)
#define IWineD3DDevice_SetVertexShaderConstant(p,a,b,c,d,e,f); (p)->lpVtbl->SetVertexShaderConstant(p,a,b,c,d,e,f)
#define IWineD3DDevice_GetVertexShaderConstant(p,a,b,c,d,e,f); (p)->lpVtbl->GetVertexShaderConstant(p,a,b,c,d,e,f)
#define IWineD3DDevice_SetVertexShaderConstantB(p,a,b,c) (p)->lpVtbl->SetVertexShaderConstantB(p,a,b,c)
#define IWineD3DDevice_GetVertexShaderConstantB(p,a,b,c) (p)->lpVtbl->GetVertexShaderConstantB(p,a,b,c)
#define IWineD3DDevice_SetVertexShaderConstantI(p,a,b,c) (p)->lpVtbl->SetVertexShaderConstantI(p,a,b,c)