From 621f075fb999b89fc2dd6769b4002005789d5164 Mon Sep 17 00:00:00 2001 From: Ivan Gyurdiev Date: Fri, 9 Jun 2006 17:47:16 -0400 Subject: [PATCH] wined3d: Print out sampler state names. --- dlls/wined3d/device.c | 9 +++++---- dlls/wined3d/wined3d_private.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 067a871876..cbf257830b 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4397,13 +4397,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetSamplerState(IWineD3DDevice *iface, DWORD S * Ok GForce say it's ok to use glTexParameter/glGetTexParameter(...). ******************/ /** NOTE: States are appled in IWineD3DBaseTextre ApplyStateChanges and IWineD3DDevice SetupTextureStates**/ - TRACE("(%p) Sampler(%ld), Type(%d) Value(%ld)\n",This, Sampler ,Type, Value); - if(Sampler > GL_LIMITS(samplers) || Sampler < 0 || Type > WINED3D_HIGHEST_SAMPLER_STATE || Type < 0) { - FIXME("out of range %d %d sampler %ld type %u\n", GL_LIMITS(samplers), WINED3D_HIGHEST_SAMPLER_STATE, Sampler, Type); + FIXME("sampler %ld type %s(%u) is out of range [max_samplers=%d, highest_state=%d]\n", + Sampler, debug_d3dsamplerstate(Type), Type, GL_LIMITS(samplers), WINED3D_HIGHEST_SAMPLER_STATE); return WINED3DERR_INVALIDCALL; } - TRACE("Setting sampler %ld %d to %ld\n", Sampler, Type, Value); + + TRACE("(%p) : Sampler=%ld, Type=%s(%d), Value=%ld\n", This, Sampler, + debug_d3dsamplerstate(Type), Type, Value); This->updateStateBlock->samplerState[Sampler][Type] = Value; This->updateStateBlock->set.samplerState[Sampler][Type] = Value; This->updateStateBlock->changed.samplerState[Sampler][Type] = Value; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index f1ec8bcd8a..1e4573d988 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -1160,6 +1160,7 @@ const char* debug_d3dresourcetype(WINED3DRESOURCETYPE res); const char* debug_d3dusage(DWORD usage); const char* debug_d3dprimitivetype(D3DPRIMITIVETYPE PrimitiveType); const char* debug_d3drenderstate(DWORD state); +const char* debug_d3dsamplerstate(DWORD state); const char* debug_d3dtexturestate(DWORD state); const char* debug_d3dpool(WINED3DPOOL pool);