[Mesa-dev] [PATCH v2 00/20] Rework pipeline emitting.
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Mon Jan 29 01:07:45 UTC 2018
This changes emitting pipelines to pregenerate the PM$ sequences to bind the
pipeline at pipeline creation time, so we can just memcpy it in the command
buffer. This gives minor CPU improvements on dota2.
In the process I also refactored stuff to:
1) Not have all the state in the pipeline struct anymore, since it is not
needed anymore.
2) Reduce the size of radv_pipeline_init
3) Make dependency between subroutines in radv_pipeline_init more clear,
by more explicitly returning the changed data and only using the
passed in pipeline readonly.
I left the multisample state for now, because it is kind of a mess what
it is used for, and I'll probably significantly change it soon with
the sample location extension.
Patches 1-3 are small behavioral changes that make the fololowing changes
easier. Patches 4-6 implement the PM$ pregeneration. Then 7-23 are just
refactoring and should not be functional changes.
I found no regressions on a CTS run on GFX9, and you can find a branch
at
https://github.com/BNieuwenhuizen/mesa/tree/pipeline-optimize2
V2:
I rebased the series, moved from a separate pm4 structure to using
radeon_winsys_cs and solved a few issues with the dynamic states patch.
The 2 initial patches of V1 have been upstreamed already, as they were
somewhat independent and contained a fix for an issue.
Bas Nieuwenhuizen (20):
radv: Determine unneeded dynamic states.
radv: Record a PM4 sequence for graphics pipeline switches.
radv: Add PM4 pregeneration for compute pipelines.
radv: Constify some pipeline helpers.
radv: Merge binning state generation with pm4 emission.
radv: Merge vs state computation with PM4 generation.
radv: Merge vtx_reuse_depth computation with PM4 generation.
radv: Merge ps_input_cntl computation with PM4 generation.
radv: Merge depth stencil state with PM4 generation.
radv: Compute shader_z_format when emitting it.
radv: Split out db_shader_control computation.
radv: Split out the ia_multi_vgt_param precomputation.
radv: Split out generating VGT_SHADER_STAGES_EN.
radv: Move blend state out of pipeline.
radv: Move tessellation state out of pipeline.
radv: Split out processing the vertex input state.
radv: Merge VGT_GS_MODE computation with PM4 generation.
radv: Split out cliprect rule generation.
radv: Move gs state out of pipeline.
radv: Merge raster state with PM4 generation.
src/amd/vulkan/radv_cmd_buffer.c | 554 +-------------
src/amd/vulkan/radv_pipeline.c | 1558 ++++++++++++++++++++++++++------------
src/amd/vulkan/radv_private.h | 93 +--
src/amd/vulkan/si_cmd_buffer.c | 12 +-
4 files changed, 1119 insertions(+), 1098 deletions(-)
--
2.16.1
More information about the mesa-dev
mailing list