Re: [PATCH] lib/rendercopy_gen9: Setup Push constant pointer before sending BTP commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On ke, 2015-08-12 at 12:26 +0100, Arun Siluvery wrote:
> From Gen9, by default push constant command is not committed to the 
> shader unit
> untill the corresponding shader's BTP_* command is parsed. This is 
> the
> behaviour when set shader is enabled. This patch updates the batch to 
> follow
> this requirement otherwise it results in gpu hang.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89959
> 
> Set shader need to be disabled if legacy behaviour is required.
> 
> Cc: Ben Widawsky <benjamin.widawsky@xxxxxxxxx>
> Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>
> Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
> Signed-off-by: Arun Siluvery <arun.siluvery@xxxxxxxxxxxxxxx>

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>

> ---
> 
> If this patch is applied then we don't need to disable set shader bit
> in kernel and the following can be discarded.
> 
> http://lists.freedesktop.org/archives/intel-gfx/2015-August/073425.ht
> ml
> 
>  lib/rendercopy_gen9.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/lib/rendercopy_gen9.c b/lib/rendercopy_gen9.c
> index 4a4a604..9537480 100644
> --- a/lib/rendercopy_gen9.c
> +++ b/lib/rendercopy_gen9.c
> @@ -590,13 +590,9 @@ gen8_emit_multisample(struct intel_batchbuffer 
> *batch) {
>  
>  static void
>  gen8_emit_vs(struct intel_batchbuffer *batch) {
> -	OUT_BATCH(GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS);
> +	OUT_BATCH(GEN6_3DSTATE_CONSTANT_VS | (11-2));
>  	OUT_BATCH(0);
> -
> -	OUT_BATCH(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS);
>  	OUT_BATCH(0);
> -
> -	OUT_BATCH(GEN6_3DSTATE_CONSTANT_VS | (11-2));
>  	OUT_BATCH(0);
>  	OUT_BATCH(0);
>  	OUT_BATCH(0);
> @@ -605,7 +601,11 @@ gen8_emit_vs(struct intel_batchbuffer *batch) {
>  	OUT_BATCH(0);
>  	OUT_BATCH(0);
>  	OUT_BATCH(0);
> +
> +	OUT_BATCH(GEN7_3DSTATE_BINDING_TABLE_POINTERS_VS);
>  	OUT_BATCH(0);
> +
> +	OUT_BATCH(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_VS);
>  	OUT_BATCH(0);
>  
>  	OUT_BATCH(GEN6_3DSTATE_VS | (9-2));
> @@ -998,14 +998,14 @@ void gen9_render_copyfunc(struct 
> intel_batchbuffer *batch,
>  
>  	gen8_emit_sf(batch);
>  
> +	gen8_emit_ps(batch, ps_kernel_off);
> +
>  	OUT_BATCH(GEN7_3DSTATE_BINDING_TABLE_POINTERS_PS);
>  	OUT_BATCH(ps_binding_table);
>  
>  	OUT_BATCH(GEN7_3DSTATE_SAMPLER_STATE_POINTERS_PS);
>  	OUT_BATCH(ps_sampler_state);
>  
> -	gen8_emit_ps(batch, ps_kernel_off);
> -
>  	OUT_BATCH(GEN6_3DSTATE_SCISSOR_STATE_POINTERS);
>  	OUT_BATCH(scissor_state);
>  
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux