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:
authorClément Foucault <foucault.clem@gmail.com>2020-09-02 01:27:41 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-05 18:49:14 +0300
commitf72c1c4547e5fab769c22652d9872192029ad7fe (patch)
tree4b89ee42810e0505ed386b76bf5f76f5d4107a1c /source/blender/blenkernel/intern/image_gpu.c
parentc598e939ad25dfc3b4eb1c92b16de401bde0d88a (diff)
GPUTexture: Remove bind to edit calls
This is going to be unecessary after the GPU opengl texture backend refactor. For now add a save/restore mechanism to leave the state untouched. Also remove some calls where the caller would bind to particular binding point and set the shader uniform.
Diffstat (limited to 'source/blender/blenkernel/intern/image_gpu.c')
-rw-r--r--source/blender/blenkernel/intern/image_gpu.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/image_gpu.c b/source/blender/blenkernel/intern/image_gpu.c
index 78a705ae145..0a6015a3933 100644
--- a/source/blender/blenkernel/intern/image_gpu.c
+++ b/source/blender/blenkernel/intern/image_gpu.c
@@ -182,8 +182,6 @@ static GPUTexture *gpu_texture_create_tile_array(Image *ima, ImBuf *main_ibuf)
GPUTexture *tex = IMB_touch_gpu_texture(
main_ibuf, arraywidth, arrayheight, arraylayers, use_high_bitdepth);
- GPU_texture_bind(tex, 0);
-
/* Upload each tile one by one. */
LISTBASE_FOREACH (ImageTile *, tile, &ima->tiles) {
int tilelayer = tile->runtime.tilearray_layer;
@@ -225,8 +223,6 @@ static GPUTexture *gpu_texture_create_tile_array(Image *ima, ImBuf *main_ibuf)
GPU_texture_mipmap_mode(tex, false, true);
}
- GPU_texture_unbind(tex);
-
return tex;
}
@@ -323,9 +319,7 @@ static GPUTexture *image_get_gpu_texture(Image *ima,
*tex = IMB_create_gpu_texture(ibuf_intern, use_high_bitdepth, store_premultiplied);
if (GPU_mipmap_enabled()) {
- GPU_texture_bind(*tex, 0);
GPU_texture_generate_mipmap(*tex);
- GPU_texture_unbind(*tex);
if (ima) {
ima->gpuflag |= IMA_GPU_MIPMAP_COMPLETE;
}
@@ -666,8 +660,6 @@ static void gpu_texture_update_from_ibuf(
}
}
- GPU_texture_bind(tex, 0);
-
if (scaled) {
/* Slower update where we first have to scale the input pixels. */
if (tile != NULL) {