Module: wine
Branch: master
Commit: c088edeae7fed4645fa3f34fb5bacc1eeaa87706
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c088edeae7fed4645fa3f34fb…
Author: Stefan Dösinger <stefan(a)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=c088edeae7fed4645fa3f…
Module: wine
Branch: master
Commit: dc203d36c99e772acb70046b9d967e951decd2c0
URL: http://source.winehq.org/git/wine.git/?a=commit;h=dc203d36c99e772acb70046b9…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Sat Jul 5 16:37:47 2008 -0500
wined3d: Remove more dead code.
The opengl extension mentioned in that code was never finished, and as
far as I know there is no way to make use of tangent data in the d3d
fixed function pipeline as well.
---
dlls/wined3d/state.c | 42 ++----------------------------------------
1 files changed, 2 insertions(+), 40 deletions(-)
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index f665c05..6550aa3 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -3133,44 +3133,6 @@ static void loadVertexData(IWineD3DStateBlockImpl *stateblock, WineDirect3DVerte
}
#endif
-#if 0 /* tangents ----------------------------------------------*/
- if (sd->u.s.tangent.lpData || sd->u.s.tangent.VBO ||
- sd->u.s.binormal.lpData || sd->u.s.binormal.VBO) {
- /* TODO: tangents*/
- if (GL_SUPPORT(EXT_COORDINATE_FRAME) {
- if (sd->u.s.tangent.lpData || sd->u.s.tangent.VBO) {
- glEnable(GL_TANGENT_ARRAY_EXT);
- (GL_EXTCALL)(TangentPointerEXT)(
- WINED3D_ATR_GLTYPE(sd->u.s.tangent.dwType),
- sd->u.s.tangent.dwStride,
- sd->u.s.tangent.lpData + stateblock->loadBaseVertexIndex * sd->u.s.tangent.dwStride);
- } else {
- glDisable(GL_TANGENT_ARRAY_EXT);
- }
- if (sd->u.s.binormal.lpData || sd->u.s.binormal.VBO) {
- glEnable(GL_BINORMAL_ARRAY_EXT);
- (GL_EXTCALL)(BinormalPointerEXT)(
- WINED3D_ATR_GLTYPE(sd->u.s.binormal.dwType),
- sd->u.s.binormal.dwStride,
- sd->u.s.binormal.lpData + stateblock->loadBaseVertexIndex * sd->u.s.binormal.dwStride);
- } else{
- glDisable(GL_BINORMAL_ARRAY_EXT);
- }
-
- } else {
- /* don't bother falling back to 'slow' as we don't support software tangents and binormals yet . */
- /* FIXME: fixme once */
- TRACE("Hardware support for tangents and binormals is not avaiable, tangents and binormals disabled.\n");
- }
- } else {
- if (GL_SUPPORT(EXT_COORDINATE_FRAME) {
- /* make sure fog is disabled */
- glDisable(GL_TANGENT_ARRAY_EXT);
- glDisable(GL_BINORMAL_ARRAY_EXT);
- }
- }
-#endif
-
/* Point Size ----------------------------------------------*/
if (sd->u.s.pSize.lpData || sd->u.s.pSize.VBO) {
@@ -3427,8 +3389,8 @@ static void streamsrc(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3DCo
if (!useVertexShaderFunction && (BUFFER_OR_DATA(position2) || BUFFER_OR_DATA(normal2))) {
FIXME("Tweening is only valid with vertex shaders\n");
}
- if (!useVertexShaderFunction && (BUFFER_OR_DATA(tangent) || BUFFER_OR_DATA(binormal))) {
- FIXME("Tangent and binormal bump mapping is only valid with vertex shaders\n");
+ if (!useVertexShaderFunction && BUFFER_OR_DATA(binormal)) {
+ FIXME("Binormal bump mapping is only valid with vertex shaders\n");
}
if (!useVertexShaderFunction && (BUFFER_OR_DATA(tessFactor) || BUFFER_OR_DATA(fog) || BUFFER_OR_DATA(depth) || BUFFER_OR_DATA(sample))) {
FIXME("Extended attributes are only valid with vertex shaders\n");
Module: wine
Branch: master
Commit: f981afd7d316612a821891d2ec92dc7155175be9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f981afd7d316612a821891d2e…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Sat Jul 5 16:14:00 2008 -0500
wined3d: Check for ATI_ENVMAP_BUMPMAP in the template.
Note that GL_ATI_envmap_bumpmap is not the same as
GL_ATI_fragment_shader. envmap_bumpmap is used together with the
regular opengl ffp pipeline and is not used (other than for
pixelformats) if GL_ATI_fragment_shader is used.
---
dlls/wined3d/state.c | 91 ++++++++++++++++++++++++-------------------------
1 files changed, 45 insertions(+), 46 deletions(-)
Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=f981afd7d316612a82189…