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:
authorMatteo F. Vescovi <mfv>2021-08-13 15:33:37 +0300
committerJeroen Bakker <jeroen@blender.org>2021-08-13 15:33:50 +0300
commit0b3c7544b532d99d80a25f3cb1f63f14480b46c8 (patch)
treeea10200b7fc8431f14861f13ff527306f17accac
parent4cadccebfacfa8533ba06403960e8b1218da61f5 (diff)
Fix FTBFS on mips64el architecture
While trying to get Blender 2.93.x LTS to build fine on all release architectures in Debian, I noticed that the misleading use of "mips" as integer variable caused problems when compiling on mips64el. The patch should fix the issue. Reviewed By: fclem Differential Revision: https://developer.blender.org/D12194
-rw-r--r--source/blender/draw/intern/draw_manager_texture.c24
-rw-r--r--source/blender/gpu/GPU_texture.h14
2 files changed, 19 insertions, 19 deletions
diff --git a/source/blender/draw/intern/draw_manager_texture.c b/source/blender/draw/intern/draw_manager_texture.c
index 73afdd6e1e3..99e8ba968a2 100644
--- a/source/blender/draw/intern/draw_manager_texture.c
+++ b/source/blender/draw/intern/draw_manager_texture.c
@@ -83,8 +83,8 @@ GPUTexture *DRW_texture_create_1d(int w,
DRWTextureFlag flags,
const float *fpixels)
{
- int mips = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
- GPUTexture *tex = GPU_texture_create_1d(__func__, w, mips, format, fpixels);
+ int mip_len = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
+ GPUTexture *tex = GPU_texture_create_1d(__func__, w, mip_len, format, fpixels);
drw_texture_set_parameters(tex, flags);
return tex;
@@ -93,8 +93,8 @@ GPUTexture *DRW_texture_create_1d(int w,
GPUTexture *DRW_texture_create_2d(
int w, int h, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
{
- int mips = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
- GPUTexture *tex = GPU_texture_create_2d(__func__, w, h, mips, format, fpixels);
+ int mip_len = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
+ GPUTexture *tex = GPU_texture_create_2d(__func__, w, h, mip_len, format, fpixels);
drw_texture_set_parameters(tex, flags);
return tex;
@@ -103,8 +103,8 @@ GPUTexture *DRW_texture_create_2d(
GPUTexture *DRW_texture_create_2d_array(
int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
{
- int mips = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
- GPUTexture *tex = GPU_texture_create_2d_array(__func__, w, h, d, mips, format, fpixels);
+ int mip_len = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
+ GPUTexture *tex = GPU_texture_create_2d_array(__func__, w, h, d, mip_len, format, fpixels);
drw_texture_set_parameters(tex, flags);
return tex;
@@ -113,9 +113,9 @@ GPUTexture *DRW_texture_create_2d_array(
GPUTexture *DRW_texture_create_3d(
int w, int h, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
{
- int mips = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
+ int mip_len = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
GPUTexture *tex = GPU_texture_create_3d(
- __func__, w, h, d, mips, format, GPU_DATA_FLOAT, fpixels);
+ __func__, w, h, d, mip_len, format, GPU_DATA_FLOAT, fpixels);
drw_texture_set_parameters(tex, flags);
return tex;
@@ -126,8 +126,8 @@ GPUTexture *DRW_texture_create_cube(int w,
DRWTextureFlag flags,
const float *fpixels)
{
- int mips = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
- GPUTexture *tex = GPU_texture_create_cube(__func__, w, mips, format, fpixels);
+ int mip_len = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
+ GPUTexture *tex = GPU_texture_create_cube(__func__, w, mip_len, format, fpixels);
drw_texture_set_parameters(tex, flags);
return tex;
}
@@ -135,8 +135,8 @@ GPUTexture *DRW_texture_create_cube(int w,
GPUTexture *DRW_texture_create_cube_array(
int w, int d, eGPUTextureFormat format, DRWTextureFlag flags, const float *fpixels)
{
- int mips = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
- GPUTexture *tex = GPU_texture_create_cube_array(__func__, w, d, mips, format, fpixels);
+ int mip_len = (flags & DRW_TEX_MIPMAP) ? 9999 : 1;
+ GPUTexture *tex = GPU_texture_create_cube_array(__func__, w, d, mip_len, format, fpixels);
drw_texture_set_parameters(tex, flags);
return tex;
}
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index f980c8fdcd7..ee4d08d4059 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -187,25 +187,25 @@ unsigned int GPU_texture_memory_usage_get(void);
* \a mips is the number of mip level to allocate. It must be >= 1.
*/
GPUTexture *GPU_texture_create_1d(
- const char *name, int w, int mips, eGPUTextureFormat format, const float *data);
+ const char *name, int w, int mip_len, eGPUTextureFormat format, const float *data);
GPUTexture *GPU_texture_create_1d_array(
- const char *name, int w, int h, int mips, eGPUTextureFormat format, const float *data);
+ const char *name, int w, int h, int mip_len, eGPUTextureFormat format, const float *data);
GPUTexture *GPU_texture_create_2d(
- const char *name, int w, int h, int mips, eGPUTextureFormat format, const float *data);
+ const char *name, int w, int h, int mip_len, eGPUTextureFormat format, const float *data);
GPUTexture *GPU_texture_create_2d_array(
- const char *name, int w, int h, int d, int mips, eGPUTextureFormat format, const float *data);
+ const char *name, int w, int h, int d, int mip_len, eGPUTextureFormat format, const float *data);
GPUTexture *GPU_texture_create_3d(const char *name,
int w,
int h,
int d,
- int mips,
+ int mip_len,
eGPUTextureFormat texture_format,
eGPUDataFormat data_format,
const void *data);
GPUTexture *GPU_texture_create_cube(
- const char *name, int w, int mips, eGPUTextureFormat format, const float *data);
+ const char *name, int w, int mip_len, eGPUTextureFormat format, const float *data);
GPUTexture *GPU_texture_create_cube_array(
- const char *name, int w, int d, int mips, eGPUTextureFormat format, const float *data);
+ const char *name, int w, int d, int mip_len, eGPUTextureFormat format, const float *data);
/* Special textures. */
GPUTexture *GPU_texture_create_from_vertbuf(const char *name, struct GPUVertBuf *vert);