etnaviv: Switch to shader_core_count from etna_core_info

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30806>
This commit is contained in:
Christian Gmeiner
2024-07-30 23:25:27 +02:00
committed by Marge Bot
parent f304dc57ae
commit 0a6baea787
3 changed files with 3 additions and 4 deletions

View File

@@ -26,6 +26,7 @@
* Wladimir J. van der Laan <laanwj@gmail.com>
*/
#include "etna_core_info.h"
#include "etnaviv_compiler.h"
#include "etnaviv_compiler_nir.h"
#include "etnaviv_asm.h"
@@ -1065,6 +1066,7 @@ etna_compile_check_limits(struct etna_shader_variant *v)
static void
fill_vs_mystery(struct etna_shader_variant *v)
{
const struct etna_core_info *info = v->shader->info;
const struct etna_specs *specs = v->shader->specs;
v->input_count_unk8 = DIV_ROUND_UP(v->infile.num_reg + 4, 16); /* XXX what is this */
@@ -1095,7 +1097,7 @@ fill_vs_mystery(struct etna_shader_variant *v)
2 * half_out * specs->vertex_cache_size)) +
9) /
10;
uint32_t a = (b + 256 / (specs->shader_core_count * half_out)) / 2;
uint32_t a = (b + 256 / (info->gpu.shader_core_count * half_out)) / 2;
v->vs_load_balancing = VIVS_VS_LOAD_BALANCING_A(MIN2(a, 255)) |
VIVS_VS_LOAD_BALANCING_B(MIN2(b, 255)) |
VIVS_VS_LOAD_BALANCING_C(0x3f) |

View File

@@ -107,8 +107,6 @@ struct etna_specs {
unsigned vertex_max_elements;
/* size of a cached vertex (?) */
unsigned vertex_cache_size;
/* number of shader cores */
unsigned shader_core_count;
/* number of vertex streams */
unsigned stream_count;
/* vertex shader memory address*/

View File

@@ -854,7 +854,6 @@ etna_get_specs(struct etna_screen *screen)
instruction_count = info->gpu.max_instructions;
screen->specs.vertex_output_buffer_size = info->gpu.vertex_output_buffer_size;
screen->specs.vertex_cache_size = info->gpu.vertex_cache_size;
screen->specs.shader_core_count = info->gpu.shader_core_count;
screen->specs.stream_count = info->gpu.stream_count;
screen->specs.max_registers = info->gpu.max_registers;
screen->specs.pixel_pipes = info->gpu.pixel_pipes;