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:
authorAntony Riakiotakis <kalast@gmail.com>2014-12-16 23:52:55 +0300
committerAntony Riakiotakis <kalast@gmail.com>2014-12-16 23:52:55 +0300
commit3e61478b1be7b11b11fbccc37d6d64c99f354717 (patch)
treee51253443b9c84a127e99bd31f42758325245e42 /source/blender/gpu/intern/gpu_material.c
parent1b2fc747925ff369719fdcf97c56a01d1f28b76a (diff)
Fix T42917 shadow maps not working on ATIs.
This is yet another issue with framebuffers. There are two issues: We need the framebuffer fully bound to check for completeness and when we bind a depth texture as frame buffer we need to disable read/write.
Diffstat (limited to 'source/blender/gpu/intern/gpu_material.c')
-rw-r--r--source/blender/gpu/intern/gpu_material.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 31b499d54ab..fcf3425e9c6 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -1953,10 +1953,15 @@ GPULamp *GPU_lamp_from_blender(Scene *scene, Object *ob, Object *par)
return lamp;
}
+ /* we need to properly bind to test for completeness */
+ GPU_texture_bind_as_framebuffer(lamp->blurtex);
+
if (!GPU_framebuffer_check_valid(lamp->blurfb, NULL)) {
gpu_lamp_shadow_free(lamp);
- return lamp;
- }
+ return lamp;
+ }
+
+ GPU_framebuffer_texture_unbind(lamp->blurfb, lamp->blurtex);
}
else {
lamp->tex = GPU_texture_create_depth(lamp->size, lamp->size, NULL);