Cleanup: use lowercase for dimensions in function names
authorCampbell Barton <ideasman42@gmail.com>
Wed, 20 Mar 2019 07:17:16 +0000 (18:17 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 20 Mar 2019 07:25:27 +0000 (18:25 +1100)
Most API's already use this convention.

43 files changed:
source/blender/blenkernel/intern/particle_distribute.c
source/blender/blenkernel/intern/studiolight.c
source/blender/blenlib/BLI_rand.h
source/blender/blenlib/intern/rand.c
source/blender/draw/engines/basic/basic_engine.c
source/blender/draw/engines/eevee/eevee_bloom.c
source/blender/draw/engines/eevee/eevee_depth_of_field.c
source/blender/draw/engines/eevee/eevee_effects.c
source/blender/draw/engines/eevee/eevee_engine.c
source/blender/draw/engines/eevee/eevee_lightcache.c
source/blender/draw/engines/eevee/eevee_lightprobes.c
source/blender/draw/engines/eevee/eevee_lights.c
source/blender/draw/engines/eevee/eevee_materials.c
source/blender/draw/engines/eevee/eevee_mist.c
source/blender/draw/engines/eevee/eevee_occlusion.c
source/blender/draw/engines/eevee/eevee_render.c
source/blender/draw/engines/eevee/eevee_screen_raytrace.c
source/blender/draw/engines/eevee/eevee_subsurface.c
source/blender/draw/engines/eevee/eevee_temporal_sampling.c
source/blender/draw/engines/eevee/eevee_volumes.c
source/blender/draw/engines/external/external_engine.c
source/blender/draw/engines/gpencil/gpencil_engine.c
source/blender/draw/engines/gpencil/gpencil_render.c
source/blender/draw/engines/workbench/workbench_deferred.c
source/blender/draw/engines/workbench/workbench_effect_dof.c
source/blender/draw/engines/workbench/workbench_effect_taa.c
source/blender/draw/engines/workbench/workbench_forward.c
source/blender/draw/engines/workbench/workbench_render.c
source/blender/draw/engines/workbench/workbench_volume.c
source/blender/draw/intern/DRW_render.h
source/blender/draw/intern/draw_common.c
source/blender/draw/intern/draw_hair.c
source/blender/draw/intern/draw_manager.c
source/blender/draw/intern/draw_manager_shader.c
source/blender/draw/intern/draw_manager_texture.c
source/blender/draw/modes/edit_mesh_mode.c
source/blender/draw/modes/object_mode.c
source/blender/gpu/GPU_texture.h
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_framebuffer.c
source/blender/gpu/intern/gpu_material.c
source/blender/gpu/intern/gpu_texture.c
source/blender/gpu/intern/gpu_viewport.c

index bbf8fec..dd0a4a2 100644 (file)
@@ -315,7 +315,7 @@ static void hammersley_create(float *out, int n, int seed, float amount)
        BLI_rng_free(rng);
 
        for (int k = 0; k < n; k++) {
-               BLI_hammersley_1D(k, &t);
+               BLI_hammersley_1d(k, &t);
 
                out[2*k + 0] = fmod((double)k/(double)n + offs[0], 1.0);
                out[2*k + 1] = fmod(t + offs[1], 1.0);
index 16bfee7..7fe2105 100644 (file)
@@ -368,7 +368,7 @@ static void studiolight_create_equirect_radiance_gputexture(StudioLight *sl)
                        MEM_SAFE_FREE(gpu_matcap_3components);
                }
                else {
-                       sl->equirect_radiance_gputexture = GPU_texture_create_2D(
+                       sl->equirect_radiance_gputexture = GPU_texture_create_2d(
                                ibuf->x, ibuf->y, GPU_RGBA16F, ibuf->rect_float, error);
                        GPUTexture *tex = sl->equirect_radiance_gputexture;
                        GPU_texture_bind(tex, 0);
@@ -386,7 +386,7 @@ static void studiolight_create_equirect_irradiance_gputexture(StudioLight *sl)
                char error[256];
                BKE_studiolight_ensure_flag(sl, STUDIOLIGHT_EQUIRECT_IRRADIANCE_IMAGE_CALCULATED);
                ImBuf *ibuf = sl->equirect_irradiance_buffer;
-               sl->equirect_irradiance_gputexture = GPU_texture_create_2D(
+               sl->equirect_irradiance_gputexture = GPU_texture_create_2d(
                        ibuf->x, ibuf->y, GPU_RGBA16F, ibuf->rect_float, error);
                GPUTexture *tex = sl->equirect_irradiance_gputexture;
                GPU_texture_bind(tex, 0);
index 2c6c826..b76dadd 100644 (file)
@@ -90,13 +90,13 @@ int   BLI_rng_thread_rand(RNG_THREAD_ARRAY *rngarr, int thread) ATTR_WARN_UNUSED
 /* Low-discrepancy sequences. */
 
 /** Return the _n_th number of the given low-discrepancy sequence. */
-void BLI_halton_1D(unsigned int prime, double offset, int n, double *r);
-void BLI_halton_2D(unsigned int prime[2], double offset[2], int n, double *r);
-void BLI_halton_3D(unsigned int prime[3], double offset[3], int n, double *r);
-void BLI_hammersley_1D(unsigned int n, double *r);
+void BLI_halton_1d(unsigned int prime, double offset, int n, double *r);
+void BLI_halton_2d(unsigned int prime[2], double offset[2], int n, double *r);
+void BLI_halton_3d(unsigned int prime[3], double offset[3], int n, double *r);
+void BLI_hammersley_1d(unsigned int n, double *r);
 
 /** Return the whole low-discrepancy sequence up to _n_. */
-void BLI_halton_2D_sequence(unsigned int prime[2], double offset[2], int n, double *r);
-void BLI_hammersley_2D_sequence(unsigned int n, double *r);
+void BLI_halton_2d_sequence(unsigned int prime[2], double offset[2], int n, double *r);
+void BLI_hammersley_2d_sequence(unsigned int n, double *r);
 
 #endif  /* __BLI_RAND_H__ */
index 764d0c4..1c76361 100644 (file)
@@ -369,7 +369,7 @@ BLI_INLINE double halton_ex(double invprimes, double *offset)
        return *offset;
 }
 
-void BLI_halton_1D(unsigned int prime, double offset, int n, double *r)
+void BLI_halton_1d(unsigned int prime, double offset, int n, double *r)
 {
        const double invprime = 1.0 / (double)prime;
 
@@ -380,7 +380,7 @@ void BLI_halton_1D(unsigned int prime, double offset, int n, double *r)
        }
 }
 
-void BLI_halton_2D(unsigned int prime[2], double offset[2], int n, double *r)
+void BLI_halton_2d(unsigned int prime[2], double offset[2], int n, double *r)
 {
        const double invprimes[2] = {1.0 / (double)prime[0], 1.0 / (double)prime[1]};
 
@@ -393,7 +393,7 @@ void BLI_halton_2D(unsigned int prime[2], double offset[2], int n, double *r)
        }
 }
 
-void BLI_halton_3D(unsigned int prime[3], double offset[3], int n, double *r)
+void BLI_halton_3d(unsigned int prime[3], double offset[3], int n, double *r)
 {
        const double invprimes[3] = {1.0 / (double)prime[0], 1.0 / (double)prime[1], 1.0 / (double)prime[2]};
 
@@ -406,7 +406,7 @@ void BLI_halton_3D(unsigned int prime[3], double offset[3], int n, double *r)
        }
 }
 
-void BLI_halton_2D_sequence(unsigned int prime[2], double offset[2], int n, double *r)
+void BLI_halton_2d_sequence(unsigned int prime[2], double offset[2], int n, double *r)
 {
        const double invprimes[2] = {1.0 / (double)prime[0], 1.0 / (double)prime[1]};
 
@@ -435,12 +435,12 @@ BLI_INLINE double radical_inverse(unsigned int n)
        return u;
 }
 
-void BLI_hammersley_1D(unsigned int n, double *r)
+void BLI_hammersley_1d(unsigned int n, double *r)
 {
        *r = radical_inverse(n);
 }
 
