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>2018-04-30 17:15:01 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-04-30 17:39:26 +0300
commit0a73000dfc1d5a7ca286f21a3c3021943b45bc60 (patch)
tree8ceb97788ccc6ea6e1c560cb06665f36d6d439e4 /source/blender/gpu
parenteb7188802daf5909351d8a3c01b68303b655c1bc (diff)
GPUTexture: Add support for GPU_RG16.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_texture.h2
-rw-r--r--source/blender/gpu/intern/gpu_texture.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index f6fe4fe28e5..a64b0a0a862 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -68,6 +68,7 @@ typedef enum GPUTextureFormat {
GPU_RG32F,
GPU_RG16F,
GPU_RG16I,
+ GPU_RG16,
GPU_R32F,
GPU_R32UI,
GPU_R16F,
@@ -85,7 +86,6 @@ typedef enum GPUTextureFormat {
GPU_RGBA8UI,
GPU_RG32I,
GPU_RG32UI,
- GPU_RG16,
GPU_RG16UI,
GPU_RG8I,
GPU_RG8UI,
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index 3f2fc52b4d6..d55bc02c836 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -192,6 +192,7 @@ static GLenum gpu_texture_get_format(
break;
case GPU_RG16F:
case GPU_RG16I:
+ case GPU_RG16:
case GPU_DEPTH24_STENCIL8:
case GPU_DEPTH_COMPONENT32F:
case GPU_RGBA8:
@@ -227,6 +228,7 @@ static GLenum gpu_texture_get_format(
case GPU_RGB16F: return GL_RGB16F;
case GPU_RG16F: return GL_RG16F;
case GPU_RG16I: return GL_RG16I;
+ case GPU_RG16: return GL_RG16;
case GPU_RGBA8: return GL_RGBA8;
case GPU_R32F: return GL_R32F;
case GPU_R32UI: return GL_R32UI;
@@ -263,6 +265,7 @@ static int gpu_texture_get_component_count(GPUTextureFormat format)
case GPU_R11F_G11F_B10F:
return 3;
case GPU_RG8:
+ case GPU_RG16:
case GPU_RG16F:
case GPU_RG16I:
case GPU_RG32F: