wined3d: Add texrect_fixup bitfield to ps_compile_args struct.
Initialization of the bitfield done in find_ps_compile_args based on the previously introduced pow2Matrix_identity flag.
This commit is contained in:
parent
31f8cd9621
commit
1b335dfaaa
|
@ -460,6 +460,7 @@ void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImp
|
|||
|
||||
memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set */
|
||||
args->srgb_correction = stateblock->renderState[WINED3DRS_SRGBWRITEENABLE] ? 1 : 0;
|
||||
args->texrect_fixup = 0;
|
||||
|
||||
for(i = 0; i < MAX_FRAGMENT_SAMPLERS; i++) {
|
||||
if(shader->baseShader.reg_maps.samplers[i] == 0) continue;
|
||||
|
@ -469,6 +470,11 @@ void find_ps_compile_args(IWineD3DPixelShaderImpl *shader, IWineD3DStateBlockImp
|
|||
continue;
|
||||
}
|
||||
args->color_fixup[i] = tex->resource.format_desc->color_fixup;
|
||||
|
||||
/* Flag samplers that need NP2 texcoord fixup. */
|
||||
if(!tex->baseTexture.pow2Matrix_identity) {
|
||||
args->texrect_fixup |= (1 << i);
|
||||
}
|
||||
}
|
||||
if (shader->baseShader.reg_maps.shader_version >= WINED3DPS_VERSION(3,0))
|
||||
{
|
||||
|
|
|
@ -446,11 +446,15 @@ enum fogmode {
|
|||
*/
|
||||
struct ps_compile_args {
|
||||
struct color_fixup_desc color_fixup[MAX_FRAGMENT_SAMPLERS];
|
||||
BOOL srgb_correction;
|
||||
enum vertexprocessing_mode vp_mode;
|
||||
enum fogmode fog;
|
||||
/* Projected textures(ps 1.0-1.3) */
|
||||
/* Texture types(2D, Cube, 3D) in ps 1.x */
|
||||
BOOL srgb_correction;
|
||||
WORD texrect_fixup;
|
||||
/* Bitmap for texture rect coord fixups (16 samplers max currently).
|
||||
D3D9 has a limit of 16 samplers and the fixup is superfluous
|
||||
in D3D10 (unconditional NP2 support mandatory). */
|
||||
};
|
||||
|
||||
#define MAX_ATTRIBS 16
|
||||
|
|
Loading…
Reference in New Issue