Commit 828f42cb authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Add some traces to state handlers.

Should make it a bit clearer what's happening in some cases.
parent c8a3f3f1
......@@ -2975,6 +2975,8 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock,
const struct arbfp_ffp_desc *desc;
unsigned int i;
TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
if(isStateDirty(context, STATE_RENDER(WINED3DRS_FOGENABLE))) {
if(!use_pshader && device->shader_backend == &arb_program_shader_backend && context->last_was_pshader) {
/* Reload fixed function constants since they collide with the pixel shader constants */
......@@ -3061,6 +3063,8 @@ static void fragment_prog_arbfp(DWORD state, IWineD3DStateBlockImpl *stateblock,
static void state_arbfp_fog(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
enum fogsource new_source;
TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
if(!isStateDirty(context, STATE_PIXELSHADER)) {
fragment_prog_arbfp(state, stateblock, context);
}
......
......@@ -469,6 +469,8 @@ static void state_alpha(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
float ref;
BOOL enable_ckey = FALSE;
TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
/* Find out if the texture on the first stage has a ckey set
* The alpha state func reads the texture settings, even though alpha and texture are not grouped
* together. This is to avoid making a huge alpha+texture+texture stage+ckey block due to the hardly
......@@ -897,6 +899,9 @@ static void state_stencilwrite(DWORD state, IWineD3DStateBlockImpl *stateblock,
}
static void state_fog_vertexpart(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
if (!stateblock->renderState[WINED3DRS_FOGENABLE]) return;
/* Table fog on: Never use fog coords, and use per-fragment fog */
......@@ -981,6 +986,8 @@ void state_fogstartend(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DC
void state_fog_fragpart(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) {
enum fogsource new_source;
TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
if (!stateblock->renderState[WINED3DRS_FOGENABLE]) {
/* No fog? Disable it, and we're done :-) */
glDisableWINE(GL_FOG);
......@@ -3285,6 +3292,8 @@ static void sampler_texmatrix(DWORD state, IWineD3DStateBlockImpl *stateblock, W
DWORD sampler = state - STATE_SAMPLER(0);
IWineD3DBaseTexture *texture = stateblock->textures[sampler];
TRACE("state %#x, stateblock %p, context %p\n", state, stateblock, context);
if(!texture) return;
/* The fixed function np2 texture emulation uses the texture matrix to fix up the coordinates
* IWineD3DBaseTexture::ApplyStateChanges multiplies the set matrix with a fixup matrix. Before the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment