[wined3d] init new texrect_fixup bitfield properly
Tobias Jakobi
tjakobi at ada17.math.uni-bielefeld.de
Wed Mar 25 07:36:06 CDT 2009
---
dlls/wined3d/pixelshader.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/pixelshader.c b/dlls/wined3d/pixelshader.c
index 6b4a30b..df8e837 100644
--- a/dlls/wined3d/pixelshader.c
+++ b/dlls/wined3d/pixelshader.c
@@ -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 (GL_TEXTURE_RECTANGLE_ARB == IWineD3DBaseTexture_GetTextureDimensions(stateblock->textures[i])) {
+ args->texrect_fixup |= (1 << i);
+ }
}
if (shader->baseShader.reg_maps.shader_version >= WINED3DPS_VERSION(3,0))
{
--
1.5.4.3
--========GMX209101237989104367416--
More information about the wine-patches
mailing list