diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-07-29 05:55:21 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-07-29 16:03:02 +0300 |
commit | e749643793809248dfc6ffd078be04aec3eeab82 (patch) | |
tree | e9b12ab51205aeb344c17ebd0d38d21c76e7cd69 /source/blender/nodes | |
parent | e4ee9de63899e2da58cdfdd9cbf2ac5bb2e3755a (diff) |
GPU: Refactor gpu_texture_image to not use GL calls
This is also a bit of code cleanup, reorganisation.
Tried to be DRYed but avoid too much code change to (hopefully) minimize
breakage.
- GPU: remove TEXTARGET_CUBE_MAP, this is no longer used in the codebase.
- GPUTexture: Move compressed texture upload to gpu_texture.cc
- GPUTexture: Add per texture Anisotropic filtering switch
Diffstat (limited to 'source/blender/nodes')
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_tex_environment.c | 3 | ||||
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_tex_image.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c index 0cf4b51f307..771b7d5920a 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_environment.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_environment.c @@ -59,7 +59,8 @@ static int node_shader_gpu_tex_environment(GPUMaterial *mat, NodeTexImage *tex_original = node_original->storage; ImageUser *iuser = &tex_original->iuser; eGPUSamplerState sampler = GPU_SAMPLER_REPEAT | GPU_SAMPLER_ANISO | GPU_SAMPLER_FILTER; - if (GPU_get_mipmap()) { + /* TODO(fclem) For now assume mipmap is always enabled. */ + if (true) { sampler |= GPU_SAMPLER_MIPMAP; } diff --git a/source/blender/nodes/shader/nodes/node_shader_tex_image.c b/source/blender/nodes/shader/nodes/node_shader_tex_image.c index cbda72cd228..ff2ecf785d7 100644 --- a/source/blender/nodes/shader/nodes/node_shader_tex_image.c +++ b/source/blender/nodes/shader/nodes/node_shader_tex_image.c @@ -95,7 +95,8 @@ static int node_shader_gpu_tex_image(GPUMaterial *mat, if (tex->interpolation != SHD_INTERP_CLOSEST) { sampler_state |= GPU_SAMPLER_ANISO | GPU_SAMPLER_FILTER; - sampler_state |= GPU_get_mipmap() ? GPU_SAMPLER_MIPMAP : 0; + /* TODO(fclem) For now assume mipmap is always enabled. */ + sampler_state |= true ? GPU_SAMPLER_MIPMAP : 0; } const bool use_cubic = ELEM(tex->interpolation, SHD_INTERP_CUBIC, SHD_INTERP_SMART); |