mirror of
https://github.com/reactos/wine.git
synced 2025-02-14 01:31:43 +00:00
wined3d: Remove unused attributes from WineDirect3DVertexStridedData.
These are essentially unused, and mostly just complicate the code.
This commit is contained in:
parent
8a0fc70584
commit
6afd97cc9f
@ -4703,14 +4703,6 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ProcessVertices(IWineD3DDevice *iface,
|
||||
for(i = 0; i < WINED3DDP_MAXTEXCOORD; i++) {
|
||||
FIXSRC(texCoords[i]);
|
||||
}
|
||||
FIXSRC(position2);
|
||||
FIXSRC(normal2);
|
||||
FIXSRC(tangent);
|
||||
FIXSRC(binormal);
|
||||
FIXSRC(tessFactor);
|
||||
FIXSRC(fog);
|
||||
FIXSRC(depth);
|
||||
FIXSRC(sample);
|
||||
#undef FIXSRC
|
||||
}
|
||||
|
||||
|
@ -57,22 +57,6 @@ static BOOL fixed_get_input(
|
||||
*regnum = 6;
|
||||
else if (usage == WINED3DDECLUSAGE_TEXCOORD && usage_idx < WINED3DDP_MAXTEXCOORD)
|
||||
*regnum = 7 + usage_idx;
|
||||
else if ((usage == WINED3DDECLUSAGE_POSITION || usage == WINED3DDECLUSAGE_POSITIONT) && usage_idx == 1)
|
||||
*regnum = 7 + WINED3DDP_MAXTEXCOORD;
|
||||
else if (usage == WINED3DDECLUSAGE_NORMAL && usage_idx == 1)
|
||||
*regnum = 8 + WINED3DDP_MAXTEXCOORD;
|
||||
else if (usage == WINED3DDECLUSAGE_TANGENT && usage_idx == 0)
|
||||
*regnum = 9 + WINED3DDP_MAXTEXCOORD;
|
||||
else if (usage == WINED3DDECLUSAGE_BINORMAL && usage_idx == 0)
|
||||
*regnum = 10 + WINED3DDP_MAXTEXCOORD;
|
||||
else if (usage == WINED3DDECLUSAGE_TESSFACTOR && usage_idx == 0)
|
||||
*regnum = 11 + WINED3DDP_MAXTEXCOORD;
|
||||
else if (usage == WINED3DDECLUSAGE_FOG && usage_idx == 0)
|
||||
*regnum = 12 + WINED3DDP_MAXTEXCOORD;
|
||||
else if (usage == WINED3DDECLUSAGE_DEPTH && usage_idx == 0)
|
||||
*regnum = 13 + WINED3DDP_MAXTEXCOORD;
|
||||
else if (usage == WINED3DDECLUSAGE_SAMPLE && usage_idx == 0)
|
||||
*regnum = 14 + WINED3DDP_MAXTEXCOORD;
|
||||
|
||||
if (*regnum == -1) {
|
||||
FIXME("Unsupported input stream [usage=%s, usage_idx=%u]\n",
|
||||
@ -742,46 +726,6 @@ static inline void remove_vbos(IWineD3DDeviceImpl *This, WineDirect3DVertexStrid
|
||||
s->u.s.texCoords[i].lpData = (BYTE *) ((unsigned long) s->u.s.texCoords[i].lpData + (unsigned long) vb->resource.allocatedMemory);
|
||||
}
|
||||
}
|
||||
if(s->u.s.position2.VBO) {
|
||||
vb = (struct wined3d_buffer *)This->stateBlock->streamSource[s->u.s.position2.streamNo];
|
||||
s->u.s.position2.VBO = 0;
|
||||
s->u.s.position2.lpData = (BYTE *) ((unsigned long) s->u.s.position2.lpData + (unsigned long) vb->resource.allocatedMemory);
|
||||
}
|
||||
if(s->u.s.normal2.VBO) {
|
||||
vb = (struct wined3d_buffer *)This->stateBlock->streamSource[s->u.s.normal2.streamNo];
|
||||
s->u.s.normal2.VBO = 0;
|
||||
s->u.s.normal2.lpData = (BYTE *) ((unsigned long) s->u.s.normal2.lpData + (unsigned long) vb->resource.allocatedMemory);
|
||||
}
|
||||
if(s->u.s.tangent.VBO) {
|
||||
vb = (struct wined3d_buffer *)This->stateBlock->streamSource[s->u.s.tangent.streamNo];
|
||||
s->u.s.tangent.VBO = 0;
|
||||
s->u.s.tangent.lpData = (BYTE *) ((unsigned long) s->u.s.tangent.lpData + (unsigned long) vb->resource.allocatedMemory);
|
||||
}
|
||||
if(s->u.s.binormal.VBO) {
|
||||
vb = (struct wined3d_buffer *)This->stateBlock->streamSource[s->u.s.binormal.streamNo];
|
||||
s->u.s.binormal.VBO = 0;
|
||||
s->u.s.binormal.lpData = (BYTE *) ((unsigned long) s->u.s.binormal.lpData + (unsigned long) vb->resource.allocatedMemory);
|
||||
}
|
||||
if(s->u.s.tessFactor.VBO) {
|
||||
vb = (struct wined3d_buffer *)This->stateBlock->streamSource[s->u.s.tessFactor.streamNo];
|
||||
s->u.s.tessFactor.VBO = 0;
|
||||
s->u.s.tessFactor.lpData = (BYTE *) ((unsigned long) s->u.s.tessFactor.lpData + (unsigned long) vb->resource.allocatedMemory);
|
||||
}
|
||||
if(s->u.s.fog.VBO) {
|
||||
vb = (struct wined3d_buffer *)This->stateBlock->streamSource[s->u.s.fog.streamNo];
|
||||
s->u.s.fog.VBO = 0;
|
||||
s->u.s.fog.lpData = (BYTE *) ((unsigned long) s->u.s.fog.lpData + (unsigned long) vb->resource.allocatedMemory);
|
||||
}
|
||||
if(s->u.s.depth.VBO) {
|
||||
vb = (struct wined3d_buffer *)This->stateBlock->streamSource[s->u.s.depth.streamNo];
|
||||
s->u.s.depth.VBO = 0;
|
||||
s->u.s.depth.lpData = (BYTE *) ((unsigned long) s->u.s.depth.lpData + (unsigned long) vb->resource.allocatedMemory);
|
||||
}
|
||||
if(s->u.s.sample.VBO) {
|
||||
vb = (struct wined3d_buffer *)This->stateBlock->streamSource[s->u.s.sample.streamNo];
|
||||
s->u.s.sample.VBO = 0;
|
||||
s->u.s.sample.lpData = (BYTE *) ((unsigned long) s->u.s.sample.lpData + (unsigned long) vb->resource.allocatedMemory);
|
||||
}
|
||||
}
|
||||
|
||||
/* Routine common to the draw primitive and draw indexed primitive routines */
|
||||
|
@ -4243,14 +4243,6 @@ static inline void drawPrimitiveTraceDataLocations(const WineDirect3DVertexStrid
|
||||
TRACE_STRIDED((dataLocations), texCoords[5]);
|
||||
TRACE_STRIDED((dataLocations), texCoords[6]);
|
||||
TRACE_STRIDED((dataLocations), texCoords[7]);
|
||||
TRACE_STRIDED((dataLocations), position2);
|
||||
TRACE_STRIDED((dataLocations), normal2);
|
||||
TRACE_STRIDED((dataLocations), tangent);
|
||||
TRACE_STRIDED((dataLocations), binormal);
|
||||
TRACE_STRIDED((dataLocations), tessFactor);
|
||||
TRACE_STRIDED((dataLocations), fog);
|
||||
TRACE_STRIDED((dataLocations), depth);
|
||||
TRACE_STRIDED((dataLocations), sample);
|
||||
|
||||
return;
|
||||
}
|
||||
@ -4333,20 +4325,6 @@ static void streamsrc(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
|
||||
loadVertexData(stateblock, dataLocations);
|
||||
context->namedArraysLoaded = TRUE;
|
||||
}
|
||||
|
||||
/* Generate some fixme's if unsupported functionality is being used */
|
||||
#define BUFFER_OR_DATA(_attribute) dataLocations->u.s._attribute.lpData
|
||||
/* TODO: Either support missing functionality in fixupVertices or by creating a shader to replace the pipeline. */
|
||||
if (!useVertexShaderFunction && (BUFFER_OR_DATA(position2) || BUFFER_OR_DATA(normal2))) {
|
||||
FIXME("Tweening is only valid with vertex shaders\n");
|
||||
}
|
||||
if (!useVertexShaderFunction && BUFFER_OR_DATA(binormal)) {
|
||||
FIXME("Binormal bump mapping is only valid with vertex shaders\n");
|
||||
}
|
||||
if (!useVertexShaderFunction && (BUFFER_OR_DATA(tessFactor) || BUFFER_OR_DATA(fog) || BUFFER_OR_DATA(depth) || BUFFER_OR_DATA(sample))) {
|
||||
FIXME("Extended attributes are only valid with vertex shaders\n");
|
||||
}
|
||||
#undef BUFFER_OR_DATA
|
||||
}
|
||||
|
||||
static void vertexdeclaration(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
|
||||
|
@ -1945,15 +1945,6 @@ typedef struct WineDirect3DVertexStridedData
|
||||
WineDirect3DStridedData diffuse;
|
||||
WineDirect3DStridedData specular;
|
||||
WineDirect3DStridedData texCoords[WINED3DDP_MAXTEXCOORD];
|
||||
WineDirect3DStridedData position2; /* tween data */
|
||||
WineDirect3DStridedData normal2; /* tween data */
|
||||
WineDirect3DStridedData tangent;
|
||||
WineDirect3DStridedData binormal;
|
||||
WineDirect3DStridedData tessFactor;
|
||||
WineDirect3DStridedData fog;
|
||||
WineDirect3DStridedData depth;
|
||||
WineDirect3DStridedData sample;
|
||||
|
||||
/* Add fields here */
|
||||
} s;
|
||||
WineDirect3DStridedData input[16]; /* Indexed by constants in D3DVSDE_REGISTER */
|
||||
|
Loading…
x
Reference in New Issue
Block a user