- Timestamp:
- Oct 11, 2010 5:28:33 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 66570
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/basetexture.c
r32622 r33046 67 67 texture->baseTexture.is_srgb = FALSE; 68 68 texture->baseTexture.pow2Matrix_identity = TRUE; 69 #if defined(VBOX_WITH_WDDM) && defined(DEBUG_leo) 70 texture->baseTexture.t_mirror = TRUE; 71 #else 72 texture->baseTexture.t_mirror = FALSE; 73 #endif 69 74 70 75 if (texture->resource.format_desc->Flags & WINED3DFMT_FLAG_FILTERING) -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/glsl_shader.c
r32622 r33046 1942 1942 struct color_fixup_desc fixup; 1943 1943 BOOL np2_fixup = FALSE; 1944 BOOL tmirror_tmp_reg = FALSE; 1944 1945 va_list args; 1945 1946 … … 1952 1953 sampler_base = "Psampler"; 1953 1954 1954 if (priv->cur_ps_args->np2_fixup & (1 << sampler)) {1955 if (priv->cur_ps_args->np2_fixup & (1 << sampler)) { 1955 1956 if(bias) { 1956 1957 FIXME("Biased sampling from NP2 textures is unsupported\n"); … … 1959 1960 } 1960 1961 } 1962 1963 if (priv->cur_ps_args->t_mirror & (1 << sampler)) 1964 { 1965 if (ins->ctx->reg_maps->sampler_type[sampler]==WINED3DSTT_2D) 1966 { 1967 if (sample_function->coord_mask & WINED3DSP_WRITEMASK_1) 1968 { 1969 glsl_src_param_t coord_param; 1970 shader_glsl_add_src_param(ins, &ins->src[0], sample_function->coord_mask, &coord_param); 1971 1972 if (ins->src[0].reg.type != WINED3DSPR_INPUT) 1973 { 1974 shader_addline(ins->ctx->buffer, "%s.y=1.0-%s.y;\n", 1975 coord_param.reg_name, coord_param.reg_name); 1976 } 1977 else 1978 { 1979 tmirror_tmp_reg = TRUE; 1980 shader_addline(ins->ctx->buffer, "tmp0.xy=vec2(%s.x, 1.0-%s.y).xy;\n", 1981 coord_param.reg_name, coord_param.reg_name); 1982 } 1983 } 1984 else 1985 { 1986 DebugBreak(); 1987 FIXME("Unexpected coord_mask with t_mirror\n"); 1988 } 1989 } 1990 } 1961 1991 } else { 1962 1992 sampler_base = "Vsampler"; … … 1968 1998 shader_addline(ins->ctx->buffer, "%s(%s%u, ", sample_function->name, sampler_base, sampler); 1969 1999 1970 va_start(args, coord_reg_fmt); 1971 shader_vaddline(ins->ctx->buffer, coord_reg_fmt, args); 1972 va_end(args); 2000 if (tmirror_tmp_reg) 2001 { 2002 shader_addline(ins->ctx->buffer, "%s", "tmp0.xy"); 2003 } 2004 else 2005 { 2006 va_start(args, coord_reg_fmt); 2007 shader_vaddline(ins->ctx->buffer, coord_reg_fmt, args); 2008 va_end(args); 2009 } 1973 2010 1974 2011 if(bias) { -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/shader.c
r28475 r33046 2020 2020 args->srgb_correction = stateblock->renderState[WINED3DRS_SRGBWRITEENABLE] ? 1 : 0; 2021 2021 args->np2_fixup = 0; 2022 args->t_mirror = 0; 2022 2023 2023 2024 for (i = 0; i < MAX_FRAGMENT_SAMPLERS; ++i) … … 2036 2037 { 2037 2038 args->np2_fixup |= (1 << i); 2039 } 2040 2041 if (texture->baseTexture.t_mirror) 2042 { 2043 args->t_mirror |= (1 << i); 2038 2044 } 2039 2045 } -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/state.c
r28475 r33046 4533 4533 { 4534 4534 GLfloat yoffset = -(63.0f / 64.0f) / stateblock->viewport.Height; 4535 #if !defined(VBOX_WITH_WDDM) || !defined(DEBUG_leo) 4535 4536 device->posFixup[1] = context->render_offscreen ? -1.0f : 1.0f; 4537 #else 4538 device->posFixup[1] = context->render_offscreen ? 1.0f : -1.0f; 4539 #endif 4536 4540 device->posFixup[3] = device->posFixup[1] * yoffset; 4537 4541 } -
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h
r32622 r33046 716 716 D3D9 has a limit of 16 samplers and the fixup is superfluous 717 717 in D3D10 (unconditional NP2 support mandatory). */ 718 WORD t_mirror; 718 719 }; 719 720 … … 1907 1908 BOOL is_srgb; 1908 1909 BOOL pow2Matrix_identity; 1910 BOOL t_mirror; 1909 1911 const struct min_lookup *minMipLookup; 1910 1912 const GLenum *magLookup;
Note:
See TracChangeset
for help on using the changeset viewer.