summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2018-10-14 23:31:07 +0200
committerAxel Davy <[email protected]>2018-10-26 22:16:16 +0200
commit3d975e98e4abac853fcbb35dbb1537d2069d5125 (patch)
treeb336a4c00162249e850725a014212f51963934ed /src/gallium/state_trackers/nine
parent739c7009504b1a7b13997eda86db9afa5b8d6df9 (diff)
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 <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine')
-rw-r--r--src/gallium/state_trackers/nine/adapter9.c9
-rw-r--r--src/gallium/state_trackers/nine/device9.c8
2 files changed, 8 insertions, 9 deletions
diff --git a/src/gallium/state_trackers/nine/adapter9.c b/src/gallium/state_trackers/nine/adapter9.c
index 2fa92e4207b..0634d5918ce 100644
--- a/src/gallium/state_trackers/nine/adapter9.c
+++ b/src/gallium/state_trackers/nine/adapter9.c
@@ -77,7 +77,9 @@ NineAdapter9_ctor( struct NineAdapter9 *This,
hal->get_shader_param(hal, PIPE_SHADER_VERTEX,
PIPE_SHADER_CAP_MAX_INPUTS) < 16 ||
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 "
"is >= r500, >= nv50, >= i965\n");
return D3DERR_DRIVERINTERNALERROR;
@@ -789,10 +791,7 @@ NineAdapter9_GetDeviceCaps( struct NineAdapter9 *This,
pCaps->MaxTextureBlendStages = 8; /* XXX wine */
(DWORD)screen->get_param(screen, PIPE_CAP_BLEND_EQUATION_SEPARATE);
- pCaps->MaxSimultaneousTextures = screen->get_shader_param(screen,
- PIPE_SHADER_FRAGMENT, PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS);
- if (pCaps->MaxSimultaneousTextures > NINE_MAX_SAMPLERS_PS)
- pCaps->MaxSimultaneousTextures = NINE_MAX_SAMPLERS_PS;
+ pCaps->MaxSimultaneousTextures = 8;
pCaps->VertexProcessingCaps = D3DVTXPCAPS_TEXGEN |
D3DVTXPCAPS_TEXGEN_SPHEREMAP |
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index ae8733027e8..24c8ce062b3 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -2451,7 +2451,7 @@ NineDevice9_GetTexture( struct NineDevice9 *This,
DWORD Stage,
IDirect3DBaseTexture9 **ppTexture )
{
- user_assert(Stage < This->caps.MaxSimultaneousTextures ||
+ user_assert(Stage < NINE_MAX_SAMPLERS_PS ||
Stage == D3DDMAPSAMPLER ||
(Stage >= D3DVERTEXTEXTURESAMPLER0 &&
Stage <= D3DVERTEXTEXTURESAMPLER3), D3DERR_INVALIDCALL);
@@ -2478,7 +2478,7 @@ NineDevice9_SetTexture( struct NineDevice9 *This,
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 >= D3DVERTEXTEXTURESAMPLER0 &&
Stage <= D3DVERTEXTEXTURESAMPLER3), D3DERR_INVALIDCALL);
@@ -2552,7 +2552,7 @@ NineDevice9_GetSamplerState( struct NineDevice9 *This,
D3DSAMPLERSTATETYPE Type,
DWORD *pValue )
{
- user_assert(Sampler < This->caps.MaxSimultaneousTextures ||
+ user_assert(Sampler < NINE_MAX_SAMPLERS_PS ||
Sampler == D3DDMAPSAMPLER ||
(Sampler >= D3DVERTEXTEXTURESAMPLER0 &&
Sampler <= D3DVERTEXTEXTURESAMPLER3), D3DERR_INVALIDCALL);
@@ -2575,7 +2575,7 @@ NineDevice9_SetSamplerState( struct NineDevice9 *This,
DBG("This=%p Sampler=%u Type=%s Value=%08x\n", This,
Sampler, nine_D3DSAMP_to_str(Type), Value);
- user_assert(Sampler < This->caps.MaxSimultaneousTextures ||
+ user_assert(Sampler < NINE_MAX_SAMPLERS_PS ||
Sampler == D3DDMAPSAMPLER ||
(Sampler >= D3DVERTEXTEXTURESAMPLER0 &&
Sampler <= D3DVERTEXTEXTURESAMPLER3), D3DERR_INVALIDCALL);