Stefan Dösinger : wined3d: Use GL_ARB_texture_non_power_of_two emulation.

Alexandre Julliard julliard at winehq.org
Fri Jul 18 06:46:50 CDT 2008


Module: wine
Branch: master
Commit: c088edeae7fed4645fa3f34fb5bacc1eeaa87706
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c088edeae7fed4645fa3f34fb5bacc1eeaa87706

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Tue Jul  8 18:59:10 2008 -0500

wined3d: Use GL_ARB_texture_non_power_of_two emulation.

ATI cards prior to the radeon HD series did not have unconditional non
power of two support. So far we've used texture_rectangle for that, or
created a bigger power of two texture with padding. This had the
disadvantage that we had to correct the coordinates, which causes
extreme problems with shaders(doesn't work, pretty much).

Both the MacOS and the fglrx driver have support for
GL_ARB_texture_non_power_of_two, and run it on the hardware as long as
we stay within the texture_rectangle limitations. This allows us to
have conditional non power of two textures with normalized
coordinates. This patch adds an internal extension, and the code
creates a regular GL_TEXTURE_2D texture with NP2 size, but refuses
mipmapping, filtering and texture_rectangle incompatible
operations. This makes np2 textures work with shaders on fglrx and
macos.

---

 dlls/wined3d/basetexture.c       |   58 +++++++++++++++++++++++++------------
 dlls/wined3d/cubetexture.c       |    8 +++++
 dlls/wined3d/device.c            |   16 +++++++++-
 dlls/wined3d/directx.c           |   39 +++++++++++++++----------
 dlls/wined3d/state.c             |    8 +++++
 dlls/wined3d/surface.c           |    2 +-
 dlls/wined3d/texture.c           |    8 +++++
 dlls/wined3d/volumetexture.c     |    8 +++++
 dlls/wined3d/wined3d_private.h   |    1 +
 include/wine/wined3d_gl.h        |    3 ++
 include/wine/wined3d_interface.h |    8 +++++
 11 files changed, 121 insertions(+), 38 deletions(-)

Diff:   http://source.winehq.org/git/wine.git/?a=commitdiff;h=c088edeae7fed4645fa3f34fb5bacc1eeaa87706



More information about the wine-cvs mailing list