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:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-02-17 18:38:21 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-02-17 18:38:21 +0300
commit89c79c3ed8d4f8cdf4f78782443bcf218425b412 (patch)
treedefbd5117646c17d8456a30db55d8fedb57998b8 /source/blender/gpu/intern
parent4430e8a00810ca8df2fa20029c4cb8078e8cdbe6 (diff)
Cleanup: Abbreviate enums with 'UNSIGNED_' in the name
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.cc2
-rw-r--r--source/blender/gpu/intern/gpu_select_pick.c2
-rw-r--r--source/blender/gpu/intern/gpu_texture_private.hh18
3 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/gpu/intern/gpu_framebuffer.cc b/source/blender/gpu/intern/gpu_framebuffer.cc
index 2813132c799..0dd7948532c 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.cc
+++ b/source/blender/gpu/intern/gpu_framebuffer.cc
@@ -656,7 +656,7 @@ void GPU_offscreen_draw_to_screen(GPUOffScreen *ofs, int x, int y)
void GPU_offscreen_read_pixels(GPUOffScreen *ofs, eGPUDataFormat format, void *pixels)
{
- BLI_assert(ELEM(format, GPU_DATA_UNSIGNED_BYTE, GPU_DATA_FLOAT));
+ BLI_assert(ELEM(format, GPU_DATA_UBYTE, GPU_DATA_FLOAT));
const int w = GPU_texture_width(ofs->color);
const int h = GPU_texture_height(ofs->color);
diff --git a/source/blender/gpu/intern/gpu_select_pick.c b/source/blender/gpu/intern/gpu_select_pick.c
index 6cda7888712..89c94fd3ba5 100644
--- a/source/blender/gpu/intern/gpu_select_pick.c
+++ b/source/blender/gpu/intern/gpu_select_pick.c
@@ -483,7 +483,7 @@ bool gpu_select_pick_load_id(uint id, bool end)
const uint rect_len = ps->src.rect_len;
GPUFrameBuffer *fb = GPU_framebuffer_active_get();
GPU_framebuffer_read_depth(
- fb, UNPACK4(ps->gl.clip_readpixels), GPU_DATA_UNSIGNED_INT, ps->gl.rect_depth_test->buf);
+ fb, UNPACK4(ps->gl.clip_readpixels), GPU_DATA_UINT, ps->gl.rect_depth_test->buf);
/* perform initial check since most cases the array remains unchanged */
bool do_pass = false;
diff --git a/source/blender/gpu/intern/gpu_texture_private.hh b/source/blender/gpu/intern/gpu_texture_private.hh
index 51a953e110d..e03d5f6e6ce 100644
--- a/source/blender/gpu/intern/gpu_texture_private.hh
+++ b/source/blender/gpu/intern/gpu_texture_private.hh
@@ -387,13 +387,13 @@ inline int to_component_len(eGPUTextureFormat format)
inline size_t to_bytesize(eGPUDataFormat data_format)
{
switch (data_format) {
- case GPU_DATA_UNSIGNED_BYTE:
+ case GPU_DATA_UBYTE:
return 1;
case GPU_DATA_FLOAT:
case GPU_DATA_INT:
- case GPU_DATA_UNSIGNED_INT:
+ case GPU_DATA_UINT:
return 4;
- case GPU_DATA_UNSIGNED_INT_24_8:
+ case GPU_DATA_UINT_24_8:
case GPU_DATA_10_11_11_REV:
return 4;
default:
@@ -417,12 +417,12 @@ inline bool validate_data_format(eGPUTextureFormat tex_format, eGPUDataFormat da
return data_format == GPU_DATA_FLOAT;
case GPU_DEPTH24_STENCIL8:
case GPU_DEPTH32F_STENCIL8:
- return data_format == GPU_DATA_UNSIGNED_INT_24_8;
+ return data_format == GPU_DATA_UINT_24_8;
case GPU_R8UI:
case GPU_R16UI:
case GPU_RG16UI:
case GPU_R32UI:
- return data_format == GPU_DATA_UNSIGNED_INT;
+ return data_format == GPU_DATA_UINT;
case GPU_RG16I:
case GPU_R16I:
return data_format == GPU_DATA_INT;
@@ -431,7 +431,7 @@ inline bool validate_data_format(eGPUTextureFormat tex_format, eGPUDataFormat da
case GPU_RGBA8:
case GPU_RGBA8UI:
case GPU_SRGB8_A8:
- return ELEM(data_format, GPU_DATA_UNSIGNED_BYTE, GPU_DATA_FLOAT);
+ return ELEM(data_format, GPU_DATA_UBYTE, GPU_DATA_FLOAT);
case GPU_R11F_G11F_B10F:
return ELEM(data_format, GPU_DATA_10_11_11_REV, GPU_DATA_FLOAT);
default:
@@ -449,12 +449,12 @@ inline eGPUDataFormat to_data_format(eGPUTextureFormat tex_format)
return GPU_DATA_FLOAT;
case GPU_DEPTH24_STENCIL8:
case GPU_DEPTH32F_STENCIL8:
- return GPU_DATA_UNSIGNED_INT_24_8;
+ return GPU_DATA_UINT_24_8;
case GPU_R8UI:
case GPU_R16UI:
case GPU_RG16UI:
case GPU_R32UI:
- return GPU_DATA_UNSIGNED_INT;
+ return GPU_DATA_UINT;
case GPU_RG16I:
case GPU_R16I:
return GPU_DATA_INT;
@@ -463,7 +463,7 @@ inline eGPUDataFormat to_data_format(eGPUTextureFormat tex_format)
case GPU_RGBA8:
case GPU_RGBA8UI:
case GPU_SRGB8_A8:
- return GPU_DATA_UNSIGNED_BYTE;
+ return GPU_DATA_UBYTE;
case GPU_R11F_G11F_B10F:
return GPU_DATA_10_11_11_REV;
default: