[Mesa-dev] [PATCH] radv: move DB_COUNT_CONTROL initialization to si_emit_config()
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Thu Oct 19 18:44:50 UTC 2017
r-b
On Thu, Oct 19, 2017 at 4:25 PM, Samuel Pitoiset
<samuel.pitoiset at gmail.com> wrote:
> CLEAR_STATE will initialize DB_COUNT_CONTROL to 0 for CIK+.
>
> Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
> ---
> src/amd/vulkan/radv_cmd_buffer.c | 1 -
> src/amd/vulkan/si_cmd_buffer.c | 5 +++++
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/amd/vulkan/radv_cmd_buffer.c b/src/amd/vulkan/radv_cmd_buffer.c
> index 2791f1e096..7cffeec482 100644
> --- a/src/amd/vulkan/radv_cmd_buffer.c
> +++ b/src/amd/vulkan/radv_cmd_buffer.c
> @@ -2123,7 +2123,6 @@ VkResult radv_BeginCommandBuffer(
> switch (cmd_buffer->queue_family_index) {
> case RADV_QUEUE_GENERAL:
> emit_gfx_buffer_state(cmd_buffer);
> - radv_set_db_count_control(cmd_buffer);
> break;
> case RADV_QUEUE_COMPUTE:
> si_init_compute(cmd_buffer);
> diff --git a/src/amd/vulkan/si_cmd_buffer.c b/src/amd/vulkan/si_cmd_buffer.c
> index 1e8b43d4fa..d24b63a5b5 100644
> --- a/src/amd/vulkan/si_cmd_buffer.c
> +++ b/src/amd/vulkan/si_cmd_buffer.c
> @@ -528,6 +528,11 @@ si_emit_config(struct radv_physical_device *physical_device,
> radeon_emit(cs, S_028A04_MIN_SIZE(radv_pack_float_12p4(0)) |
> S_028A04_MAX_SIZE(radv_pack_float_12p4(8192/2)));
>
> + if (!physical_device->has_clear_state) {
> + radeon_set_context_reg(cs, R_028004_DB_COUNT_CONTROL,
> + S_028004_ZPASS_INCREMENT_DISABLE(1));
> + }
> +
> si_emit_compute(physical_device, cs);
> }
>
> --
> 2.14.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list