Mesa (master): intel/compiler: Remove cs_prog_data->threads
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Apr 10 03:30:55 UTC 2020
Module: Mesa
Branch: master
Commit: db74ad0696d205e0991281bc0e222290ab1addd5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=db74ad0696d205e0991281bc0e222290ab1addd5
Author: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
Date: Fri Mar 27 08:29:09 2020 -0700
intel/compiler: Remove cs_prog_data->threads
At this point all drivers are doing this math on their own -- since
most of them need to cover the variable group size case, in which at
compile time the group size (and number of threads) is not defined.
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4504>
---
src/intel/compiler/brw_compiler.h | 1 -
src/intel/compiler/brw_fs.cpp | 22 +++-------------------
src/mesa/drivers/dri/i965/genX_state_upload.c | 3 ---
3 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/src/intel/compiler/brw_compiler.h b/src/intel/compiler/brw_compiler.h
index 2e34b16dd44..03512471d80 100644
--- a/src/intel/compiler/brw_compiler.h
+++ b/src/intel/compiler/brw_compiler.h
@@ -906,7 +906,6 @@ struct brw_cs_prog_data {
unsigned local_size[3];
unsigned max_variable_local_size;
unsigned simd_size;
- unsigned threads;
unsigned slm_size;
bool uses_barrier;
bool uses_num_work_groups;
diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp
index 323fdb56ff5..4e13dcca54a 100644
--- a/src/intel/compiler/brw_fs.cpp
+++ b/src/intel/compiler/brw_fs.cpp
@@ -8864,22 +8864,6 @@ cs_fill_push_const_info(const struct gen_device_info *devinfo,
prog_data->nr_params);
}
-static void
-cs_set_simd_size(struct brw_cs_prog_data *cs_prog_data, unsigned size)
-{
- cs_prog_data->simd_size = size;
-
- unsigned group_size;
- if (cs_prog_data->uses_variable_group_size) {
- group_size = cs_prog_data->max_variable_local_size;
- } else {
- group_size = cs_prog_data->local_size[0] *
- cs_prog_data->local_size[1] *
- cs_prog_data->local_size[2];
- }
- cs_prog_data->threads = DIV_ROUND_UP(group_size, size);
-}
-
static nir_shader *
compile_cs_to_nir(const struct brw_compiler *compiler,
void *mem_ctx,
@@ -8972,7 +8956,7 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
assert(v8->max_dispatch_width >= 32);
v = v8;
- cs_set_simd_size(prog_data, 8);
+ prog_data->simd_size = 8;
cs_fill_push_const_info(compiler->devinfo, prog_data);
}
}
@@ -9002,7 +8986,7 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
assert(v16->max_dispatch_width >= 32);
v = v16;
- cs_set_simd_size(prog_data, 16);
+ prog_data->simd_size = 16;
cs_fill_push_const_info(compiler->devinfo, prog_data);
}
}
@@ -9034,7 +9018,7 @@ brw_compile_cs(const struct brw_compiler *compiler, void *log_data,
}
} else {
v = v32;
- cs_set_simd_size(prog_data, 32);
+ prog_data->simd_size = 32;
cs_fill_push_const_info(compiler->devinfo, prog_data);
}
}
diff --git a/src/mesa/drivers/dri/i965/genX_state_upload.c b/src/mesa/drivers/dri/i965/genX_state_upload.c
index 53c57074279..ac83337b691 100644
--- a/src/mesa/drivers/dri/i965/genX_state_upload.c
+++ b/src/mesa/drivers/dri/i965/genX_state_upload.c
@@ -4267,9 +4267,6 @@ genX(upload_cs_state)(struct brw_context *brw)
const unsigned threads =
DIV_ROUND_UP(brw_cs_group_size(brw), cs_prog_data->simd_size);
- if (!cs_prog_data->uses_variable_group_size)
- assert(cs_prog_data->threads == threads);
-
if (INTEL_DEBUG & DEBUG_SHADER_TIME) {
brw_emit_buffer_surface_state(
brw, &stage_state->surf_offset[
More information about the mesa-commit
mailing list