Commit 7a1d35e5 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Emulate half float vertices if GL_NV_half_float is not there.

parent 7e9af243
......@@ -2884,6 +2884,11 @@ static inline void loadNumberedArrays(IWineD3DStateBlockImpl *stateblock, WineDi
/* Default to no instancing */
stateblock->wineD3DDevice->instancedDraw = FALSE;
if(((IWineD3DVertexDeclarationImpl *)stateblock->vertexDecl)->half_float_used && !GL_SUPPORT(NV_HALF_FLOAT)) {
/* This will be handled using drawStridedSlow */
return;
}
for (i = 0; i < MAX_ATTRIBS; i++) {
if (!strided->u.input[i].lpData && !strided->u.input[i].VBO)
......@@ -2997,6 +3002,7 @@ static inline void loadNumberedArrays(IWineD3DStateBlockImpl *stateblock, WineDi
}
}
}
checkGLcall("Loading numbered arrays");
}
/* Used from 2 different functions, and too big to justify making it inlined */
......
......@@ -183,6 +183,9 @@ static HRESULT WINAPI IWineD3DVertexDeclarationImpl_SetDeclaration(IWineD3DVerte
This->swizzled_attribs[j].usage = This->pDeclarationWine[i].Usage;
This->swizzled_attribs[j].idx = This->pDeclarationWine[i].UsageIndex;
This->num_swizzled_attribs++;
} else if(This->pDeclarationWine[i].Type == WINED3DDECLTYPE_FLOAT16_2 ||
This->pDeclarationWine[i].Type == WINED3DDECLTYPE_FLOAT16_4) {
This->half_float_used = TRUE;
}
}
......
......@@ -1268,6 +1268,7 @@ typedef struct IWineD3DVertexDeclarationImpl {
DWORD streams[MAX_STREAMS];
UINT num_streams;
BOOL position_transformed;
BOOL half_float_used;
/* Ordered array of declaration types that need swizzling in a vshader */
attrib_declaration swizzled_attribs[MAX_ATTRIBS];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment