mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-02 12:43:38 +00:00
wined3d: Properly load FLOAT16_2 and FLOAT16_4 vertex data.
This commit is contained in:
parent
f11ca610ba
commit
82245cb5d7
|
@ -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
|
||||
* 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;
|
||||
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;
|
||||
|
||||
case WINED3DDECLTYPE_UNUSED:
|
||||
|
|
|
@ -139,8 +139,11 @@ static WINED3DGLTYPE const glTypeLookup[WINED3DDECLTYPE_UNUSED] = {
|
|||
{WINED3DDECLTYPE_USHORT4N, 4, GL_UNSIGNED_SHORT , GL_TRUE ,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_FLOAT16_2, 2, GL_FLOAT , GL_FALSE ,sizeof(short int)},
|
||||
{WINED3DDECLTYPE_FLOAT16_4, 4, GL_FLOAT , GL_FALSE ,sizeof(short int)}};
|
||||
/* We should do an extension check for NV_HALF_FLOAT. However, without NV_HALF_FLOAT
|
||||
* 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_SIZE(type) glTypeLookup[type].size
|
||||
|
|
Loading…
Reference in a new issue