diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-03 22:12:40 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-05 18:49:14 +0300 |
commit | 22a84a673a9fd9942b54a584cbbbab5d0861cbd5 (patch) | |
tree | a821289db59bc66cb968da89e892df15cd5c9408 /source/blender/draw/engines/eevee | |
parent | a92d77acf715f5a775e99b575cc8cc5238b11557 (diff) |
Cleanup: EEVEE: Use correct array size and use equals_v2v2_int
Diffstat (limited to 'source/blender/draw/engines/eevee')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_effects.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_effects.c b/source/blender/draw/engines/eevee/eevee_effects.c index acda2669bb7..a7b067c99d6 100644 --- a/source/blender/draw/engines/eevee/eevee_effects.c +++ b/source/blender/draw/engines/eevee/eevee_effects.c @@ -202,7 +202,7 @@ void EEVEE_effects_init(EEVEE_ViewLayerData *sldata, * Compute Mipmap texel alignment. */ for (int i = 0; i < 10; i++) { - int mip_size[2]; + int mip_size[3]; GPU_texture_get_mipmap_size(txl->color, i, mip_size); common_data->mip_ratio[i][0] = viewport_size[0] / (mip_size[0] * powf(2.0f, i)); common_data->mip_ratio[i][1] = viewport_size[1] / (mip_size[1] * powf(2.0f, i)); @@ -432,7 +432,7 @@ void EEVEE_create_minmax_buffer(EEVEE_Data *vedata, GPUTexture *depth_src, int l int minmax_size[3], depth_size[3]; GPU_texture_get_mipmap_size(depth_src, 0, depth_size); GPU_texture_get_mipmap_size(txl->maxzbuffer, 0, minmax_size); - bool is_full_res_minmaxz = (minmax_size[0] == depth_size[0] && minmax_size[1] == depth_size[1]); + bool is_full_res_minmaxz = equals_v2v2_int(minmax_size, depth_size); DRW_stats_group_start("Max buffer"); /* Copy depth buffer to max texture top level */ |