Commit 82245cb5 authored by H. Verbeet's avatar H. Verbeet Committed by Alexandre Julliard

wined3d: Properly load FLOAT16_2 and FLOAT16_4 vertex data.

parent f11ca610
...@@ -818,10 +818,18 @@ static inline void drawStridedInstanced(IWineD3DDevice *iface, WineDirect3DVerte ...@@ -818,10 +818,18 @@ static inline void drawStridedInstanced(IWineD3DDevice *iface, WineDirect3DVerte
/* Are those 16 bit floats. C doesn't have a 16 bit float type. I could read the single bits and calculate a 4 /* Are those 16 bit floats. C doesn't have a 16 bit float type. I could read the single bits and calculate a 4
* byte float according to the IEEE standard * byte float according to the IEEE standard
*/ */
FIXME("Unsupported WINED3DDECLTYPE_FLOAT16_2\n"); if (GL_SUPPORT(NV_HALF_FLOAT)) {
GL_EXTCALL(glVertexAttrib2hvNV(instancedData[j], (GLhalfNV *)ptr));
} else {
FIXME("Unsupported WINED3DDECLTYPE_FLOAT16_2\n");
}
break; break;
case WINED3DDECLTYPE_FLOAT16_4: case WINED3DDECLTYPE_FLOAT16_4:
FIXME("Unsupported WINED3DDECLTYPE_FLOAT16_4\n"); if (GL_SUPPORT(NV_HALF_FLOAT)) {
GL_EXTCALL(glVertexAttrib4hvNV(instancedData[j], (GLhalfNV *)ptr));
} else {
FIXME("Unsupported WINED3DDECLTYPE_FLOAT16_4\n");
}
break; break;
case WINED3DDECLTYPE_UNUSED: case WINED3DDECLTYPE_UNUSED:
......
...@@ -139,8 +139,11 @@ static WINED3DGLTYPE const glTypeLookup[WINED3DDECLTYPE_UNUSED] = { ...@@ -139,8 +139,11 @@ static WINED3DGLTYPE const glTypeLookup[WINED3DDECLTYPE_UNUSED] = {
{WINED3DDECLTYPE_USHORT4N, 4, GL_UNSIGNED_SHORT , GL_TRUE ,sizeof(short int)}, {WINED3DDECLTYPE_USHORT4N, 4, GL_UNSIGNED_SHORT , GL_TRUE ,sizeof(short int)},
{WINED3DDECLTYPE_UDEC3, 3, GL_UNSIGNED_SHORT , GL_FALSE ,sizeof(short int)}, {WINED3DDECLTYPE_UDEC3, 3, GL_UNSIGNED_SHORT , GL_FALSE ,sizeof(short int)},
{WINED3DDECLTYPE_DEC3N, 3, GL_SHORT , GL_TRUE ,sizeof(short int)}, {WINED3DDECLTYPE_DEC3N, 3, GL_SHORT , GL_TRUE ,sizeof(short int)},
{WINED3DDECLTYPE_FLOAT16_2, 2, GL_FLOAT , GL_FALSE ,sizeof(short int)}, /* We should do an extension check for NV_HALF_FLOAT. However, without NV_HALF_FLOAT
{WINED3DDECLTYPE_FLOAT16_4, 4, GL_FLOAT , GL_FALSE ,sizeof(short int)}}; * we won't be able to load the data at all, so at least for the moment it wouldn't
* gain us much. */
{WINED3DDECLTYPE_FLOAT16_2, 2, GL_HALF_FLOAT_NV , GL_FALSE ,sizeof(GLhalfNV)},
{WINED3DDECLTYPE_FLOAT16_4, 4, GL_HALF_FLOAT_NV , GL_FALSE ,sizeof(GLhalfNV)}};
#define WINED3D_ATR_TYPE(type) glTypeLookup[type].d3dType #define WINED3D_ATR_TYPE(type) glTypeLookup[type].d3dType
#define WINED3D_ATR_SIZE(type) glTypeLookup[type].size #define WINED3D_ATR_SIZE(type) glTypeLookup[type].size
......
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