Lines Matching defs:sampler
3068 /* The sampler will also activate the correct texture dimensions, so no need to do it here
3069 * if the sampler for this stage is dirty
3213 /* The sampler applying function calls us if this changes */
3501 const DWORD sampler = state - STATE_SAMPLER(0);
3502 IWineD3DBaseTexture *texture = stateblock->textures[sampler];
3511 * The mapped stage is already active because the sampler() function below, which is part of the
3514 if(sampler < MAX_TEXTURES) {
3517 if (texIsPow2 || (context->lastWasPow2Texture & (1 << sampler)))
3519 if (texIsPow2) context->lastWasPow2Texture |= 1 << sampler;
3520 else context->lastWasPow2Texture &= ~(1 << sampler);
3521 transform_texture(STATE_TEXTURESTAGE(stateblock->device->texUnitMap[sampler],
3527 static void sampler(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
3529 DWORD sampler = state - STATE_SAMPLER(0);
3530 DWORD mapped_stage = stateblock->device->texUnitMap[sampler];
3537 TRACE("Sampler: %d\n", sampler);
3544 TRACE("No sampler mapped to stage %d. Returning.\n", sampler);
3555 if(stateblock->textures[sampler]) {
3556 BOOL srgb = stateblock->samplerState[sampler][WINED3DSAMP_SRGBTEXTURE];
3557 IWineD3DBaseTextureImpl *tex_impl = (IWineD3DBaseTextureImpl *) stateblock->textures[sampler];
3558 IWineD3DBaseTexture_BindTexture(stateblock->textures[sampler], srgb);
3559 basetexture_apply_state_changes(stateblock->textures[sampler],
3560 stateblock->textureState[sampler], stateblock->samplerState[sampler], gl_info);
3564 tmpvalue.d = stateblock->samplerState[sampler][WINED3DSAMP_MIPMAPLODBIAS];
3571 if (!use_ps(stateblock) && sampler < stateblock->lowest_disabled_stage)
3573 if(stateblock->renderState[WINED3DRS_COLORKEYENABLE] && sampler == 0) {
3591 if(sampler < stateblock->lowest_disabled_stage) {
3593 if(stateblock->renderState[WINED3DRS_COLORKEYENABLE] && sampler == 0) {
3600 glBindTexture(GL_TEXTURE_2D, stateblock->device->dummyTextureName[sampler]);
3601 checkGLcall("glBindTexture(GL_TEXTURE_2D, stateblock->device->dummyTextureName[sampler])");
3620 sampler(STATE_SAMPLER(i), stateblock, context);
3625 /* Otherwise all samplers were activated by the code above in earlier draws, or by sampler()
5037 { STATE_SAMPLER(0), { STATE_SAMPLER(0), sampler }, WINED3D_GL_EXT_NONE },
5038 { STATE_SAMPLER(1), { STATE_SAMPLER(1), sampler }, WINED3D_GL_EXT_NONE },
5039 { STATE_SAMPLER(2), { STATE_SAMPLER(2), sampler }, WINED3D_GL_EXT_NONE },
5040 { STATE_SAMPLER(3), { STATE_SAMPLER(3), sampler }, WINED3D_GL_EXT_NONE },
5041 { STATE_SAMPLER(4), { STATE_SAMPLER(4), sampler }, WINED3D_GL_EXT_NONE },
5042 { STATE_SAMPLER(5), { STATE_SAMPLER(5), sampler }, WINED3D_GL_EXT_NONE },
5043 { STATE_SAMPLER(6), { STATE_SAMPLER(6), sampler }, WINED3D_GL_EXT_NONE },
5044 { STATE_SAMPLER(7), { STATE_SAMPLER(7), sampler }, WINED3D_GL_EXT_NONE },
5045 { STATE_SAMPLER(8), { STATE_SAMPLER(8), sampler }, WINED3D_GL_EXT_NONE },
5046 { STATE_SAMPLER(9), { STATE_SAMPLER(9), sampler }, WINED3D_GL_EXT_NONE },
5047 { STATE_SAMPLER(10), { STATE_SAMPLER(10), sampler }, WINED3D_GL_EXT_NONE },
5048 { STATE_SAMPLER(11), { STATE_SAMPLER(11), sampler }, WINED3D_GL_EXT_NONE },
5049 { STATE_SAMPLER(12), { STATE_SAMPLER(12), sampler }, WINED3D_GL_EXT_NONE },
5050 { STATE_SAMPLER(13), { STATE_SAMPLER(13), sampler }, WINED3D_GL_EXT_NONE },
5051 { STATE_SAMPLER(14), { STATE_SAMPLER(14), sampler }, WINED3D_GL_EXT_NONE },
5052 { STATE_SAMPLER(15), { STATE_SAMPLER(15), sampler }, WINED3D_GL_EXT_NONE },
5053 { STATE_SAMPLER(16), /* Vertex sampler 0 */ { STATE_SAMPLER(16), sampler }, WINED3D_GL_EXT_NONE },
5054 { STATE_SAMPLER(17), /* Vertex sampler 1 */ { STATE_SAMPLER(17), sampler }, WINED3D_GL_EXT_NONE },
5055 { STATE_SAMPLER(18), /* Vertex sampler 2 */ { STATE_SAMPLER(18), sampler }, WINED3D_GL_EXT_NONE },
5056 { STATE_SAMPLER(19), /* Vertex sampler 3 */ { STATE_SAMPLER(19), sampler }, WINED3D_GL_EXT_NONE },
5428 * so register a NULL state handler in that case to get the vertex part of sampler() skipped(VTF is handled in the misc states.