diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-04-30 17:15:01 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-04-30 17:39:26 +0300 |
commit | 0a73000dfc1d5a7ca286f21a3c3021943b45bc60 (patch) | |
tree | 8ceb97788ccc6ea6e1c560cb06665f36d6d439e4 | |
parent | eb7188802daf5909351d8a3c01b68303b655c1bc (diff) |
GPUTexture: Add support for GPU_RG16.
-rw-r--r-- | source/blender/draw/intern/draw_manager_texture.c | 1 | ||||
-rw-r--r-- | source/blender/gpu/GPU_texture.h | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.c | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_manager_texture.c b/source/blender/draw/intern/draw_manager_texture.c index 5b4bc765807..71d1ec0e840 100644 --- a/source/blender/draw/intern/draw_manager_texture.c +++ b/source/blender/draw/intern/draw_manager_texture.c @@ -38,6 +38,7 @@ static bool drw_texture_format_supports_framebuffer(GPUTextureFormat format) case GPU_R32F: case GPU_R32UI: case GPU_RG8: + case GPU_RG16: case GPU_RG16F: case GPU_RG16I: case GPU_RG32F: 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: |