Henri Verbeet : wined3d: Set the nvidia_texture_shader. c GLINFO_LOCATION to *gl_info.
Alexandre Julliard
julliard at winehq.org
Mon May 24 11:30:50 CDT 2010
Module: wine
Branch: master
Commit: 31d1417ca3cc552e857b2598f9b635fcfbd2e09d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=31d1417ca3cc552e857b2598f9b635fcfbd2e09d
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Mon May 24 09:56:37 2010 +0200
wined3d: Set the nvidia_texture_shader.c GLINFO_LOCATION to *gl_info.
---
dlls/wined3d/nvidia_texture_shader.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/nvidia_texture_shader.c b/dlls/wined3d/nvidia_texture_shader.c
index 3587db9..d22989d 100644
--- a/dlls/wined3d/nvidia_texture_shader.c
+++ b/dlls/wined3d/nvidia_texture_shader.c
@@ -28,7 +28,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
-#define GLINFO_LOCATION stateblock->device->adapter->gl_info
+#define GLINFO_LOCATION (*gl_info)
/* GL locking for state handlers is done by the caller. */
@@ -137,7 +137,6 @@ void set_tex_op_nvrc(IWineD3DDevice *iface, BOOL is_alpha, int stage, WINED3DTEX
GLenum portion = is_alpha ? GL_ALPHA : GL_RGB;
GLenum target = GL_COMBINER0_NV + stage;
GLenum output;
- IWineD3DStateBlockImpl *stateblock = This->stateBlock; /* For GLINFO_LOCATION */
TRACE("stage %d, is_alpha %d, op %s, arg1 %#x, arg2 %#x, arg3 %#x, texture_idx %d\n",
stage, is_alpha, debug_d3dtop(op), arg1, arg2, arg3, texture_idx);
@@ -579,6 +578,7 @@ static void nvts_bumpenvmat(DWORD state, IWineD3DStateBlockImpl *stateblock, str
{
DWORD stage = (state - STATE_TEXTURESTAGE(0, 0)) / (WINED3D_HIGHEST_TEXTURE_STATE + 1);
DWORD mapped_stage = stateblock->device->texUnitMap[stage + 1];
+ const struct wined3d_gl_info *gl_info = context->gl_info;
float mat[2][2];
/* Direct3D sets the matrix in the stage reading the perturbation map. The result is used to
@@ -587,7 +587,7 @@ static void nvts_bumpenvmat(DWORD state, IWineD3DStateBlockImpl *stateblock, str
* map is read from a specified source stage(always stage - 1 for d3d). Thus set the matrix
* for stage + 1. Keep the nvrc tex unit mapping in mind too
*/
- if (mapped_stage < context->gl_info->limits.textures)
+ if (mapped_stage < gl_info->limits.textures)
{
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
checkGLcall("GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage))");
@@ -606,6 +606,7 @@ static void nvts_bumpenvmat(DWORD state, IWineD3DStateBlockImpl *stateblock, str
static void nvrc_texfactor(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
{
+ const struct wined3d_gl_info *gl_info = context->gl_info;
float col[4];
D3DCOLORTOGLFLOAT4(stateblock->renderState[WINED3DRS_TEXTUREFACTOR], col);
GL_EXTCALL(glCombinerParameterfvNV(GL_CONSTANT_COLOR0_NV, &col[0]));
More information about the wine-cvs
mailing list