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-08-14 16:20:35 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-18 22:30:09 +0300
commit216d78687d2b9468b05fb598d1cef0b8424a40d2 (patch)
treeb6d53ddf17e27c2cc0805c46fe76764004109f81 /source/blender/gpu/intern/gpu_immediate.cc
parentdf28d2c27e2bef54e5b4fc33d663125ac5ec83f7 (diff)
GPUShader: GL backend isolation
Diffstat (limited to 'source/blender/gpu/intern/gpu_immediate.cc')
-rw-r--r--source/blender/gpu/intern/gpu_immediate.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate.cc b/source/blender/gpu/intern/gpu_immediate.cc
index 2d137c2f21c..ed2950d8ee9 100644
--- a/source/blender/gpu/intern/gpu_immediate.cc
+++ b/source/blender/gpu/intern/gpu_immediate.cc
@@ -35,7 +35,7 @@
#include "gpu_attr_binding_private.h"
#include "gpu_context_private.hh"
#include "gpu_primitive_private.h"
-#include "gpu_shader_private.h"
+#include "gpu_shader_private.hh"
#include "gpu_vertex_format_private.h"
#include <stdlib.h>
@@ -145,10 +145,7 @@ GPUVertFormat *immVertexFormat(void)
void immBindShader(GPUShader *shader)
{
-#if TRUST_NO_ONE
- assert(imm.bound_program == NULL);
- assert(glIsProgram(shader->program));
-#endif
+ BLI_assert(imm.bound_program == NULL);
imm.bound_program = shader;
imm.shader_interface = shader->interface;
@@ -159,8 +156,8 @@ void immBindShader(GPUShader *shader)
GPU_shader_bind(shader);
get_attr_locations(&imm.vertex_format, &imm.attr_binding, imm.shader_interface);
- GPU_matrix_bind(imm.shader_interface);
- GPU_shader_set_srgb_uniform(imm.shader_interface);
+ GPU_matrix_bind(shader);
+ GPU_shader_set_srgb_uniform(shader);
}
void immBindBuiltinProgram(eGPUBuiltinShader shader_id)
@@ -375,7 +372,7 @@ static void immDrawSetup(void)
}
if (GPU_matrix_dirty_get()) {
- GPU_matrix_bind(imm.shader_interface);
+ GPU_matrix_bind(imm.bound_program);
}
}