[Mesa-dev] [PATCH] r600: initialised PGM_RESOURCES_2 for ES/GS
Alex Deucher
alexdeucher at gmail.com
Wed Nov 11 14:56:31 PST 2015
On Wed, Nov 11, 2015 at 5:42 PM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This fixes the corruption on rendering that we are seeing in
> certain geometry shaders.
>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> src/gallium/drivers/r600/evergreen_state.c | 4 ++++
> src/gallium/drivers/r600/evergreend.h | 2 ++
> 2 files changed, 6 insertions(+)
>
> diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
> index c6702a9..a3bbbcc 100644
> --- a/src/gallium/drivers/r600/evergreen_state.c
> +++ b/src/gallium/drivers/r600/evergreen_state.c
> @@ -2362,6 +2362,8 @@ static void cayman_init_atom_start_cs(struct r600_context *rctx)
>
> r600_store_context_reg(cb, R_028848_SQ_PGM_RESOURCES_2_PS, S_028848_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
> r600_store_context_reg(cb, R_028864_SQ_PGM_RESOURCES_2_VS, S_028864_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
> + r600_store_context_reg(cb, R_02887C_SQ_PGM_RESOURCES_2_GS, S_028848_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
> + r600_store_context_reg(cb, R_028894_SQ_PGM_RESOURCES_2_ES, S_028848_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
> r600_store_context_reg(cb, R_0288A8_SQ_PGM_RESOURCES_FS, 0);
>
> /* to avoid GPU doing any preloading of constant from random address */
> @@ -2801,6 +2803,8 @@ void evergreen_init_atom_start_cs(struct r600_context *rctx)
>
> r600_store_context_reg(cb, R_028848_SQ_PGM_RESOURCES_2_PS, S_028848_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
> r600_store_context_reg(cb, R_028864_SQ_PGM_RESOURCES_2_VS, S_028864_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
> + r600_store_context_reg(cb, R_02887C_SQ_PGM_RESOURCES_2_GS, S_028848_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
> + r600_store_context_reg(cb, R_028894_SQ_PGM_RESOURCES_2_ES, S_028848_SINGLE_ROUND(V_SQ_ROUND_NEAREST_EVEN));
> r600_store_context_reg(cb, R_0288A8_SQ_PGM_RESOURCES_FS, 0);
>
> /* to avoid GPU doing any preloading of constant from random address */
> diff --git a/src/gallium/drivers/r600/evergreend.h b/src/gallium/drivers/r600/evergreend.h
> index 937ffcb..cf8906c 100644
> --- a/src/gallium/drivers/r600/evergreend.h
> +++ b/src/gallium/drivers/r600/evergreend.h
> @@ -1497,6 +1497,7 @@
> #define S_028878_UNCACHED_FIRST_INST(x) (((x) & 0x1) << 28)
> #define G_028878_UNCACHED_FIRST_INST(x) (((x) >> 28) & 0x1)
> #define C_028878_UNCACHED_FIRST_INST 0xEFFFFFFF
> +#define R_02887C_SQ_PGM_RESOURCES_2_GS 0x02887C
>
> #define R_028890_SQ_PGM_RESOURCES_ES 0x028890
> #define S_028890_NUM_GPRS(x) (((x) & 0xFF) << 0)
> @@ -1511,6 +1512,7 @@
> #define S_028890_UNCACHED_FIRST_INST(x) (((x) & 0x1) << 28)
> #define G_028890_UNCACHED_FIRST_INST(x) (((x) >> 28) & 0x1)
> #define C_028890_UNCACHED_FIRST_INST 0xEFFFFFFF
> +#define R_028894_SQ_PGM_RESOURCES_2_ES 0x028894
>
> #define R_028864_SQ_PGM_RESOURCES_2_VS 0x028864
> #define S_028864_SINGLE_ROUND(x) (((x) & 0x3) << 0)
> --
> 2.1.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list