wined3d: Shader declaration cap fixes.

This commit is contained in:
Roderick Colenbrander 2006-08-08 17:46:03 +02:00 committed by Alexandre Julliard
parent cba3b122ed
commit eba1f90ef6
1 changed files with 18 additions and 3 deletions

View File

@ -2031,7 +2031,7 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
WINED3DVTXPCAPS_VERTEXFOG | WINED3DVTXPCAPS_VERTEXFOG |
WINED3DVTXPCAPS_TEXGEN; WINED3DVTXPCAPS_TEXGEN;
/* FIXME: Add /* FIXME: Add
D3DVTXPCAPS_TWEENING */ D3DVTXPCAPS_TWEENING, D3DVTXPCAPS_TEXGEN_SPHEREMAP */
*pCaps->MaxPrimitiveCount = 0xFFFFF; /* For now set 2^20-1 which is used by most >=Geforce3/Radeon8500 cards */ *pCaps->MaxPrimitiveCount = 0xFFFFF; /* For now set 2^20-1 which is used by most >=Geforce3/Radeon8500 cards */
*pCaps->MaxVertexIndex = 0xFFFFF; *pCaps->MaxVertexIndex = 0xFFFFF;
@ -2095,12 +2095,27 @@ static HRESULT WINAPI IWineD3DImpl_GetDeviceCaps(IWineD3D *iface, UINT Adapter,
GLint max_buffers = 1; GLint max_buffers = 1;
FIXME("Caps support for directx9 is nonexistent at the moment!\n"); FIXME("Caps support for directx9 is nonexistent at the moment!\n");
*pCaps->DevCaps2 = 0; *pCaps->DevCaps2 = 0;
/* TODO: D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES */ /* TODO: D3DDEVCAPS2_CAN_STRETCHRECT_FROM_TEXTURES and VS3.0 needs atleast D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET */
*pCaps->MaxNpatchTessellationLevel = 0; *pCaps->MaxNpatchTessellationLevel = 0;
*pCaps->MasterAdapterOrdinal = 0; *pCaps->MasterAdapterOrdinal = 0;
*pCaps->AdapterOrdinalInGroup = 0; *pCaps->AdapterOrdinalInGroup = 0;
*pCaps->NumberOfAdaptersInGroup = 1; *pCaps->NumberOfAdaptersInGroup = 1;
if(*pCaps->VertexShaderVersion >= D3DVS_VERSION(2,0)) {
/* OpenGL supports all formats below perhaps not allways without conversion but it supports them.
Further GLSL doesn't seem to have an official unsigned type as I'm not sure how we handle it
don't advertise iet yet. We might need to add some clamping in the shader engine to support it.
TODO: D3DDTCAPS_USHORT2N, D3DDTCAPS_USHORT4N, D3DDTCAPS_UDEC3, D3DDTCAPS_DEC3N */
*pCaps->DeclTypes = D3DDTCAPS_UBYTE4 |
D3DDTCAPS_UBYTE4N |
D3DDTCAPS_SHORT2N |
D3DDTCAPS_SHORT4N |
D3DDTCAPS_FLOAT16_2 |
D3DDTCAPS_FLOAT16_4;
} else
*pCaps->DeclTypes = 0; *pCaps->DeclTypes = 0;
#if 0 /*FIXME: Simultaneous render targets*/ #if 0 /*FIXME: Simultaneous render targets*/
GL_MAX_DRAW_BUFFERS_ATI 0x00008824 GL_MAX_DRAW_BUFFERS_ATI 0x00008824
if (GL_SUPPORT(GL_MAX_DRAW_BUFFERS_ATI)) { if (GL_SUPPORT(GL_MAX_DRAW_BUFFERS_ATI)) {