diff --git a/source/blender/draw/intern/DRW_gpu_wrapper.hh b/source/blender/draw/intern/DRW_gpu_wrapper.hh index 2809661c8c8..4d7325f6c2d 100644 --- a/source/blender/draw/intern/DRW_gpu_wrapper.hh +++ b/source/blender/draw/intern/DRW_gpu_wrapper.hh @@ -674,14 +674,6 @@ class Texture : NonCopyable { if (h == 0) { return GPU_texture_create_1d(name_, w, mips, format, data); } - else if (d == 0) { - if (layered) { - return GPU_texture_create_1d_array(name_, w, h, mips, format, data); - } - else { - return GPU_texture_create_2d(name_, w, h, mips, format, data); - } - } else if (cubemap) { if (layered) { return GPU_texture_create_cube_array(name_, w, d, mips, format, data); @@ -690,6 +682,14 @@ class Texture : NonCopyable { return GPU_texture_create_cube(name_, w, mips, format, data); } } + else if (d == 0) { + if (layered) { + return GPU_texture_create_1d_array(name_, w, h, mips, format, data); + } + else { + return GPU_texture_create_2d(name_, w, h, mips, format, data); + } + } else { if (layered) { return GPU_texture_create_2d_array(name_, w, h, d, mips, format, data);