diff options
author | Jordan Justen <jordan.l.justen@intel.com> | 2018-11-14 11:04:15 -0800 |
---|---|---|
committer | Jordan Justen <jordan.l.justen@intel.com> | 2021-01-13 13:10:27 -0800 |
commit | 435b272241e0edf3081e5819372f9fa955518544 (patch) | |
tree | 257f1f49a99971bb8237d06cad3e48d6b452a8d9 | |
parent | b4ffbf152137d24b20bb24dbbaa7945fd706970d (diff) | |
download | mesa-435b272241e0edf3081e5819372f9fa955518544.tar.gz |
anv: Emit CFE_STATE for gen12-hp
Rework:
* make scratch TODO. (Jason)
* emit_compute_cs_state => emit_compute_state. (Jason)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8342>
-rw-r--r-- | src/intel/vulkan/genX_pipeline.c | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 205e8677f19..404d80ae225 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -2340,9 +2340,36 @@ genX(graphics_pipeline_create)( return pipeline->base.batch.status; } +#if GEN_GEN > 12 || GEN_IS_GEN12HP + +static void +emit_compute_state(struct anv_compute_pipeline *pipeline, + const struct anv_device *device) +{ + const struct brw_cs_prog_data *cs_prog_data = get_cs_prog_data(pipeline); + anv_pipeline_setup_l3_config(&pipeline->base, cs_prog_data->base.total_shared > 0); + + const struct anv_cs_parameters cs_params = anv_cs_parameters(pipeline); + pipeline->cs_right_mask = brw_cs_right_mask(cs_params.group_size, cs_params.simd_size); + + const uint32_t subslices = MAX2(device->physical->subslice_total, 1); + + const struct anv_shader_bin *cs_bin = pipeline->cs; + const struct gen_device_info *devinfo = &device->info; + + anv_batch_emit(&pipeline->base.batch, GENX(CFE_STATE), cfe) { + cfe.MaximumNumberofThreads = + devinfo->max_cs_threads * subslices - 1; + /* TODO: Enable gen12-hp scratch support*/ + assert(get_scratch_space(cs_bin) == 0); + } +} + +#else /* #if GEN_GEN > 12 || GEN_IS_GEN12HP */ + static void -emit_media_cs_state(struct anv_compute_pipeline *pipeline, - const struct anv_device *device) +emit_compute_state(struct anv_compute_pipeline *pipeline, + const struct anv_device *device) { const struct brw_cs_prog_data *cs_prog_data = get_cs_prog_data(pipeline); @@ -2447,6 +2474,8 @@ emit_media_cs_state(struct anv_compute_pipeline *pipeline, &desc); } +#endif /* #if GEN_GEN > 12 || GEN_IS_GEN12HP */ + static VkResult compute_pipeline_create( VkDevice _device, @@ -2496,7 +2525,7 @@ compute_pipeline_create( return result; } - emit_media_cs_state(pipeline, device); + emit_compute_state(pipeline, device); *pPipeline = anv_pipeline_to_handle(&pipeline->base); |