st/nine: Reduce MaxSimultaneousTextures to 8
Windows drivers don't set this flag (which affects ff) to more than 8. Do the same in case some games check for 8. v2: Remove any dependence on MaxSimultaneousTextures. For non-ff the number of textures is 16 when the device is able of vs/ps3. Add this requirement of 16 textures to the driver requirements. Signed-off-by: Axel Davy <davyaxel0@gmail.com>
This commit is contained in:
parent
739c700950
commit
3d975e98e4
|
@ -77,7 +77,9 @@ NineAdapter9_ctor( struct NineAdapter9 *This,
|
||||||
hal->get_shader_param(hal, PIPE_SHADER_VERTEX,
|
hal->get_shader_param(hal, PIPE_SHADER_VERTEX,
|
||||||
PIPE_SHADER_CAP_MAX_INPUTS) < 16 ||
|
PIPE_SHADER_CAP_MAX_INPUTS) < 16 ||
|
||||||
hal->get_shader_param(hal, PIPE_SHADER_FRAGMENT,
|
hal->get_shader_param(hal, PIPE_SHADER_FRAGMENT,
|
||||||
PIPE_SHADER_CAP_MAX_INPUTS) < 10) {
|
PIPE_SHADER_CAP_MAX_INPUTS) < 10 ||
|
||||||
|
hal->get_shader_param(hal, PIPE_SHADER_FRAGMENT,
|
||||||
|
PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS) < 16) {
|
||||||
ERR("Your card is not supported by Gallium Nine. Minimum requirement "
|
ERR("Your card is not supported by Gallium Nine. Minimum requirement "
|
||||||
"is >= r500, >= nv50, >= i965\n");
|
"is >= r500, >= nv50, >= i965\n");
|
||||||
return D3DERR_DRIVERINTERNALERROR;
|
return D3DERR_DRIVERINTERNALERROR;
|
||||||
|
@ -789,10 +791,7 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
|
||||||
|
|
||||||
pCaps->MaxTextureBlendStages = 8; /* XXX wine */
|
pCaps->MaxTextureBlendStages = 8; /* XXX wine */
|
||||||
(DWORD)screen->get_param(screen, PIPE_CAP_BLEND_EQUATION_SEPARATE);
|
(DWORD)screen->get_param(screen, PIPE_CAP_BLEND_EQUATION_SEPARATE);
|
||||||
pCaps->MaxSimultaneousTextures = screen->get_shader_param(screen,
|
pCaps->MaxSimultaneousTextures = 8;
|
||||||
PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS);
|
|
||||||
if (pCaps->MaxSimultaneousTextures > NINE_MAX_SAMPLERS_PS)
|
|
||||||
pCaps->MaxSimultaneousTextures = NINE_MAX_SAMPLERS_PS;
|
|
||||||
|
|
||||||
pCaps->VertexProcessingCaps = D3DVTXPCAPS_TEXGEN |
|
pCaps->VertexProcessingCaps = D3DVTXPCAPS_TEXGEN |
|
||||||
D3DVTXPCAPS_TEXGEN_SPHEREMAP |
|
D3DVTXPCAPS_TEXGEN_SPHEREMAP |
|
||||||
|
|
|
@ -2451,7 +2451,7 @@ NineDevice9_GetTexture( struct NineDevice9 *This,
|
||||||
DWORD Stage,
|
DWORD Stage,
|
||||||
IDirect3DBaseTexture9 **ppTexture )
|
IDirect3DBaseTexture9 **ppTexture )
|
||||||
{
|
{
|
||||||
user_assert(Stage < This->caps.MaxSimultaneousTextures ||
|
user_assert(Stage < NINE_MAX_SAMPLERS_PS ||
|
||||||
Stage == D3DDMAPSAMPLER ||
|
Stage == D3DDMAPSAMPLER ||
|
||||||
(Stage >= D3DVERTEXTEXTURESAMPLER0 &&
|
(Stage >= D3DVERTEXTEXTURESAMPLER0 &&
|
||||||
Stage <= D3DVERTEXTEXTURESAMPLER3), D3DERR_INVALIDCALL);
|
Stage <= D3DVERTEXTEXTURESAMPLER3), D3DERR_INVALIDCALL);
|
||||||
|
@ -2478,7 +2478,7 @@ NineDevice9_SetTexture( struct NineDevice9 *This,
|
||||||
|
|
||||||
DBG("This=%p Stage=%u pTexture=%p\n", This, Stage, pTexture);
|
DBG("This=%p Stage=%u pTexture=%p\n", This, Stage, pTexture);
|
||||||
|
|
||||||
user_assert(Stage < This->caps.MaxSimultaneousTextures ||
|
user_assert(Stage < NINE_MAX_SAMPLERS_PS ||
|
||||||
Stage == D3DDMAPSAMPLER ||
|
Stage == D3DDMAPSAMPLER ||
|
||||||
(Stage >= D3DVERTEXTEXTURESAMPLER0 &&
|
(Stage >= D3DVERTEXTEXTURESAMPLER0 &&
|
||||||
Stage <= D3DVERTEXTEXTURESAMPLER3), D3DERR_INVALIDCALL);
|
Stage <= D3DVERTEXTEXTURESAMPLER3), D3DERR_INVALIDCALL);
|
||||||
|
@ -2552,7 +2552,7 @@ NineDevice9_GetSamplerState( struct NineDevice9 *This,
|
||||||
D3DSAMPLERSTATETYPE Type,
|
D3DSAMPLERSTATETYPE Type,
|
||||||
DWORD *pValue )
|
DWORD *pValue )
|
||||||
{
|
{
|
||||||
user_assert(Sampler < This->caps.MaxSimultaneousTextures ||
|
user_assert(Sampler < NINE_MAX_SAMPLERS_PS ||
|
||||||
Sampler == D3DDMAPSAMPLER ||
|
Sampler == D3DDMAPSAMPLER ||
|
||||||
(Sampler >= D3DVERTEXTEXTURESAMPLER0 &&
|
(Sampler >= D3DVERTEXTEXTURESAMPLER0 &&
|
||||||
Sampler <= D3DVERTEXTEXTURESAMPLER3), D3DERR_INVALIDCALL);
|
Sampler <= D3DVERTEXTEXTURESAMPLER3), D3DERR_INVALIDCALL);
|
||||||
|
@ -2575,7 +2575,7 @@ NineDevice9_SetSamplerState( struct NineDevice9 *This,
|
||||||
DBG("This=%p Sampler=%u Type=%s Value=%08x\n", This,
|
DBG("This=%p Sampler=%u Type=%s Value=%08x\n", This,
|
||||||
Sampler, nine_D3DSAMP_to_str(Type), Value);
|
Sampler, nine_D3DSAMP_to_str(Type), Value);
|
||||||
|
|
||||||
user_assert(Sampler < This->caps.MaxSimultaneousTextures ||
|
user_assert(Sampler < NINE_MAX_SAMPLERS_PS ||
|
||||||
Sampler == D3DDMAPSAMPLER ||
|
Sampler == D3DDMAPSAMPLER ||
|
||||||
(Sampler >= D3DVERTEXTEXTURESAMPLER0 &&
|
(Sampler >= D3DVERTEXTEXTURESAMPLER0 &&
|
||||||
Sampler <= D3DVERTEXTEXTURESAMPLER3), D3DERR_INVALIDCALL);
|
Sampler <= D3DVERTEXTEXTURESAMPLER3), D3DERR_INVALIDCALL);
|
||||||
|
|
Loading…
Reference in New Issue