-void BLI_hammersley_2D_sequence(unsigned int n, double *r)
+void BLI_hammersley_2d_sequence(unsigned int n, double *r)
 {
        for (unsigned int s = 0; s < n; s++) {
                r[s * 2 + 0] = (double)(s + 0.5) / (double)n;
index 1e8b529..91e73e0 100644 (file)
@@ -83,7 +83,7 @@ static void basic_engine_init(void *UNUSED(vedata))
 
        /* Depth prepass */
        if (!sh_data->depth) {
-               sh_data->depth = DRW_shader_create_3D_depth_only(draw_ctx->sh_cfg);
+               sh_data->depth = DRW_shader_create_3d_depth_only(draw_ctx->sh_cfg);
        }
 }
 
index 058215b..cd3e1cd 100644 (file)
@@ -105,7 +105,7 @@ int EEVEE_bloom_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
                effects->blit_texel_size[0] = 1.0f / (float)blitsize[0];
                effects->blit_texel_size[1] = 1.0f / (float)blitsize[1];
 
-               effects->bloom_blit = DRW_texture_pool_query_2D(blitsize[0], blitsize[1], GPU_R11F_G11F_B10F,
+               effects->bloom_blit = DRW_texture_pool_query_2d(blitsize[0], blitsize[1], GPU_R11F_G11F_B10F,
                                                                &draw_engine_eevee_type);
 
                GPU_framebuffer_ensure_config(&fbl->bloom_blit_fb, {
@@ -147,7 +147,7 @@ int EEVEE_bloom_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
                        effects->downsamp_texel_size[i][0] = 1.0f / (float)texsize[0];
                        effects->downsamp_texel_size[i][1] = 1.0f / (float)texsize[1];
 
-                       effects->bloom_downsample[i] = DRW_texture_pool_query_2D(texsize[0], texsize[1], GPU_R11F_G11F_B10F,
+                       effects->bloom_downsample[i] = DRW_texture_pool_query_2d(texsize[0], texsize[1], GPU_R11F_G11F_B10F,
                                                                                 &draw_engine_eevee_type);
                        GPU_framebuffer_ensure_config(&fbl->bloom_down_fb[i], {
                                GPU_ATTACHMENT_NONE,
@@ -163,7 +163,7 @@ int EEVEE_bloom_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *vedata)
                        texsize[0] = MAX2(texsize[0], 2);
                        texsize[1] = MAX2(texsize[1], 2);
 
-                       effects->bloom_upsample[i] = DRW_texture_pool_query_2D(texsize[0], texsize[1], GPU_R11F_G11F_B10F,
+                       effects->bloom_upsample[i] = DRW_texture_pool_query_2d(texsize[0], texsize[1], GPU_R11F_G11F_B10F,
                                                                               &draw_engine_eevee_type);
                        GPU_framebuffer_ensure_config(&fbl->bloom_accum_fb[i], {
                                GPU_ATTACHMENT_NONE,
index 00d9420..7aa1e48 100644 (file)
@@ -97,11 +97,11 @@ int EEVEE_depth_of_field_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *v
 
                        eGPUTextureFormat down_format = DRW_state_draw_background() ? GPU_R11F_G11F_B10F : GPU_RGBA16F;
 
-                       effects->dof_down_near = DRW_texture_pool_query_2D(buffer_size[0], buffer_size[1], down_format,
+                       effects->dof_down_near = DRW_texture_pool_query_2d(buffer_size[0], buffer_size[1], down_format,
                                                                           &draw_engine_eevee_type);
-                       effects->dof_down_far =  DRW_texture_pool_query_2D(buffer_size[0], buffer_size[1], down_format,
+                       effects->dof_down_far =  DRW_texture_pool_query_2d(buffer_size[0], buffer_size[1], down_format,
                                                                           &draw_engine_eevee_type);
-                       effects->dof_coc =       DRW_texture_pool_query_2D(buffer_size[0], buffer_size[1], GPU_RG16F,
+                       effects->dof_coc =       DRW_texture_pool_query_2d(buffer_size[0], buffer_size[1], GPU_RG16F,
                                                                           &draw_engine_eevee_type);
 
                        GPU_framebuffer_ensure_config(&fbl->dof_down_fb, {
@@ -114,7 +114,7 @@ int EEVEE_depth_of_field_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *v
                        /* Go full 32bits for rendering and reduce the color artifacts. */
                        eGPUTextureFormat fb_format = DRW_state_is_image_render() ? GPU_RGBA32F : GPU_RGBA16F;
 
-                       effects->dof_blur = DRW_texture_pool_query_2D(buffer_size[0] * 2, buffer_size[1], fb_format,
+                       effects->dof_blur = DRW_texture_pool_query_2d(buffer_size[0] * 2, buffer_size[1], fb_format,
                                                                      &draw_engine_eevee_type);
 
                        GPU_framebuffer_ensure_config(&fbl->dof_scatter_fb, {
@@ -123,7 +123,7 @@ int EEVEE_depth_of_field_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data *v
                        });
 
                        if (!DRW_state_draw_background()) {
-                               effects->dof_blur_alpha = DRW_texture_pool_query_2D(buffer_size[0] * 2, buffer_size[1], GPU_R32F,
+                               effects->dof_blur_alpha = DRW_texture_pool_query_2d(buffer_size[0] * 2, buffer_size[1], GPU_R32F,
                                                                                    &draw_engine_eevee_type);
                                GPU_framebuffer_texture_attach(fbl->dof_scatter_fb, effects->dof_blur_alpha, 1, 0);
                        }
index 9cb678b..9de01bf 100644 (file)
@@ -110,7 +110,7 @@ static void eevee_create_shader_downsample(void)
 
 #define SETUP_BUFFER(tex, fb, fb_color) { \
        eGPUTextureFormat format = (DRW_state_is_scene_render()) ? GPU_RGBA32F : GPU_RGBA16F; \
-       DRW_texture_ensure_fullscreen_2D(&tex, format, DRW_TEX_FILTER | DRW_TEX_MIPMAP); \
+       DRW_texture_ensure_fullscreen_2d(&tex, format, DRW_TEX_FILTER | DRW_TEX_MIPMAP); \
        GPU_framebuffer_ensure_config(&fb, { \
                GPU_ATTACHMENT_TEXTURE(dtxl->depth), \
                GPU_ATTACHMENT_TEXTURE(tex), \
@@ -193,10 +193,10 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object
 
        if (GPU_type_matches(GPU_DEVICE_INTEL, GPU_OS_ANY, GPU_DRIVER_ANY)) {
                /* Intel gpu seems to have problem rendering to only depth format */
-               DRW_texture_ensure_2D(&txl->maxzbuffer, size[0], size[1], GPU_R32F, DRW_TEX_MIPMAP);
+               DRW_texture_ensure_2d(&txl->maxzbuffer, size[0], size[1], GPU_R32F, DRW_TEX_MIPMAP);
        }
        else {
-               DRW_texture_ensure_2D(&txl->maxzbuffer, size[0], size[1], GPU_DEPTH_COMPONENT24, DRW_TEX_MIPMAP);
+               DRW_texture_ensure_2d(&txl->maxzbuffer, size[0], size[1], GPU_DEPTH_COMPONENT24, DRW_TEX_MIPMAP);
        }
 
        if (fbl->downsample_fb == NULL) {
@@ -217,7 +217,7 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object
         * Normal buffer for deferred passes.
         */
        if ((effects->enabled_effects & EFFECT_NORMAL_BUFFER) != 0)     {
-               effects->ssr_normal_input = DRW_texture_pool_query_2D(size_fs[0], size_fs[1], GPU_RG16,
+               effects->ssr_normal_input = DRW_texture_pool_query_2d(size_fs[0], size_fs[1], GPU_RG16,
                                                                      &draw_engine_eevee_type);
 
                GPU_framebuffer_texture_attach(fbl->main_fb, effects->ssr_normal_input, 1, 0);
@@ -230,7 +230,7 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object
         * Motion vector buffer for correct TAA / motion blur.
         */
        if ((effects->enabled_effects & EFFECT_VELOCITY_BUFFER) != 0) {
-               effects->velocity_tx = DRW_texture_pool_query_2D(size_fs[0], size_fs[1], GPU_RG16,
+               effects->velocity_tx = DRW_texture_pool_query_2d(size_fs[0], size_fs[1], GPU_RG16,
                                                                 &draw_engine_eevee_type);
 
                /* TODO output objects velocity during the mainpass. */
@@ -249,7 +249,7 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata, Object
         * Setup depth double buffer.
         */
        if ((effects->enabled_effects & EFFECT_DEPTH_DOUBLE_BUFFER) != 0) {
-               DRW_texture_ensure_fullscreen_2D(&txl->depth_double_buffer, GPU_DEPTH24_STENCIL8, 0);
+               DRW_texture_ensure_fullscreen_2d(&txl->depth_double_buffer, GPU_DEPTH24_STENCIL8, 0);
 
                GPU_framebuffer_ensure_config(&fbl->double_buffer_depth_fb, {
                        GPU_ATTACHMENT_TEXTURE(txl->depth_double_buffer)
index b1e2f12..5006208 100644 (file)
@@ -61,7 +61,7 @@ static void eevee_engine_init(void *ved)
        stl->g_data->valid_taa_history = (txl->taa_history != NULL);
 
        /* Main Buffer */
-       DRW_texture_ensure_fullscreen_2D(&txl->color, GPU_RGBA16F, DRW_TEX_FILTER | DRW_TEX_MIPMAP);
+       DRW_texture_ensure_fullscreen_2d(&txl->color, GPU_RGBA16F, DRW_TEX_FILTER | DRW_TEX_MIPMAP);
 
        GPU_framebuffer_ensure_config(&fbl->main_fb, {
                GPU_ATTACHMENT_TEXTURE(dtxl->depth),
@@ -203,7 +203,7 @@ static void eevee_draw_background(void *vedata)
                        int samp = taa_use_reprojection
                                    ? stl->effects->taa_reproject_sample + 1
                                    : stl->effects->taa_current_sample;
-                       BLI_halton_3D(primes, offset, samp, r);
+                       BLI_halton_3d(primes, offset, samp, r);
                        EEVEE_update_noise(psl, fbl, r);
                        EEVEE_volumes_set_jitter(sldata, samp - 1);
                        EEVEE_materials_init(sldata, stl, fbl);
index 45ed668..cf2d27e 100644 (file)
@@ -249,12 +249,12 @@ LightCache *EEVEE_lightcache_create(
        light_cache->cube_data = MEM_callocN(sizeof(EEVEE_LightProbe) * cube_len, "EEVEE_LightProbe");
        light_cache->grid_data = MEM_callocN(sizeof(EEVEE_LightGrid) * grid_len, "EEVEE_LightGrid");
 
-       light_cache->grid_tx.tex = DRW_texture_create_2D_array(irr_size[0], irr_size[1], irr_size[2], IRRADIANCE_FORMAT, DRW_TEX_FILTER, NULL);
+       light_cache->grid_tx.tex = DRW_texture_create_2d_array(irr_size[0], irr_size[1], irr_size[2], IRRADIANCE_FORMAT, DRW_TEX_FILTER, NULL);
        light_cache->grid_tx.tex_size[0] = irr_size[0];
        light_cache->grid_tx.tex_size[1] = irr_size[1];
        light_cache->grid_tx.tex_size[2] = irr_size[2];
 
-       light_cache->cube_tx.tex = DRW_texture_create_2D_array(cube_size, cube_size, cube_len, GPU_R11F_G11F_B10F, DRW_TEX_FILTER | DRW_TEX_MIPMAP, NULL);
+       light_cache->cube_tx.tex = DRW_texture_create_2d_array(cube_size, cube_size, cube_len, GPU_R11F_G11F_B10F, DRW_TEX_FILTER | DRW_TEX_MIPMAP, NULL);
        light_cache->cube_tx.tex_size[0] = cube_size;
        light_cache->cube_tx.tex_size[1] = cube_size;
        light_cache->cube_tx.tex_size[2] = cube_len;
@@ -461,7 +461,7 @@ static void eevee_lightbake_create_resources(EEVEE_LightBake *lbake)
        lbake->cube_prb = MEM_callocN(sizeof(LightProbe *) * lbake->cube_len, "EEVEE Cube visgroup ptr");
        lbake->grid_prb = MEM_callocN(sizeof(LightProbe *) * lbake->grid_len, "EEVEE Grid visgroup ptr");
 
-       lbake->grid_prev = DRW_texture_create_2D_array(
+       lbake->grid_prev = DRW_texture_create_2d_array(
                lbake->irr_size[0], lbake->irr_size[1], lbake->irr_size[2],
                IRRADIANCE_FORMAT, DRW_TEX_FILTER, NULL);
 
@@ -727,7 +727,7 @@ static void eevee_lightbake_copy_irradiance(EEVEE_LightBake *lbake, LightCache *
 
        /* Copy texture by reading back and reuploading it. */
        float *tex = GPU_texture_read(lcache->grid_tx.tex, GPU_DATA_FLOAT, 0);
-       lbake->grid_prev = DRW_texture_create_2D_array(lbake->irr_size[0], lbake->irr_size[1], lbake->irr_size[2],
+       lbake->grid_prev = DRW_texture_create_2d_array(lbake->irr_size[0], lbake->irr_size[1], lbake->irr_size[2],
                                                       IRRADIANCE_FORMAT, DRW_TEX_FILTER, tex);
 
        MEM_freeN(tex);
index 04e2cbb..c0dd9a8 100644 (file)
@@ -98,13 +98,13 @@ static struct GPUTexture *create_hammersley_sample_texture(int samples)
 
        for (i = 0; i < samples; i++) {
                double dphi;
-               BLI_hammersley_1D(i, &dphi);
+               BLI_hammersley_1d(i, &dphi);
                float phi = (float)dphi * 2.0f * M_PI;
                texels[i][0] = cosf(phi);
                texels[i][1] = sinf(phi);
        }
 
-       tex = DRW_texture_create_1D(samples, GPU_RG16F, DRW_TEX_WRAP, (float *)texels);
+       tex = DRW_texture_create_1d(samples, GPU_RG16F, DRW_TEX_WRAP, (float *)texels);
        MEM_freeN(texels);
        return tex;
 }
@@ -129,15 +129,15 @@ static void planar_pool_ensure_alloc(EEVEE_Data *vedata, int num_planar_ref)
        /* We need an Array texture so allocate it ourself */
        if (!txl->planar_pool) {
                if (num_planar_ref > 0) {
-                       txl->planar_pool = DRW_texture_create_2D_array(width, height, max_ff(1, num_planar_ref),
+                       txl->planar_pool = DRW_texture_create_2d_array(width, height, max_ff(1, num_planar_ref),
                                                                         GPU_R11F_G11F_B10F, DRW_TEX_FILTER | DRW_TEX_MIPMAP, NULL);
-                       txl->planar_depth = DRW_texture_create_2D_array(width, height, max_ff(1, num_planar_ref),
+                       txl->planar_depth = DRW_texture_create_2d_array(width, height, max_ff(1, num_planar_ref),
                                                                        GPU_DEPTH_COMPONENT24, 0, NULL);
                }
                else if (num_planar_ref == 0) {
                        /* Makes Opengl Happy : Create a placeholder texture that will never be sampled but still bound to shader. */
-                       txl->planar_pool = DRW_texture_create_2D_array(1, 1, 1, GPU_RGBA8, DRW_TEX_FILTER | DRW_TEX_MIPMAP, NULL);
-                       txl->planar_depth = DRW_texture_create_2D_array(1, 1, 1, GPU_DEPTH_COMPONENT24, 0, NULL);
+                       txl->planar_pool = DRW_texture_create_2d_array(1, 1, 1, GPU_RGBA8, DRW_TEX_FILTER | DRW_TEX_MIPMAP, NULL);
+                       txl->planar_depth = DRW_texture_create_2d_array(1, 1, 1, GPU_DEPTH_COMPONENT24, 0, NULL);
                }
        }
 }
@@ -196,7 +196,7 @@ void EEVEE_lightprobes_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
 
        /* Placeholder planar pool: used when rendering planar reflections (avoid dependency loop). */
        if (!e_data.planar_pool_placeholder) {
-               e_data.planar_pool_placeholder = DRW_texture_create_2D_array(1, 1, 1, GPU_RGBA8, DRW_TEX_FILTER, NULL);
+               e_data.planar_pool_placeholder = DRW_texture_create_2d_array(1, 1, 1, GPU_RGBA8, DRW_TEX_FILTER, NULL);
        }
 }
 
index 05e5127..b27aa15 100644 (file)
@@ -555,7 +555,7 @@ void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
                        linfo->shadow_cube_size, shadow_pool_format, DRW_TEX_FILTER, NULL);
        }
        if (!sldata->shadow_cube_pool) {
-               sldata->shadow_cube_pool = DRW_texture_create_2D_array(
+               sldata->shadow_cube_pool = DRW_texture_create_2d_array(
                        linfo->shadow_cube_store_size, linfo->shadow_cube_store_size, max_ii(1, linfo->num_cube_layer),
                        shadow_pool_format, DRW_TEX_FILTER, NULL);
        }
@@ -569,13 +569,13 @@ void EEVEE_lights_cache_finish(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
 
        /* CSM */
        if (!sldata->shadow_cascade_target) {
-               sldata->shadow_cascade_target = DRW_texture_create_2D_array(
+               sldata->shadow_cascade_target = DRW_texture_create_2d_array(
                        linfo->shadow_cascade_size, linfo->shadow_cascade_size, MAX_CASCADE_NUM, GPU_DEPTH_COMPONENT24, 0, NULL);
-               sldata->shadow_cascade_blur = DRW_texture_create_2D_array(
+               sldata->shadow_cascade_blur = DRW_texture_create_2d_array(
                        linfo->shadow_cascade_size, linfo->shadow_cascade_size, MAX_CASCADE_NUM, shadow_pool_format, DRW_TEX_FILTER, NULL);
        }
        if (!sldata->shadow_cascade_pool) {
-               sldata->shadow_cascade_pool = DRW_texture_create_2D_array(
+               sldata->shadow_cascade_pool = DRW_texture_create_2d_array(
                        linfo->shadow_cascade_size, linfo->shadow_cascade_size, max_ii(1, linfo->num_cascade_layer),
                        shadow_pool_format, DRW_TEX_FILTER, NULL);
        }
@@ -728,7 +728,7 @@ static void sample_ball(int sample_ofs, float radius, float rsample[3])
        double ht_offset[3] = {0.0, 0.0, 0.0};
        uint ht_primes[3] = {2, 3, 7};
 
-       BLI_halton_3D(ht_primes, ht_offset, sample_ofs, ht_point);
+       BLI_halton_3d(ht_primes, ht_offset, sample_ofs, ht_point);
 
        float omega = ht_point[1] * 2.0f * M_PI;
 
@@ -751,7 +751,7 @@ static void sample_rectangle(
        double ht_offset[2] = {0.0, 0.0};
        uint ht_primes[2] = {2, 3};
 
-       BLI_halton_2D(ht_primes, ht_offset, sample_ofs, ht_point);
+       BLI_halton_2d(ht_primes, ht_offset, sample_ofs, ht_point);
 
        /* Change ditribution center to be 0,0 */
        ht_point[0] = (ht_point[0] > 0.5f) ? ht_point[0] - 1.0f : ht_point[0];
@@ -770,7 +770,7 @@ static void sample_ellipse(
        double ht_offset[2] = {0.0, 0.0};
        uint ht_primes[2] = {2, 3};
 
-       BLI_halton_2D(ht_primes, ht_offset, sample_ofs, ht_point);
+       BLI_halton_2d(ht_primes, ht_offset, sample_ofs, ht_point);
 
        /* Uniform disc sampling. */
        float omega = ht_point[1] * 2.0f * M_PI;
index 44daa7e..cfe493c 100644 (file)
@@ -137,7 +137,7 @@ static struct GPUTexture *create_ggx_lut_texture(int UNUSED(w), int UNUSED(h))
 
        float *texels = MEM_mallocN(sizeof(float[2]) * w * h, "lut");
 
-       tex = DRW_texture_create_2D(w, h, GPU_RG16F, DRW_TEX_FILTER, (float *)texels);
+       tex = DRW_texture_create_2d(w, h, GPU_RG16F, DRW_TEX_FILTER, (float *)texels);
 
        DRWFboTexture tex_filter = {&tex, GPU_RG16F, DRW_TEX_FILTER};
        GPU_framebuffer_init(&fb, &draw_engine_eevee_type, w, h, &tex_filter, 1);
@@ -199,7 +199,7 @@ static struct GPUTexture *create_ggx_refraction_lut_texture(int w, int h)
 
        float *texels = MEM_mallocN(sizeof(float[2]) * w * h, "lut");
 
-       tex = DRW_texture_create_2D(w, h, GPU_R16F, DRW_TEX_FILTER, (float *)texels);
+       tex = DRW_texture_create_2d(w, h, GPU_R16F, DRW_TEX_FILTER, (float *)texels);
 
        DRWFboTexture tex_filter = {&tex, GPU_R16F, DRW_TEX_FILTER};
        GPU_framebuffer_init(&fb, &draw_engine_eevee_type, w, h, &tex_filter, 1);
@@ -438,7 +438,7 @@ static void eevee_init_dummys(void)
 
 static void eevee_init_noise_texture(void)
 {
-       e_data.noise_tex = DRW_texture_create_2D(64, 64, GPU_RGBA16F, 0, (float *)blue_noise);
+       e_data.noise_tex = DRW_texture_create_2d(64, 64, GPU_RGBA16F, 0, (float *)blue_noise);
 }
 
 static void eevee_init_util_texture(void)
@@ -490,7 +490,7 @@ static void eevee_init_util_texture(void)
                texels_layer += 64 * 64;
        }
 
-       e_data.util_tex = DRW_texture_create_2D_array(
+       e_data.util_tex = DRW_texture_create_2d_array(
                64, 64, layers, GPU_RGBA16F, DRW_TEX_FILTER | DRW_TEX_WRAP, (float *)texels);
 
        MEM_freeN(texels);
@@ -640,7 +640,7 @@ void EEVEE_materials_init(EEVEE_ViewLayerData *sldata, EEVEE_StorageList *stl, E
        }
        else {
                double r;
-               BLI_halton_1D(5, 0.0, stl->effects->taa_current_sample - 1, &r);
+               BLI_halton_1d(5, 0.0, stl->effects->taa_current_sample - 1, &r);
                e_data.alpha_hash_offset = (float)r;
                e_data.alpha_hash_scale = 0.01f;
        }
index 315a877..9a75ba9 100644 (file)
@@ -67,7 +67,7 @@ void EEVEE_mist_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
        }
 
        /* Create FrameBuffer. */
-       DRW_texture_ensure_fullscreen_2D(&txl->mist_accum, GPU_R32F, 0); /* Should be enough precision for many samples. */
+       DRW_texture_ensure_fullscreen_2d(&txl->mist_accum, GPU_R32F, 0); /* Should be enough precision for many samples. */
 
        GPU_framebuffer_ensure_config(&fbl->mist_accum_fb, {
                GPU_ATTACHMENT_NONE,
index 8b0eba7..5e95755 100644 (file)
@@ -99,7 +99,7 @@ int EEVEE_occlusion_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
 
                common_data->ao_bounce_fac = (scene_eval->eevee.flag & SCE_EEVEE_GTAO_BOUNCE) ? 1.0f : 0.0f;
 
-               effects->gtao_horizons = DRW_texture_pool_query_2D(fs_size[0], fs_size[1], GPU_RGBA8,
+               effects->gtao_horizons = DRW_texture_pool_query_2d(fs_size[0], fs_size[1], GPU_RGBA8,
                                                                   &draw_engine_eevee_type);
                GPU_framebuffer_ensure_config(&fbl->gtao_fb, {
                        GPU_ATTACHMENT_NONE,
@@ -107,7 +107,7 @@ int EEVEE_occlusion_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
                });
 
                if (G.debug_value == 6) {
-                       effects->gtao_horizons_debug = DRW_texture_pool_query_2D(fs_size[0], fs_size[1], GPU_RGBA8,
+                       effects->gtao_horizons_debug = DRW_texture_pool_query_2d(fs_size[0], fs_size[1], GPU_RGBA8,
                                                                                 &draw_engine_eevee_type);
                        GPU_framebuffer_ensure_config(&fbl->gtao_debug_fb, {
                                GPU_ATTACHMENT_NONE,
@@ -144,7 +144,7 @@ void EEVEE_occlusion_output_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata
                DefaultTextureList *dtxl = DRW_viewport_texture_list_get();
                float clear[4] = {0.0f, 0.0f, 0.0f, 0.0f};
 
-               DRW_texture_ensure_fullscreen_2D(&txl->ao_accum, GPU_R32F, 0); /* Should be enough precision for many samples. */
+               DRW_texture_ensure_fullscreen_2d(&txl->ao_accum, GPU_R32F, 0); /* Should be enough precision for many samples. */
 
                GPU_framebuffer_ensure_config(&fbl->ao_accum_fb, {
                        GPU_ATTACHMENT_NONE,
index 82cca4f..b7b592d 100644 (file)
@@ -84,8 +84,8 @@ void EEVEE_render_init(EEVEE_Data *ved, RenderEngine *engine, struct Depsgraph *
                                              size_orig[1] + g_data->overscan_pixels * 2.0f});
 
        /* TODO 32 bit depth */
-       DRW_texture_ensure_fullscreen_2D(&dtxl->depth, GPU_DEPTH24_STENCIL8, 0);
-       DRW_texture_ensure_fullscreen_2D(&txl->color, GPU_RGBA32F, DRW_TEX_FILTER | DRW_TEX_MIPMAP);
+       DRW_texture_ensure_fullscreen_2d(&dtxl->depth, GPU_DEPTH24_STENCIL8, 0);
+       DRW_texture_ensure_fullscreen_2d(&txl->color, GPU_RGBA32F, DRW_TEX_FILTER | DRW_TEX_MIPMAP);
 
        GPU_framebuffer_ensure_config(&dfbl->default_fb, {
                GPU_ATTACHMENT_TEXTURE(dtxl->depth),
@@ -509,7 +509,7 @@ void EEVEE_render_draw(EEVEE_Data *vedata, RenderEngine *engine, RenderLayer *rl
                /* Copy previous persmat to UBO data */
                copy_m4_m4(sldata->common_data.prev_persmat, stl->effects->prev_persmat);
 
-               BLI_halton_3D(primes, offset, stl->effects->taa_current_sample, r);
+               BLI_halton_3d(primes, offset, stl->effects->taa_current_sample, r);
                EEVEE_update_noise(psl, fbl, r);
                EEVEE_temporal_sampling_matrices_calc(stl->effects, g_data->viewmat, g_data->persmat, r);
                EEVEE_volumes_set_jitter(sldata, stl->effects->taa_current_sample - 1);
index 113cd35..fe8d35f 100644 (file)
@@ -121,7 +121,7 @@ int EEVEE_screen_raytrace_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
 
                if (use_refraction) {
                        /* TODO: Opti: Could be shared. */
-                       DRW_texture_ensure_fullscreen_2D(&txl->refract_color, GPU_R11F_G11F_B10F, DRW_TEX_FILTER | DRW_TEX_MIPMAP);
+                       DRW_texture_ensure_fullscreen_2d(&txl->refract_color, GPU_R11F_G11F_B10F, DRW_TEX_FILTER | DRW_TEX_MIPMAP);
 
                        GPU_framebuffer_ensure_config(&fbl->refract_fb, {
                                GPU_ATTACHMENT_NONE,
@@ -156,15 +156,15 @@ int EEVEE_screen_raytrace_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
                const eGPUTextureFormat format = (high_qual_input) ? GPU_RGBA16F : GPU_RGBA8;
 
                /* MRT for the shading pass in order to output needed data for the SSR pass. */
-               effects->ssr_specrough_input = DRW_texture_pool_query_2D(size_fs[0], size_fs[1], format,
+               effects->ssr_specrough_input = DRW_texture_pool_query_2d(size_fs[0], size_fs[1], format,
                                                                         &draw_engine_eevee_type);
 
                GPU_framebuffer_texture_attach(fbl->main_fb, effects->ssr_specrough_input, 2, 0);
 
                /* Raytracing output */
-               effects->ssr_hit_output = DRW_texture_pool_query_2D(tracing_res[0], tracing_res[1], GPU_RG16I,
+               effects->ssr_hit_output = DRW_texture_pool_query_2d(tracing_res[0], tracing_res[1], GPU_RG16I,
                                                                    &draw_engine_eevee_type);
-               effects->ssr_pdf_output = DRW_texture_pool_query_2D(tracing_res[0], tracing_res[1], GPU_R16F,
+               effects->ssr_pdf_output = DRW_texture_pool_query_2d(tracing_res[0], tracing_res[1], GPU_R16F,
                                                                    &draw_engine_eevee_type);
 
                GPU_framebuffer_ensure_config(&fbl->screen_tracing_fb, {
index 49bea1f..5954774 100644 (file)
@@ -86,11 +86,11 @@ int EEVEE_subsurface_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
                 * as the depth buffer we are sampling from. This could be avoided if the stencil is
                 * a separate texture but that needs OpenGL 4.4 or ARB_texture_stencil8.
                 * OR OpenGL 4.3 / ARB_ES3_compatibility if using a renderbuffer instead */
-               effects->sss_stencil = DRW_texture_pool_query_2D(fs_size[0], fs_size[1], GPU_DEPTH24_STENCIL8,
+               effects->sss_stencil = DRW_texture_pool_query_2d(fs_size[0], fs_size[1], GPU_DEPTH24_STENCIL8,
                                                                 &draw_engine_eevee_type);
-               effects->sss_blur =    DRW_texture_pool_query_2D(fs_size[0], fs_size[1], GPU_RGBA16F,
+               effects->sss_blur =    DRW_texture_pool_query_2d(fs_size[0], fs_size[1], GPU_RGBA16F,
                                                                 &draw_engine_eevee_type);
-               effects->sss_data =    DRW_texture_pool_query_2D(fs_size[0], fs_size[1], GPU_RGBA16F,
+               effects->sss_data =    DRW_texture_pool_query_2d(fs_size[0], fs_size[1], GPU_RGBA16F,
                                                                 &draw_engine_eevee_type);
 
                GPUTexture *stencil_tex = effects->sss_stencil;
@@ -123,7 +123,7 @@ int EEVEE_subsurface_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
                });
 
                if (effects->sss_separate_albedo) {
-                       effects->sss_albedo = DRW_texture_pool_query_2D(fs_size[0], fs_size[1], GPU_R11F_G11F_B10F,
+                       effects->sss_albedo = DRW_texture_pool_query_2d(fs_size[0], fs_size[1], GPU_R11F_G11F_B10F,
                                                                        &draw_engine_eevee_type);
                }
                else {
@@ -160,8 +160,8 @@ void EEVEE_subsurface_output_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Dat
        const Scene *scene_eval = DEG_get_evaluated_scene(draw_ctx->depsgraph);
 
        if (scene_eval->eevee.flag & SCE_EEVEE_SSS_ENABLED) {
-               DRW_texture_ensure_fullscreen_2D(&txl->sss_dir_accum, GPU_RGBA16F, 0);
-               DRW_texture_ensure_fullscreen_2D(&txl->sss_col_accum, GPU_RGBA16F, 0);
+               DRW_texture_ensure_fullscreen_2d(&txl->sss_dir_accum, GPU_RGBA16F, 0);
+               DRW_texture_ensure_fullscreen_2d(&txl->sss_col_accum, GPU_RGBA16F, 0);
 
                GPUTexture *stencil_tex = effects->sss_stencil;
 
index 592d119..fd3a23b 100644 (file)
@@ -231,7 +231,7 @@ int EEVEE_temporal_sampling_init(EEVEE_ViewLayerData *UNUSED(sldata), EEVEE_Data
                                        double ht_offset[2] = {0.0, 0.0};
                                        uint ht_primes[2] = {2, 3};
 
-                                       BLI_halton_2D(ht_primes, ht_offset, effects->taa_current_sample - 1, ht_point);
+                                       BLI_halton_2d(ht_primes, ht_offset, effects->taa_current_sample - 1, ht_point);
 
                                        EEVEE_temporal_sampling_matrices_calc(effects, viewmat, persmat, ht_point);
 
index 6bdf3aa..7262b3d 100644 (file)
@@ -136,7 +136,7 @@ void EEVEE_volumes_set_jitter(EEVEE_ViewLayerData *sldata, uint current_sample)
        double ht_offset[3] = {0.0, 0.0};
        uint ht_primes[3] = {3, 7, 2};
 
-       BLI_halton_3D(ht_primes, ht_offset, current_sample, ht_point);
+       BLI_halton_3d(ht_primes, ht_offset, current_sample, ht_point);
 
        common_data->vol_jitter[0] = (float)ht_point[0];
        common_data->vol_jitter[1] = (float)ht_point[1];
@@ -209,30 +209,30 @@ int EEVEE_volumes_init(EEVEE_ViewLayerData *sldata, EEVEE_Data *vedata)
                if (txl->volume_prop_scattering == NULL) {
                        /* Volume properties: We evaluate all volumetric objects
                         * and store their final properties into each froxel */
-                       txl->volume_prop_scattering = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2],
+                       txl->volume_prop_scattering = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2],
                                                                            GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL);
-                       txl->volume_prop_extinction = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2],
+                       txl->volume_prop_extinction = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2],
                                                                            GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL);
-                       txl->volume_prop_emission = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2],
+                       txl->volume_prop_emission = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2],
                                                                          GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL);
-                       txl->volume_prop_phase = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2],
+                       txl->volume_prop_phase = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2],
                                                                       GPU_RG16F, DRW_TEX_FILTER, NULL);
 
                        /* Volume scattering: We compute for each froxel the
                         * Scattered light towards the view. We also resolve temporal
                         * super sampling during this stage. */
-                       txl->volume_scatter = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2],
+                       txl->volume_scatter = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2],
                                                                    GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL);
-                       txl->volume_transmittance = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2],
+                       txl->volume_transmittance = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2],
                                                                          GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL);
 
                        /* Final integration: We compute for each froxel the
                         * amount of scattered light and extinction coef at this
                         * given depth. We use theses textures as double buffer
                         * for the volumetric history. */
-                       txl->volume_scatter_history = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2],
+                       txl->volume_scatter_history = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2],
                                                                            GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL);
-                       txl->volume_transmittance_history = DRW_texture_create_3D(tex_size[0], tex_size[1], tex_size[2],
+                       txl->volume_transmittance_history = DRW_texture_create_3d(tex_size[0], tex_size[1], tex_size[2],
                                                                                  GPU_R11F_G11F_B10F, DRW_TEX_FILTER, NULL);
                }
 
index 0100fa0..c1da7c4 100644 (file)
@@ -92,7 +92,7 @@ static void external_engine_init(void *UNUSED(vedata))
 {
        /* Depth prepass */
        if (!e_data.depth_sh) {
-               e_data.depth_sh = DRW_shader_create_3D_depth_only(GPU_SHADER_CFG_DEFAULT);
+               e_data.depth_sh = DRW_shader_create_3d_depth_only(GPU_SHADER_CFG_DEFAULT);
        }
 }
 
index bfda709..3bee7d0 100644 (file)
@@ -79,11 +79,11 @@ void DRW_gpencil_multisample_ensure(GPENCIL_Data *vedata, int rect_w, int rect_h
                        fbl->multisample_fb = GPU_framebuffer_create();
                        if (fbl->multisample_fb) {
                                if (txl->multisample_color == NULL) {
-                                       txl->multisample_color = GPU_texture_create_2D_multisample(
+                                       txl->multisample_color = GPU_texture_create_2d_multisample(
                                                rect_w, rect_h, GPU_RGBA16F, NULL, samples, NULL);
                                }
                                if (txl->multisample_depth == NULL) {
-                                       txl->multisample_depth = GPU_texture_create_2D_multisample(
+                                       txl->multisample_depth = GPU_texture_create_2d_multisample(
                                                rect_w, rect_h, GPU_DEPTH_COMPONENT24, NULL, samples, NULL);
                                }
                                GPU_framebuffer_ensure_config(
@@ -118,10 +118,10 @@ static void GPENCIL_create_framebuffers(void *vedata)
                /* Framebufers for basic object drawing */
                if (stl->storage->framebuffer_flag & GP_FRAMEBUFFER_BASIC) {
                        /* temp textures for ping-pong buffers */
-                       e_data.temp_depth_tx_a = DRW_texture_pool_query_2D(
+                       e_data.temp_depth_tx_a = DRW_texture_pool_query_2d(
                                size[0], size[1], GPU_DEPTH_COMPONENT24,
                                &draw_engine_gpencil_type);
-                       e_data.temp_color_tx_a = DRW_texture_pool_query_2D(
+                       e_data.temp_color_tx_a = DRW_texture_pool_query_2d(
                                size[0], size[1], fb_format,
                                &draw_engine_gpencil_type);
                        GPU_framebuffer_ensure_config(
@@ -130,10 +130,10 @@ static void GPENCIL_create_framebuffers(void *vedata)
                                    GPU_ATTACHMENT_TEXTURE(e_data.temp_color_tx_a),
                                });
 
-                       e_data.temp_depth_tx_b = DRW_texture_pool_query_2D(
+                       e_data.temp_depth_tx_b = DRW_texture_pool_query_2d(
                                size[0], size[1], GPU_DEPTH_COMPONENT24,
                                &draw_engine_gpencil_type);
-                       e_data.temp_color_tx_b = DRW_texture_pool_query_2D(
+                       e_data.temp_color_tx_b = DRW_texture_pool_query_2d(
                                size[0], size[1], fb_format,
                                &draw_engine_gpencil_type);
                        GPU_framebuffer_ensure_config(
@@ -143,10 +143,10 @@ static void GPENCIL_create_framebuffers(void *vedata)
                                });
 
                        /* used for FX effects and Layer blending */
-                       e_data.temp_depth_tx_fx = DRW_texture_pool_query_2D(
+                       e_data.temp_depth_tx_fx = DRW_texture_pool_query_2d(
                                size[0], size[1], GPU_DEPTH_COMPONENT24,
                                &draw_engine_gpencil_type);
-                       e_data.temp_color_tx_fx = DRW_texture_pool_query_2D(
+                       e_data.temp_color_tx_fx = DRW_texture_pool_query_2d(
                                size[0], size[1], fb_format,
                                &draw_engine_gpencil_type);
                        GPU_framebuffer_ensure_config(
@@ -158,10 +158,10 @@ static void GPENCIL_create_framebuffers(void *vedata)
 
                /* background framebuffer to speed up drawing process (always 16 bits) */
                if (stl->storage->framebuffer_flag & GP_FRAMEBUFFER_DRAW) {
-                       e_data.background_depth_tx = DRW_texture_pool_query_2D(
+                       e_data.background_depth_tx = DRW_texture_pool_query_2d(
                                size[0], size[1], GPU_DEPTH_COMPONENT24,
                                &draw_engine_gpencil_type);
-                       e_data.background_color_tx = DRW_texture_pool_query_2D(
+                       e_data.background_color_tx = DRW_texture_pool_query_2d(
                                size[0], size[1], GPU_RGBA32F,
                                &draw_engine_gpencil_type);
                        GPU_framebuffer_ensure_config(
@@ -261,7 +261,7 @@ void GPENCIL_engine_init(void *vedata)
        /* blank texture used if no texture defined for fill shader */
        if (!e_data.gpencil_blank_texture) {
                float rect[16][16][4] = {{{0.0f}}};
-               e_data.gpencil_blank_texture = DRW_texture_create_2D(16, 16, GPU_RGBA8, DRW_TEX_FILTER, (float *)rect);
+               e_data.gpencil_blank_texture = DRW_texture_create_2d(16, 16, GPU_RGBA8, DRW_TEX_FILTER, (float *)rect);
        }
 }
 
index d754fdf..45fef77 100644 (file)
@@ -80,10 +80,10 @@ void GPENCIL_render_init(GPENCIL_Data *ved, RenderEngine *engine, struct Depsgra
                DRW_gpencil_multisample_ensure(vedata, rect_w, rect_h);
        }
 
-       vedata->render_depth_tx = DRW_texture_pool_query_2D(
+       vedata->render_depth_tx = DRW_texture_pool_query_2d(
                size[0], size[1], GPU_DEPTH_COMPONENT24,
                &draw_engine_gpencil_type);
-       vedata->render_color_tx = DRW_texture_pool_query_2D(
+       vedata->render_color_tx = DRW_texture_pool_query_2d(
                size[0], size[1], GPU_RGBA32F,
                &draw_engine_gpencil_type);
        GPU_framebuffer_ensure_config(
index 1fe0202..b23c01d 100644 (file)
@@ -289,7 +289,7 @@ static float *create_disk_samples(int num_samples, int num_iterations)
                float it_add = (i / num_samples) * 0.499f;
                float r = fmodf((i + 0.5f + it_add) * num_samples_inv, 1.0f);
                double dphi;
-               BLI_hammersley_1D(i, &dphi);
+               BLI_hammersley_1d(i, &dphi);
 
                float phi = (float)dphi * 2.0f * M_PI + it_add;
                texels[i][0] = cosf(phi);
@@ -321,7 +321,7 @@ static struct GPUTexture *create_jitter_texture(int num_samples)
 
        UNUSED_VARS(bsdf_split_sum_ggx, btdf_split_sum_ggx, ltc_mag_ggx, ltc_mat_ggx, ltc_disk_integral);
 
-       return DRW_texture_create_2D(64, 64, GPU_RGBA16F, DRW_TEX_FILTER | DRW_TEX_WRAP, &jitter[0][0]);
+       return DRW_texture_create_2d(64, 64, GPU_RGBA16F, DRW_TEX_FILTER | DRW_TEX_WRAP, &jitter[0][0]);
 }
 /* Functions */
 
@@ -336,8 +336,8 @@ static void workbench_init_object_data(DrawData *dd)
 static void workbench_init_oit_framebuffer(WORKBENCH_FramebufferList *fbl, DefaultTextureList *dtxl)
 {
        const float *size = DRW_viewport_size_get();
-       e_data.oit_accum_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RGBA16F, &draw_engine_workbench_solid);
-       e_data.oit_revealage_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_R16F, &draw_engine_workbench_solid);
+       e_data.oit_accum_tx = DRW_texture_pool_query_2d(size[0], size[1], GPU_RGBA16F, &draw_engine_workbench_solid);
+       e_data.oit_revealage_tx = DRW_texture_pool_query_2d(size[0], size[1], GPU_R16F, &draw_engine_workbench_solid);
 
        GPU_framebuffer_ensure_config(&fbl->transparent_accum_fb, {
                GPU_ATTACHMENT_TEXTURE(dtxl->depth),
@@ -454,19 +454,19 @@ void workbench_deferred_engine_init(WORKBENCH_Data *vedata)
                e_data.normal_buffer_tx = NULL;
                e_data.cavity_buffer_tx = NULL;
 
-               e_data.composite_buffer_tx = DRW_texture_pool_query_2D(size[0], size[1], comp_tex_format, &draw_engine_workbench_solid);
+               e_data.composite_buffer_tx = DRW_texture_pool_query_2d(size[0], size[1], comp_tex_format, &draw_engine_workbench_solid);
 
                if (MATDATA_PASS_ENABLED(wpd) || GPU_unused_fb_slot_workaround()) {
-                       e_data.color_buffer_tx = DRW_texture_pool_query_2D(size[0], size[1], col_tex_format, &draw_engine_workbench_solid);
+                       e_data.color_buffer_tx = DRW_texture_pool_query_2d(size[0], size[1], col_tex_format, &draw_engine_workbench_solid);
                }
                if (OBJECT_ID_PASS_ENABLED(wpd) || GPU_unused_fb_slot_workaround()) {
-                       e_data.object_id_tx = DRW_texture_pool_query_2D(size[0], size[1], id_tex_format, &draw_engine_workbench_solid);
+                       e_data.object_id_tx = DRW_texture_pool_query_2d(size[0], size[1], id_tex_format, &draw_engine_workbench_solid);
                }
                if (NORMAL_VIEWPORT_PASS_ENABLED(wpd)) {
-                       e_data.normal_buffer_tx = DRW_texture_pool_query_2D(size[0], size[1], nor_tex_format, &draw_engine_workbench_solid);
+                       e_data.normal_buffer_tx = DRW_texture_pool_query_2d(size[0], size[1], nor_tex_format, &draw_engine_workbench_solid);
                }
                if (CAVITY_ENABLED(wpd)) {
-                       e_data.cavity_buffer_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_R16, &draw_engine_workbench_solid);
+                       e_data.cavity_buffer_tx = DRW_texture_pool_query_2d(size[0], size[1], GPU_R16, &draw_engine_workbench_solid);
                }
 
                GPU_framebuffer_ensure_config(&fbl->prepass_fb, {
@@ -489,7 +489,7 @@ void workbench_deferred_engine_init(WORKBENCH_Data *vedata)
                });
 
                if (!MATDATA_PASS_ENABLED(wpd) && !GPU_unused_fb_slot_workaround()) {
-                       e_data.color_buffer_tx = DRW_texture_pool_query_2D(size[0], size[1], col_tex_format, &draw_engine_workbench_solid);
+                       e_data.color_buffer_tx = DRW_texture_pool_query_2d(size[0], size[1], col_tex_format, &draw_engine_workbench_solid);
                }
 
                GPU_framebuffer_ensure_config(&fbl->effect_fb, {
@@ -584,7 +584,7 @@ static void workbench_setup_ghost_framebuffer(WORKBENCH_FramebufferList *fbl)
        const float *viewport_size = DRW_viewport_size_get();
        const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
 
-       e_data.ghost_depth_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_DEPTH_COMPONENT24, &draw_engine_workbench_solid);
+       e_data.ghost_depth_tx = DRW_texture_pool_query_2d(size[0], size[1], GPU_DEPTH_COMPONENT24, &draw_engine_workbench_solid);
 
        GPU_framebuffer_ensure_config(&fbl->ghost_prepass_fb, {
                GPU_ATTACHMENT_TEXTURE(e_data.ghost_depth_tx),
index c6aeefc..dca6535 100644 (file)
@@ -186,13 +186,13 @@ void workbench_dof_engine_init(WORKBENCH_Data *vedata, Object *camera)
        int shrink_w_size[2] = {shrink_h_size[0], ceilf(size[1] / 8.0f)};
 #endif
 
-       DRW_texture_ensure_2D(&txl->dof_source_tx, size[0], size[1], GPU_R11F_G11F_B10F, DRW_TEX_FILTER | DRW_TEX_MIPMAP);
-       DRW_texture_ensure_2D(&txl->coc_halfres_tx, size[0], size[1], GPU_RG8, DRW_TEX_FILTER | DRW_TEX_MIPMAP);
-       wpd->dof_blur_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_R11F_G11F_B10F, &draw_engine_workbench_solid);
+       DRW_texture_ensure_2d(&txl->dof_source_tx, size[0], size[1], GPU_R11F_G11F_B10F, DRW_TEX_FILTER | DRW_TEX_MIPMAP);
+       DRW_texture_ensure_2d(&txl->coc_halfres_tx, size[0], size[1], GPU_RG8, DRW_TEX_FILTER | DRW_TEX_MIPMAP);
+       wpd->dof_blur_tx = DRW_texture_pool_query_2d(size[0], size[1], GPU_R11F_G11F_B10F, &draw_engine_workbench_solid);
 #if 0
-       wpd->coc_temp_tx     = DRW_texture_pool_query_2D(shrink_h_size[0], shrink_h_size[1], GPU_RG8, &draw_engine_workbench_solid);
-       wpd->coc_tiles_tx[0] = DRW_texture_pool_query_2D(shrink_w_size[0], shrink_w_size[1], GPU_RG8, &draw_engine_workbench_solid);
-       wpd->coc_tiles_tx[1] = DRW_texture_pool_query_2D(shrink_w_size[0], shrink_w_size[1], GPU_RG8, &draw_engine_workbench_solid);
+       wpd->coc_temp_tx     = DRW_texture_pool_query_2d(shrink_h_size[0], shrink_h_size[1], GPU_RG8, &draw_engine_workbench_solid);
+       wpd->coc_tiles_tx[0] = DRW_texture_pool_query_2d(shrink_w_size[0], shrink_w_size[1], GPU_RG8, &draw_engine_workbench_solid);
+       wpd->coc_tiles_tx[1] = DRW_texture_pool_query_2d(shrink_w_size[0], shrink_w_size[1], GPU_RG8, &draw_engine_workbench_solid);
 #endif
 
        GPU_framebuffer_ensure_config(&fbl->dof_downsample_fb, {
index b61cbff..cbc0e34 100644 (file)
@@ -173,8 +173,8 @@ DRWPass *workbench_taa_create_pass(WORKBENCH_Data *vedata, GPUTexture **color_bu
 
        {
                const eGPUTextureFormat hist_buffer_format = DRW_state_is_image_render() ? GPU_RGBA16F : GPU_RGBA8;
-               DRW_texture_ensure_fullscreen_2D(&txl->history_buffer_tx, hist_buffer_format, 0);
-               DRW_texture_ensure_fullscreen_2D(&txl->depth_buffer_tx, GPU_DEPTH24_STENCIL8, 0);
+               DRW_texture_ensure_fullscreen_2d(&txl->history_buffer_tx, hist_buffer_format, 0);
+               DRW_texture_ensure_fullscreen_2d(&txl->depth_buffer_tx, GPU_DEPTH24_STENCIL8, 0);
        }
 
        {
index bf5de40..a31eb49 100644 (file)
@@ -313,13 +313,13 @@ void workbench_forward_engine_init(WORKBENCH_Data *vedata)
        const float *viewport_size = DRW_viewport_size_get();
        const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
 
-       e_data.object_id_tx = DRW_texture_pool_query_2D(
+       e_data.object_id_tx = DRW_texture_pool_query_2d(
                size[0], size[1], GPU_R32UI, &draw_engine_workbench_transparent);
-       e_data.transparent_accum_tx = DRW_texture_pool_query_2D(
+       e_data.transparent_accum_tx = DRW_texture_pool_query_2d(
                size[0], size[1], GPU_RGBA16F, &draw_engine_workbench_transparent);
-       e_data.transparent_revealage_tx = DRW_texture_pool_query_2D(
+       e_data.transparent_revealage_tx = DRW_texture_pool_query_2d(
                size[0], size[1], GPU_R16F, &draw_engine_workbench_transparent);
-       e_data.composite_buffer_tx = DRW_texture_pool_query_2D(
+       e_data.composite_buffer_tx = DRW_texture_pool_query_2d(
                size[0], size[1], GPU_R11F_G11F_B10F, &draw_engine_workbench_transparent);
 
        GPU_framebuffer_ensure_config(&fbl->object_outline_fb, {
index 7a0e415..c551a36 100644 (file)
@@ -86,8 +86,8 @@ static bool workbench_render_framebuffers_init(void)
        const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
 
        DefaultTextureList *dtxl = DRW_viewport_texture_list_get();
-       dtxl->color = GPU_texture_create_2D(size[0], size[1], GPU_RGBA16F, NULL, NULL);
-       dtxl->depth = GPU_texture_create_2D(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, NULL);
+       dtxl->color = GPU_texture_create_2d(size[0], size[1], GPU_RGBA16F, NULL, NULL);
+       dtxl->depth = GPU_texture_create_2d(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, NULL);
 
        if (!(dtxl->depth && dtxl->color)) {
                return false;
index 90d68ce..0f5debc 100644 (file)
@@ -92,8 +92,8 @@ void workbench_volume_engine_init(void)
 {
        if (!e_data.dummy_tex) {
                float pixel[4] = {0.0f, 0.0f, 0.0f, 0.0f};
-               e_data.dummy_tex = GPU_texture_create_3D(1, 1, 1, GPU_RGBA8, pixel, NULL);
-               e_data.dummy_coba_tex = GPU_texture_create_1D(1, GPU_RGBA8, pixel, NULL);
+               e_data.dummy_tex = GPU_texture_create_3d(1, 1, 1, GPU_RGBA8, pixel, NULL);
+               e_data.dummy_coba_tex = GPU_texture_create_1d(1, GPU_RGBA8, pixel, NULL);
        }
 }
 
@@ -168,7 +168,7 @@ void workbench_volume_cache_populate(WORKBENCH_Data *vedata, Scene *scene, Objec
        }
        else {
                double noise_ofs;
-               BLI_halton_1D(3, 0.0, effect_info->jitter_index, &noise_ofs);
+               BLI_halton_1d(3, 0.0, effect_info->jitter_index, &noise_ofs);
                float dim[3], step_length, max_slice;
                float slice_ct[3] = {sds->res[0], sds->res[1], sds->res[2]};
                mul_v3_fl(slice_ct, max_ff(0.001f, sds->slice_per_voxel));
index dee686e..5c505f1 100644 (file)
@@ -194,22 +194,22 @@ typedef enum {
 /* Textures from DRW_texture_pool_query_* have the options
  * DRW_TEX_FILTER for color float textures, and no options
  * for depth textures and integer textures. */
-struct GPUTexture *DRW_texture_pool_query_2D(int w, int h, eGPUTextureFormat format, DrawEngineType *engine_type);
+struct GPUTexture *DRW_texture_pool_query_2d(int w, int h, eGPUTextureFormat format, DrawEngineType *engine_type);
 
-struct GPUTexture *DRW_texture_create_1D(
+struct GPUTexture *DRW_texture_create_1d(
         int w, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
-struct GPUTexture *DRW_texture_create_2D(
+struct GPUTexture *DRW_texture_create_2d(
         int w, int h, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
-struct GPUTexture *DRW_texture_create_2D_array(
+struct GPUTexture *DRW_texture_create_2d_array(
         int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
-struct GPUTexture *DRW_texture_create_3D(
+struct GPUTexture *DRW_texture_create_3d(
         int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
 struct GPUTexture *DRW_texture_create_cube(
         int w, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels);
 
-void DRW_texture_ensure_fullscreen_2D(
+void DRW_texture_ensure_fullscreen_2d(
         struct GPUTexture **tex, eGPUTextureFormat format, DRWTextureFlag flags);
-void DRW_texture_ensure_2D(
+void DRW_texture_ensure_2d(
         struct GPUTexture **tex, int w, int h, eGPUTextureFormat format, DRWTextureFlag flags);
 
 void DRW_texture_generate_mipmaps(struct GPUTexture *tex);
@@ -245,10 +245,10 @@ struct GPUShader *DRW_shader_create_with_lib(
 struct GPUShader *DRW_shader_create_with_transform_feedback(
         const char *vert, const char *geom, const char *defines,
         const eGPUShaderTFBType prim_type, const char **varying_names, const int varying_count);
-struct GPUShader *DRW_shader_create_2D(const char *frag, const char *defines);
-struct GPUShader *DRW_shader_create_3D(const char *frag, const char *defines);
+struct GPUShader *DRW_shader_create_2d(const char *frag, const char *defines);
+struct GPUShader *DRW_shader_create_3d(const char *frag, const char *defines);
 struct GPUShader *DRW_shader_create_fullscreen(const char *frag, const char *defines);
-struct GPUShader *DRW_shader_create_3D_depth_only(eGPUShaderConfig slot);
+struct GPUShader *DRW_shader_create_3d_depth_only(eGPUShaderConfig slot);
 struct GPUMaterial *DRW_shader_find_from_world(struct World *wo, const void *engine_type, int options, bool deferred);
 struct GPUMaterial *DRW_shader_find_from_material(struct Material *ma, const void *engine_type, int options, bool deferred);
 struct GPUMaterial *DRW_shader_create_from_world(
index 2d1316f..49cc666 100644 (file)
@@ -182,7 +182,7 @@ void DRW_globals_update(void)
 
                BKE_colorband_evaluate_table_rgba(&ramp, &colors, &col_size);
 
-               G_draw.ramp = GPU_texture_create_1D(col_size, GPU_RGBA8, colors, NULL);
+               G_draw.ramp = GPU_texture_create_1d(col_size, GPU_RGBA8, colors, NULL);
 
                MEM_freeN(colors);
        }
@@ -1133,5 +1133,5 @@ static GPUTexture *DRW_create_weight_colorramp_texture(void)
                pixels[i][3] = 1.0f;
        }
 
-       return GPU_texture_create_1D(256, GPU_RGBA8, pixels[0], error);
+       return GPU_texture_create_1d(256, GPU_RGBA8, pixels[0], error);
 }
index bbe5b4c..1d0fb5c 100644 (file)
@@ -263,7 +263,7 @@ void DRW_hair_update(void)
         * Do chunks of maximum 2048 * 2048 hair points. */
        int width = 2048;
        int height = min_ii(width, 1 + max_size / width);
-       GPUTexture *tex = DRW_texture_pool_query_2D(width, height, GPU_RGBA32F, (void *)DRW_hair_update);
+       GPUTexture *tex = DRW_texture_pool_query_2d(width, height, GPU_RGBA32F, (void *)DRW_hair_update);
        g_tf_target_height = height;
        g_tf_target_width = width;
 
index 45a49f2..db565b9 100644 (file)
@@ -2043,7 +2043,7 @@ static void draw_select_framebuffer_depth_only_setup(const rcti *rect)
        }
 
        if (g_select_buffer.texture_depth == NULL) {
-               g_select_buffer.texture_depth = GPU_texture_create_2D(
+               g_select_buffer.texture_depth = GPU_texture_create_2d(
                        size[0], size[1], GPU_DEPTH_COMPONENT24, NULL, NULL);
 
                GPU_framebuffer_texture_attach(
@@ -2078,7 +2078,7 @@ static void draw_select_framebuffer_select_id_setup(const rcti *rect)
        }
 
        if (g_select_buffer.texture_u32 == NULL) {
-               g_select_buffer.texture_u32 = GPU_texture_create_2D(
+               g_select_buffer.texture_u32 = GPU_texture_create_2d(
                        size[0], size[1], GPU_R32UI, NULL, NULL);
 
                GPU_framebuffer_texture_attach(
index 54ad98d..1fc6b61 100644 (file)
@@ -297,12 +297,12 @@ GPUShader *DRW_shader_create_with_transform_feedback(
                                    prim_type, varying_names, varying_count, __func__);
 }
 
-GPUShader *DRW_shader_create_2D(const char *frag, const char *defines)
+GPUShader *DRW_shader_create_2d(const char *frag, const char *defines)
 {
        return GPU_shader_create(datatoc_gpu_shader_2D_vert_glsl, frag, NULL, NULL, defines, __func__);
 }
 
-GPUShader *DRW_shader_create_3D(const char *frag, const char *defines)
+GPUShader *DRW_shader_create_3d(const char *frag, const char *defines)
 {
        return GPU_shader_create(datatoc_gpu_shader_3D_vert_glsl, frag, NULL, NULL, defines, __func__);
 }
@@ -312,7 +312,7 @@ GPUShader *DRW_shader_create_fullscreen(const char *frag, const char *defines)
        return GPU_shader_create(datatoc_common_fullscreen_vert_glsl, frag, NULL, NULL, defines, __func__);
 }
 
-GPUShader *DRW_shader_create_3D_depth_only(eGPUShaderConfig sh_cfg)
+GPUShader *DRW_shader_create_3d_depth_only(eGPUShaderConfig sh_cfg)
 {
        return GPU_shader_get_builtin_shader_with_config(GPU_SHADER_3D_DEPTH_ONLY, sh_cfg);
 }
index 235523f..92fca2d 100644 (file)
@@ -73,35 +73,35 @@ void drw_texture_set_parameters(GPUTexture *tex, DRWTextureFlag flags)
        GPU_texture_unbind(tex);
 }
 
-GPUTexture *DRW_texture_create_1D(int w, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
+GPUTexture *DRW_texture_create_1d(int w, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
 {
-       GPUTexture *tex = GPU_texture_create_1D(w, format, fpixels, NULL);
+       GPUTexture *tex = GPU_texture_create_1d(w, format, fpixels, NULL);
        drw_texture_set_parameters(tex, flags);
 
        return tex;
 }
 
-GPUTexture *DRW_texture_create_2D(int w, int h, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
+GPUTexture *DRW_texture_create_2d(int w, int h, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
 {
-       GPUTexture *tex = GPU_texture_create_2D(w, h, format, fpixels, NULL);
+       GPUTexture *tex = GPU_texture_create_2d(w, h, format, fpixels, NULL);
        drw_texture_set_parameters(tex, flags);
 
        return tex;
 }
 
-GPUTexture *DRW_texture_create_2D_array(
+GPUTexture *DRW_texture_create_2d_array(
         int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
 {
-       GPUTexture *tex = GPU_texture_create_2D_array(w, h, d, format, fpixels, NULL);
+       GPUTexture *tex = GPU_texture_create_2d_array(w, h, d, format, fpixels, NULL);
        drw_texture_set_parameters(tex, flags);
 
        return tex;
 }
 
-GPUTexture *DRW_texture_create_3D(
+GPUTexture *DRW_texture_create_3d(
         int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
 {
-       GPUTexture *tex = GPU_texture_create_3D(w, h, d, format, fpixels, NULL);
+       GPUTexture *tex = GPU_texture_create_3d(w, h, d, format, fpixels, NULL);
        drw_texture_set_parameters(tex, flags);
 
        return tex;
@@ -115,7 +115,7 @@ GPUTexture *DRW_texture_create_cube(int w, eGPUTextureFormat format, DRWTextureF
        return tex;
 }
 
-GPUTexture *DRW_texture_pool_query_2D(int w, int h, eGPUTextureFormat format, DrawEngineType *engine_type)
+GPUTexture *DRW_texture_pool_query_2d(int w, int h, eGPUTextureFormat format, DrawEngineType *engine_type)
 {
        BLI_assert(drw_texture_format_supports_framebuffer(format));
        GPUTexture *tex = GPU_viewport_texture_pool_query(DST.viewport, engine_type, w, h, format);
@@ -123,18 +123,18 @@ GPUTexture *DRW_texture_pool_query_2D(int w, int h, eGPUTextureFormat format, Dr
        return tex;
 }
 
-void DRW_texture_ensure_fullscreen_2D(GPUTexture **tex, eGPUTextureFormat format, DRWTextureFlag flags)
+void DRW_texture_ensure_fullscreen_2d(GPUTexture **tex, eGPUTextureFormat format, DRWTextureFlag flags)
 {
        if (*(tex) == NULL) {
                const float *size = DRW_viewport_size_get();
-               *(tex) = DRW_texture_create_2D((int)size[0], (int)size[1], format, flags, NULL);
+               *(tex) = DRW_texture_create_2d((int)size[0], (int)size[1], format, flags, NULL);
        }
 }
 
-void DRW_texture_ensure_2D(GPUTexture **tex, int w, int h, eGPUTextureFormat format, DRWTextureFlag flags)
+void DRW_texture_ensure_2d(GPUTexture **tex, int w, int h, eGPUTextureFormat format, DRWTextureFlag flags)
 {
        if (*(tex) == NULL) {
-               *(tex) = DRW_texture_create_2D(w, h, format, flags, NULL);
+               *(tex) = DRW_texture_create_2d(w, h, format, flags, NULL);
        }
 }
 
index 4256746..b38b509 100644 (file)
@@ -162,9 +162,9 @@ static void EDIT_MESH_engine_init(void *vedata)
        const float *viewport_size = DRW_viewport_size_get();
        const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
 
-       e_data.occlude_wire_depth_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_DEPTH_COMPONENT24,
+       e_data.occlude_wire_depth_tx = DRW_texture_pool_query_2d(size[0], size[1], GPU_DEPTH_COMPONENT24,
                                                                 &draw_engine_edit_mesh_type);
-       e_data.occlude_wire_color_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RGBA8,
+       e_data.occlude_wire_color_tx = DRW_texture_pool_query_2d(size[0], size[1], GPU_RGBA8,
                                                                 &draw_engine_edit_mesh_type);
 
        GPU_framebuffer_ensure_config(&fbl->occlude_wire_fb, {
@@ -255,7 +255,7 @@ static void EDIT_MESH_engine_init(void *vedata)
                        .defs = (const char *[]){sh_cfg_data->def, NULL},
                });
 
-               sh_data->depth = DRW_shader_create_3D_depth_only(draw_ctx->sh_cfg);
+               sh_data->depth = DRW_shader_create_3d_depth_only(draw_ctx->sh_cfg);
 
                sh_data->ghost_clear_depth = DRW_shader_create_fullscreen(datatoc_gpu_shader_depth_only_frag_glsl, NULL);
        }
@@ -710,7 +710,7 @@ static void EDIT_MESH_draw_scene(void *vedata)
                         * the stencil buffer is no 0x00. */
                        const float *viewport_size = DRW_viewport_size_get();
                        const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
-                       struct GPUTexture *ghost_depth_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_DEPTH24_STENCIL8, &draw_engine_edit_mesh_type);
+                       struct GPUTexture *ghost_depth_tx = DRW_texture_pool_query_2d(size[0], size[1], GPU_DEPTH24_STENCIL8, &draw_engine_edit_mesh_type);
                        GPU_framebuffer_ensure_config(&fbl->ghost_wire_fb, {
                                GPU_ATTACHMENT_TEXTURE(ghost_depth_tx),
                                GPU_ATTACHMENT_TEXTURE(dtxl->color),
index bef0f6e..4fad882 100644 (file)
@@ -366,12 +366,12 @@ static void OBJECT_engine_init(void *vedata)
        const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
 
        if (DRW_state_is_fbo()) {
-               e_data.outlines_depth_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_DEPTH_COMPONENT24,
+               e_data.outlines_depth_tx = DRW_texture_pool_query_2d(size[0], size[1], GPU_DEPTH_COMPONENT24,
                                                                     &draw_engine_object_type);
                /* XXX TODO GPU_R16UI can overflow, it would cause no harm
                 * (only bad colored or missing outlines) but we should
                 * use 32bits only if the scene have that many objects */
-               e_data.outlines_id_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_R16UI,
+               e_data.outlines_id_tx = DRW_texture_pool_query_2d(size[0], size[1], GPU_R16UI,
                                                                  &draw_engine_object_type);
 
                GPU_framebuffer_ensure_config(&fbl->outlines_fb, {
@@ -379,7 +379,7 @@ static void OBJECT_engine_init(void *vedata)
                        GPU_ATTACHMENT_TEXTURE(e_data.outlines_id_tx)
                });
 
-               e_data.outlines_color_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RGBA8,
+               e_data.outlines_color_tx = DRW_texture_pool_query_2d(size[0], size[1], GPU_RGBA8,
                                                                     &draw_engine_object_type);
 
                GPU_framebuffer_ensure_config(&fbl->expand_fb, {
@@ -387,7 +387,7 @@ static void OBJECT_engine_init(void *vedata)
                        GPU_ATTACHMENT_TEXTURE(e_data.outlines_color_tx)
                });
 
-               e_data.outlines_blur_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_RGBA8,
+               e_data.outlines_blur_tx = DRW_texture_pool_query_2d(size[0], size[1], GPU_RGBA8,
                                                                    &draw_engine_object_type);
 
                GPU_framebuffer_ensure_config(&fbl->blur_fb, {
@@ -3346,7 +3346,7 @@ static void OBJECT_draw_scene(void *vedata)
                        const float *viewport_size = DRW_viewport_size_get();
                        const int size[2] = {(int)viewport_size[0], (int)viewport_size[1]};
 
-                       GPUTexture *ghost_depth_tx = DRW_texture_pool_query_2D(size[0], size[1], GPU_DEPTH_COMPONENT24, &draw_engine_object_type);
+                       GPUTexture *ghost_depth_tx = DRW_texture_pool_query_2d(size[0], size[1], GPU_DEPTH_COMPONENT24, &draw_engine_object_type);
                        GPU_framebuffer_ensure_config(&fbl->ghost_fb, {
                                GPU_ATTACHMENT_TEXTURE(ghost_depth_tx),
                                GPU_ATTACHMENT_TEXTURE(dtxl->color),
index 5732bad..e596fe9 100644 (file)
@@ -153,17 +153,17 @@ GPUTexture *GPU_texture_create_nD(
         eGPUTextureFormat tex_format, eGPUDataFormat gpu_data_format, int samples,
         const bool can_rescale, char err_out[256]);
 
-GPUTexture *GPU_texture_create_1D(
+GPUTexture *GPU_texture_create_1d(
         int w, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
-GPUTexture *GPU_texture_create_1D_array(
+GPUTexture *GPU_texture_create_1d_array(
         int w, int h, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
-GPUTexture *GPU_texture_create_2D(
+GPUTexture *GPU_texture_create_2d(
         int w, int h, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
-GPUTexture *GPU_texture_create_2D_multisample(
+GPUTexture *GPU_texture_create_2d_multisample(
         int w, int h, eGPUTextureFormat data_type, const float *pixels, int samples, char err_out[256]);
-GPUTexture *GPU_texture_create_2D_array(
+GPUTexture *GPU_texture_create_2d_array(
         int w, int h, int d, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
-GPUTexture *GPU_texture_create_3D(
+GPUTexture *GPU_texture_create_3d(
         int w, int h, int d, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
 GPUTexture *GPU_texture_create_cube(
         int w, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
index d91ea23..65c07ea 100644 (file)
@@ -855,7 +855,7 @@ static GPUTexture *create_transfer_function(int type, const ColorBand *coba)
                        break;
        }
 
-       GPUTexture *tex = GPU_texture_create_1D(TFUNC_WIDTH, GPU_RGBA8, data, NULL);
+       GPUTexture *tex = GPU_texture_create_1d(TFUNC_WIDTH, GPU_RGBA8, data, NULL);
 
        MEM_freeN(data);
 
@@ -1067,9 +1067,9 @@ void GPU_create_smoke_velocity(SmokeModifierData *smd)
                }
 
                if (!sds->tex_velocity_x) {
-                       sds->tex_velocity_x = GPU_texture_create_3D(sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_x, NULL);
-                       sds->tex_velocity_y = GPU_texture_create_3D(sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_y, NULL);
-                       sds->tex_velocity_z = GPU_texture_create_3D(sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_z, NULL);
+                       sds->tex_velocity_x = GPU_texture_create_3d(sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_x, NULL);
+                       sds->tex_velocity_y = GPU_texture_create_3d(sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_y, NULL);
+                       sds->tex_velocity_z = GPU_texture_create_3d(sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_z, NULL);
                }
        }
 #else // WITH_SMOKE
index 461d747..83acdf6 100644 (file)
@@ -791,12 +791,12 @@ GPUOffScreen *GPU_offscreen_create(int width, int height, int samples, bool dept
        height = max_ii(1, height);
        width  = max_ii(1, width);
 
-       ofs->color = GPU_texture_create_2D_multisample(
+       ofs->color = GPU_texture_create_2d_multisample(
                width, height,
                (high_bitdepth) ? GPU_RGBA16F : GPU_RGBA8, NULL, samples, err_out);
 
        if (depth) {
-               ofs->depth = GPU_texture_create_2D_multisample(width, height, GPU_DEPTH24_STENCIL8, NULL, samples, err_out);
+               ofs->depth = GPU_texture_create_2d_multisample(width, height, GPU_DEPTH24_STENCIL8, NULL, samples, err_out);
        }
 
        if ((depth && !ofs->depth) || !ofs->color) {
index 302b3b4..af8fcf6 100644 (file)
@@ -165,7 +165,7 @@ static void gpu_material_ramp_texture_build(GPUMaterial *mat)
 
        GPUColorBandBuilder *builder = mat->coba_builder;
 
-       mat->coba_tex = GPU_texture_create_1D_array(CM_TABLE + 1, builder->current_layer, GPU_RGBA16F,
+       mat->coba_tex = GPU_texture_create_1d_array(CM_TABLE + 1, builder->current_layer, GPU_RGBA16F,
                                                    (float *)builder->pixels, NULL);
 
        MEM_freeN(builder);
@@ -539,7 +539,7 @@ struct GPUUniformBuffer *GPU_material_sss_profile_get(GPUMaterial *material, int
                        GPU_texture_free(material->sss_tex_profile);
                }
 
-               material->sss_tex_profile = GPU_texture_create_1D(64, GPU_RGBA16F, translucence_profile, NULL);
+               material->sss_tex_profile = GPU_texture_create_1d(64, GPU_RGBA16F, translucence_profile, NULL);
 
                MEM_freeN(translucence_profile);
 
index c950ead..ebb7b4b 100644 (file)
@@ -439,7 +439,7 @@ static GLenum gpu_get_gl_datatype(eGPUDataFormat format)
        }
 }
 
-static float *GPU_texture_3D_rescale(GPUTexture *tex, int w, int h, int d, int channels, const float *fpixels)
+static float *GPU_texture_rescale_3d(GPUTexture *tex, int w, int h, int d, int channels, const float *fpixels)
 {
        const uint xf = w / tex->w, yf = h / tex->h, zf = d / tex->d;
        float *nfpixels = MEM_mallocN(channels * sizeof(float) * tex->w * tex->h * tex->d, "GPUTexture Rescaled 3Dtex");
@@ -575,7 +575,7 @@ static bool gpu_texture_try_alloc(
                                        return false;
                                case GL_PROXY_TEXTURE_3D:
                                        BLI_assert(data_type == GL_FLOAT);
-                                       *rescaled_fpixels = GPU_texture_3D_rescale(tex, w, h, d, channels, fpixels);
+                                       *rescaled_fpixels = GPU_texture_rescale_3d(tex, w, h, d, channels, fpixels);
                                        return (bool)*rescaled_fpixels;
                        }
                }
@@ -985,7 +985,7 @@ GPUTexture *GPU_texture_from_preview(PreviewImage *prv, int mipmap)
 
 }
 
-GPUTexture *GPU_texture_create_1D(
+GPUTexture *GPU_texture_create_1d(
         int w, eGPUTextureFormat tex_format, const float *pixels, char err_out[256])
 {
        BLI_assert(w > 0);
@@ -993,7 +993,7 @@ GPUTexture *GPU_texture_create_1D(
        return GPU_texture_create_nD(w, 0, 0, 1, pixels, tex_format, data_format, 0, false, err_out);
 }
 
-GPUTexture *GPU_texture_create_1D_array(
+GPUTexture *GPU_texture_create_1d_array(
         int w, int h, eGPUTextureFormat tex_format, const float *pixels, char err_out[256])
 {
        BLI_assert(w > 0 && h > 0);
@@ -1001,7 +1001,7 @@ GPUTexture *GPU_texture_create_1D_array(
        return GPU_texture_create_nD(w, h, 0, 1, pixels, tex_format, data_format, 0, false, err_out);
 }
 
-GPUTexture *GPU_texture_create_2D(
+GPUTexture *GPU_texture_create_2d(
         int w, int h, eGPUTextureFormat tex_format, const float *pixels, char err_out[256])
 {
        BLI_assert(w > 0 && h > 0);
@@ -1009,7 +1009,7 @@ GPUTexture *GPU_texture_create_2D(
        return GPU_texture_create_nD(w, h, 0, 2, pixels, tex_format, data_format, 0, false, err_out);
 }
 
-GPUTexture *GPU_texture_create_2D_multisample(
+GPUTexture *GPU_texture_create_2d_multisample(
         int w, int h, eGPUTextureFormat tex_format, const float *pixels, int samples, char err_out[256])
 {
        BLI_assert(w > 0 && h > 0);
@@ -1017,7 +1017,7 @@ GPUTexture *GPU_texture_create_2D_multisample(
        return GPU_texture_create_nD(w, h, 0, 2, pixels, tex_format, data_format, samples, false, err_out);
 }
 
-GPUTexture *GPU_texture_create_2D_array(
+GPUTexture *GPU_texture_create_2d_array(
         int w, int h, int d, eGPUTextureFormat tex_format, const float *pixels, char err_out[256])
 {
        BLI_assert(w > 0 && h > 0 && d > 0);
@@ -1025,7 +1025,7 @@ GPUTexture *GPU_texture_create_2D_array(
        return GPU_texture_create_nD(w, h, d, 2, pixels, tex_format, data_format, 0, false, err_out);
 }
 
-GPUTexture *GPU_texture_create_3D(
+GPUTexture *GPU_texture_create_3d(
         int w, int h, int d, eGPUTextureFormat tex_format, const float *pixels, char err_out[256])
 {
        BLI_assert(w > 0 && h > 0 && d > 0);
@@ -1275,9 +1275,9 @@ void GPU_invalid_tex_init(void)
 {
        memory_usage = 0;
        const float color[4] = {1.0f, 0.0f, 1.0f, 1.0f};
-       GG.invalid_tex_1D = GPU_texture_create_1D(1, GPU_RGBA8, color, NULL);
-       GG.invalid_tex_2D = GPU_texture_create_2D(1, 1, GPU_RGBA8, color, NULL);
-       GG.invalid_tex_3D = GPU_texture_create_3D(1, 1, 1, GPU_RGBA8, color, NULL);
+       GG.invalid_tex_1D = GPU_texture_create_1d(1, GPU_RGBA8, color, NULL);
+       GG.invalid_tex_2D = GPU_texture_create_2d(1, 1, GPU_RGBA8, color, NULL);
+       GG.invalid_tex_3D = GPU_texture_create_3d(1, 1, 1, GPU_RGBA8, color, NULL);
 }
 
 void GPU_invalid_tex_bind(int mode)
index 7688b11..9a39b72 100644 (file)
@@ -304,7 +304,7 @@ GPUTexture *GPU_viewport_texture_pool_query(GPUViewport *viewport, void *engine,
                }
        }
 
-       tex = GPU_texture_create_2D(width, height, format, NULL, NULL);
+       tex = GPU_texture_create_2d(width, height, format, NULL, NULL);
        GPU_texture_bind(tex, 0);
        /* Doing filtering for depth does not make sense when not doing shadow mapping,
         * and enabling texture filtering on integer texture make them unreadable. */
@@ -381,8 +381,8 @@ static void gpu_viewport_default_fb_create(GPUViewport *viewport)
        int *size = viewport->size;
        bool ok = true;
 
-       dtxl->color = GPU_texture_create_2D(size[0], size[1], GPU_RGBA8, NULL, NULL);
-       dtxl->depth = GPU_texture_create_2D(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, NULL);
+       dtxl->color = GPU_texture_create_2d(size[0], size[1], GPU_RGBA8, NULL, NULL);
+       dtxl->depth = GPU_texture_create_2d(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, NULL);
 
        if (!(dtxl->depth && dtxl->color)) {
                ok = false;
@@ -426,8 +426,8 @@ static void gpu_viewport_default_multisample_fb_create(GPUViewport *viewport)
        int samples = viewport->samples;
        bool ok = true;
 
-       dtxl->multisample_color = GPU_texture_create_2D_multisample(size[0], size[1], GPU_RGBA8, NULL, samples, NULL);
-       dtxl->multisample_depth = GPU_texture_create_2D_multisample(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, samples, NULL);
+       dtxl->multisample_color = GPU_texture_create_2d_multisample(size[0], size[1], GPU_RGBA8, NULL, samples, NULL);
+       dtxl->multisample_depth = GPU_texture_create_2d_multisample(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, samples, NULL);
 
        if (!(dtxl->multisample_depth && dtxl->multisample_color)) {
                ok = false;