Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-09-15 22:15:11 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-09-15 22:15:11 +0400
commit35c269e3955785dac254cf9a735860e935b3ae63 (patch)
treea647685e5c1dd256466a535955cd030d46c4eb02 /source/blender/gpu
parentcffba77f50455b300efba1de834e2f8edca64519 (diff)
Workaround for an Nvidia driver bug on 32 bit linux (maybe windows too).
I reversed the order of attaching shader objects for linking to solve an issue in the driver before, but now it appears it needs to be the other way around again? I don't know if these are the same cards that now want it different again due to changes in the glsl code, but I found another workaround for the first bug in a forum post (leaving out parameter names in the declarations), so with some luck both cases work? http://developer.nvidia.com/forums/index.php?showtopic=596
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c2
-rw-r--r--source/blender/gpu/intern/gpu_extensions.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 00efe6e1572..78a99cab447 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -331,7 +331,7 @@ static char *gpu_generate_function_prototyps(GHash *hash)
else
BLI_dynstr_append(ds, GPU_DATATYPE_STR[function->paramtype[a]]);
- BLI_dynstr_printf(ds, " param%d", a);
+ //BLI_dynstr_printf(ds, " param%d", a);
if(a != function->totparam-1)
BLI_dynstr_append(ds, ", ");
diff --git a/source/blender/gpu/intern/gpu_extensions.c b/source/blender/gpu/intern/gpu_extensions.c
index c6e9c5aeafd..4c3090dd2c1 100644
--- a/source/blender/gpu/intern/gpu_extensions.c
+++ b/source/blender/gpu/intern/gpu_extensions.c
@@ -695,9 +695,6 @@ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, GPUSh
return NULL;
}
- if(lib && lib->lib)
- glAttachObjectARB(shader->object, lib->lib);
-
if(vertexcode) {
glAttachObjectARB(shader->object, shader->vertex);
glShaderSourceARB(shader->vertex, 1, (const char**)&vertexcode, NULL);
@@ -730,6 +727,9 @@ GPUShader *GPU_shader_create(const char *vertexcode, const char *fragcode, GPUSh
}
}
+ if(lib && lib->lib)
+ glAttachObjectARB(shader->object, lib->lib);
+
glLinkProgramARB(shader->object);
glGetObjectParameterivARB(shader->object, GL_OBJECT_LINK_STATUS_ARB, &status);
if (!status) {