Re: [Mesa-dev] [PATCH] radeonsi: skip ES output stores for undefined output components

2018-05-18 Thread Samuel Pitoiset

Reviewed-by: Samuel Pitoiset 

On 05/18/2018 12:14 AM, Marek Olšák wrote:

From: Marek Olšák 

---
  src/gallium/drivers/radeonsi/si_shader.c | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c 
b/src/gallium/drivers/radeonsi/si_shader.c
index e8d08cd8e7f..0d24c3af10a 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3591,20 +3591,23 @@ static void si_llvm_emit_es_epilogue(struct 
ac_shader_abi *abi,
int param;
  
  		if (info->output_semantic_name[i] == TGSI_SEMANTIC_VIEWPORT_INDEX ||

info->output_semantic_name[i] == TGSI_SEMANTIC_LAYER)
continue;
  
  		param = si_shader_io_get_unique_index(info->output_semantic_name[i],

  
info->output_semantic_index[i]);
  
  		for (chan = 0; chan < 4; chan++) {

+   if (!(info->output_usagemask[i] & (1 << chan)))
+   continue;
+
LLVMValueRef out_val = LLVMBuildLoad(ctx->ac.builder, addrs[4 * i 
+ chan], "");
out_val = ac_to_integer(>ac, out_val);
  
  			/* GFX9 has the ESGS ring in LDS. */

if (ctx->screen->info.chip_class >= GFX9) {
lds_store(ctx, param * 4 + chan, lds_base, 
out_val);
continue;
}
  
  			ac_build_buffer_store_dword(>ac,



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] radeonsi: skip ES output stores for undefined output components

2018-05-17 Thread Dieter Nützel

Tested-by: Dieter Nützel 

on RX580

with UH, UV, glmark2, Blender 2.79, FreeCAD 0.17, Gimp 2.10, digikam 
5.9.0, Krita 4.0.3 and some Mesa-demos


Dieter

Am 18.05.2018 00:14, schrieb Marek Olšák:

From: Marek Olšák 

---
 src/gallium/drivers/radeonsi/si_shader.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c
b/src/gallium/drivers/radeonsi/si_shader.c
index e8d08cd8e7f..0d24c3af10a 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3591,20 +3591,23 @@ static void si_llvm_emit_es_epilogue(struct
ac_shader_abi *abi,
int param;

if (info->output_semantic_name[i] == 
TGSI_SEMANTIC_VIEWPORT_INDEX ||
info->output_semantic_name[i] == TGSI_SEMANTIC_LAYER)
continue;

param = 
si_shader_io_get_unique_index(info->output_semantic_name[i],
  
info->output_semantic_index[i]);

for (chan = 0; chan < 4; chan++) {
+   if (!(info->output_usagemask[i] & (1 << chan)))
+   continue;
+
LLVMValueRef out_val = LLVMBuildLoad(ctx->ac.builder, 
addrs[4 * i
+ chan], "");
out_val = ac_to_integer(>ac, out_val);

/* GFX9 has the ESGS ring in LDS. */
if (ctx->screen->info.chip_class >= GFX9) {
lds_store(ctx, param * 4 + chan, lds_base, 
out_val);
continue;
}

ac_build_buffer_store_dword(>ac,

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] radeonsi: skip ES output stores for undefined output components

2018-05-17 Thread Marek Olšák
From: Marek Olšák 

---
 src/gallium/drivers/radeonsi/si_shader.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_shader.c 
b/src/gallium/drivers/radeonsi/si_shader.c
index e8d08cd8e7f..0d24c3af10a 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3591,20 +3591,23 @@ static void si_llvm_emit_es_epilogue(struct 
ac_shader_abi *abi,
int param;
 
if (info->output_semantic_name[i] == 
TGSI_SEMANTIC_VIEWPORT_INDEX ||
info->output_semantic_name[i] == TGSI_SEMANTIC_LAYER)
continue;
 
param = 
si_shader_io_get_unique_index(info->output_semantic_name[i],
  
info->output_semantic_index[i]);
 
for (chan = 0; chan < 4; chan++) {
+   if (!(info->output_usagemask[i] & (1 << chan)))
+   continue;
+
LLVMValueRef out_val = LLVMBuildLoad(ctx->ac.builder, 
addrs[4 * i + chan], "");
out_val = ac_to_integer(>ac, out_val);
 
/* GFX9 has the ESGS ring in LDS. */
if (ctx->screen->info.chip_class >= GFX9) {
lds_store(ctx, param * 4 + chan, lds_base, 
out_val);
continue;
}
 
ac_build_buffer_store_dword(>ac,
-- 
2.17.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev