wined3d: Convert some BOOLs to bitfields in struct WineD3DContext.
Also happens to fill two 3 byte holes.
This commit is contained in:
parent
813c7ed202
commit
3f12f59aa4
|
@ -3068,7 +3068,8 @@ static void transform_texture(DWORD state, IWineD3DStateBlockImpl *stateblock, W
|
||||||
stateblock->wineD3DDevice->frag_pipe->ffp_proj_control);
|
stateblock->wineD3DDevice->frag_pipe->ffp_proj_control);
|
||||||
|
|
||||||
/* The sampler applying function calls us if this changes */
|
/* The sampler applying function calls us if this changes */
|
||||||
if(context->lastWasPow2Texture[texUnit] && stateblock->textures[texUnit]) {
|
if ((context->lastWasPow2Texture & (1 << texUnit)) && stateblock->textures[texUnit])
|
||||||
|
{
|
||||||
if(generated) {
|
if(generated) {
|
||||||
FIXME("Non-power2 texture being used with generated texture coords\n");
|
FIXME("Non-power2 texture being used with generated texture coords\n");
|
||||||
}
|
}
|
||||||
|
@ -3358,8 +3359,10 @@ static void sampler_texmatrix(DWORD state, IWineD3DStateBlockImpl *stateblock, W
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(texIsPow2 || context->lastWasPow2Texture[sampler]) {
|
if (texIsPow2 || (context->lastWasPow2Texture & (1 << sampler)))
|
||||||
context->lastWasPow2Texture[sampler] = texIsPow2;
|
{
|
||||||
|
if (texIsPow2) context->lastWasPow2Texture |= 1 << sampler;
|
||||||
|
else context->lastWasPow2Texture &= ~(1 << sampler);
|
||||||
transform_texture(STATE_TEXTURESTAGE(stateblock->wineD3DDevice->texUnitMap[sampler], WINED3DTSS_TEXTURETRANSFORMFLAGS), stateblock, context);
|
transform_texture(STATE_TEXTURESTAGE(stateblock->wineD3DDevice->texUnitMap[sampler], WINED3DTSS_TEXTURETRANSFORMFLAGS), stateblock, context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -801,21 +801,26 @@ struct WineD3DContext {
|
||||||
DWORD tid; /* Thread ID which owns this context at the moment */
|
DWORD tid; /* Thread ID which owns this context at the moment */
|
||||||
|
|
||||||
/* Stores some information about the context state for optimization */
|
/* Stores some information about the context state for optimization */
|
||||||
BOOL draw_buffer_dirty;
|
WORD draw_buffer_dirty : 1;
|
||||||
BOOL last_was_rhw; /* true iff last draw_primitive was in xyzrhw mode */
|
WORD last_was_rhw : 1; /* true iff last draw_primitive was in xyzrhw mode */
|
||||||
BOOL last_was_pshader;
|
WORD last_was_pshader : 1;
|
||||||
BOOL last_was_vshader;
|
WORD last_was_vshader : 1;
|
||||||
BOOL last_was_foggy_shader;
|
WORD last_was_foggy_shader : 1;
|
||||||
BOOL namedArraysLoaded, numberedArraysLoaded;
|
WORD namedArraysLoaded : 1;
|
||||||
|
WORD numberedArraysLoaded : 1;
|
||||||
|
WORD last_was_blit : 1;
|
||||||
|
WORD last_was_ckey : 1;
|
||||||
|
WORD fog_coord : 1;
|
||||||
|
WORD isPBuffer : 1;
|
||||||
|
WORD fog_enabled : 1;
|
||||||
|
WORD num_untracked_materials : 2; /* Max value 2 */
|
||||||
|
WORD padding : 2;
|
||||||
|
BYTE texShaderBumpMap; /* MAX_TEXTURES, 8 */
|
||||||
|
BYTE lastWasPow2Texture; /* MAX_TEXTURES, 8 */
|
||||||
DWORD numbered_array_mask;
|
DWORD numbered_array_mask;
|
||||||
BOOL lastWasPow2Texture[MAX_TEXTURES];
|
|
||||||
GLenum tracking_parm; /* Which source is tracking current colour */
|
GLenum tracking_parm; /* Which source is tracking current colour */
|
||||||
unsigned char num_untracked_materials;
|
|
||||||
GLenum untracked_materials[2];
|
GLenum untracked_materials[2];
|
||||||
BOOL last_was_blit, last_was_ckey;
|
|
||||||
UINT blit_w, blit_h;
|
UINT blit_w, blit_h;
|
||||||
char texShaderBumpMap;
|
|
||||||
BOOL fog_coord;
|
|
||||||
|
|
||||||
char *vshader_const_dirty, *pshader_const_dirty;
|
char *vshader_const_dirty, *pshader_const_dirty;
|
||||||
|
|
||||||
|
@ -824,7 +829,6 @@ struct WineD3DContext {
|
||||||
HWND win_handle;
|
HWND win_handle;
|
||||||
HDC hdc;
|
HDC hdc;
|
||||||
HPBUFFERARB pbuffer;
|
HPBUFFERARB pbuffer;
|
||||||
BOOL isPBuffer;
|
|
||||||
GLint aux_buffers;
|
GLint aux_buffers;
|
||||||
|
|
||||||
/* FBOs */
|
/* FBOs */
|
||||||
|
@ -834,7 +838,6 @@ struct WineD3DContext {
|
||||||
GLuint dst_fbo;
|
GLuint dst_fbo;
|
||||||
|
|
||||||
/* Extension emulation */
|
/* Extension emulation */
|
||||||
BOOL fog_enabled;
|
|
||||||
GLint gl_fog_source;
|
GLint gl_fog_source;
|
||||||
GLfloat fog_coord_value;
|
GLfloat fog_coord_value;
|
||||||
GLfloat color[4], fogstart, fogend, fogcolor[4];
|
GLfloat color[4], fogstart, fogend, fogcolor[4];
|
||||||
|
|
Loading…
Reference in New Issue