Re: [Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support

2016-10-17 Thread Marek Olšák
On Mon, Oct 17, 2016 at 8:21 PM, Brian Paul wrote: > The series looks OK to me. > > Acked-by: Brian Paul > > I guess I have a general question though. Over the years of debugging GL > apps I've seen a few that generate pretty huge shaders (in terms of TGSI > instructions). I recall one (can't r

Re: [Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support

2016-10-17 Thread Brian Paul
The series looks OK to me. Acked-by: Brian Paul I guess I have a general question though. Over the years of debugging GL apps I've seen a few that generate pretty huge shaders (in terms of TGSI instructions). I recall one (can't remember the app) in which a moderate size shader compiled in

Re: [Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support

2016-10-17 Thread Marek Olšák
On Mon, Oct 17, 2016 at 4:23 PM, Ilia Mirkin wrote: > On Mon, Oct 17, 2016 at 10:20 AM, Marek Olšák wrote: >> I'm adding back this: >> >>options->EmitNoMainReturn = >> !screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_SUBROUTINES); >> >> And: >> >> diff --git a/src/mesa/stat

[Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support

2016-10-17 Thread Marek Olšák
From: Marek Olšák Never used. The GLSL compiler doesn't even look at EmitNoFunctions. v2: add back "return" support in "main" --- src/mesa/state_tracker/st_extensions.c | 3 +- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 207 + 2 files changed, 5 insertions(+)

Re: [Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support

2016-10-17 Thread Ilia Mirkin
On Mon, Oct 17, 2016 at 10:20 AM, Marek Olšák wrote: > I'm adding back this: > >options->EmitNoMainReturn = > !screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_SUBROUTINES); > > And: > > diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp > b/src/mesa/state_tracker/st_gls

Re: [Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support

2016-10-17 Thread Marek Olšák
I'm adding back this: options->EmitNoMainReturn = !screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_SUBROUTINES); And: diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 293654c..5f28d07 100644 --- a/src/mesa/state_trac

Re: [Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support

2016-10-17 Thread Marek Olšák
On Mon, Oct 17, 2016 at 4:10 PM, Ilia Mirkin wrote: > On Mon, Oct 17, 2016 at 9:59 AM, Marek Olšák wrote: >> On Mon, Oct 17, 2016 at 3:48 PM, Ilia Mirkin wrote: >>> On Mon, Oct 17, 2016 at 9:46 AM, Marek Olšák wrote: On Mon, Oct 17, 2016 at 3:44 PM, Ilia Mirkin wrote: > nouveau suppor

Re: [Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support

2016-10-17 Thread Ilia Mirkin
On Mon, Oct 17, 2016 at 9:59 AM, Marek Olšák wrote: > On Mon, Oct 17, 2016 at 3:48 PM, Ilia Mirkin wrote: >> On Mon, Oct 17, 2016 at 9:46 AM, Marek Olšák wrote: >>> On Mon, Oct 17, 2016 at 3:44 PM, Ilia Mirkin wrote: nouveau supports PIPE_SHADER_CAP_SUBROUTINES and properly details with >>

Re: [Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support

2016-10-17 Thread Marek Olšák
On Mon, Oct 17, 2016 at 3:48 PM, Ilia Mirkin wrote: > On Mon, Oct 17, 2016 at 9:46 AM, Marek Olšák wrote: >> On Mon, Oct 17, 2016 at 3:44 PM, Ilia Mirkin wrote: >>> nouveau supports PIPE_SHADER_CAP_SUBROUTINES and properly details with >>> RET opcodes. The alternative is that the st lowers the w

Re: [Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support

2016-10-17 Thread Ilia Mirkin
On Mon, Oct 17, 2016 at 9:46 AM, Marek Olšák wrote: > On Mon, Oct 17, 2016 at 3:44 PM, Ilia Mirkin wrote: >> nouveau supports PIPE_SHADER_CAP_SUBROUTINES and properly details with >> RET opcodes. The alternative is that the st lowers the whole thing >> into a loop which adds IMHO unnecessary comp

Re: [Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support

2016-10-17 Thread Marek Olšák
On Mon, Oct 17, 2016 at 3:44 PM, Ilia Mirkin wrote: > nouveau supports PIPE_SHADER_CAP_SUBROUTINES and properly details with > RET opcodes. The alternative is that the st lowers the whole thing > into a loop which adds IMHO unnecessary complexity to the resulting > code. Any reason not to leave th

[Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support

2016-10-17 Thread Marek Olšák
From: Marek Olšák Never used. The GLSL compiler doesn't even look at EmitNoFunctions. --- src/mesa/state_tracker/st_extensions.c | 6 +- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 212 + 2 files changed, 7 insertions(+), 211 deletions(-) diff --git a/src/mesa

Re: [Mesa-dev] [PATCH 10/14] glsl_to_tgsi: remove subroutine support

2016-10-17 Thread Ilia Mirkin
nouveau supports PIPE_SHADER_CAP_SUBROUTINES and properly details with RET opcodes. The alternative is that the st lowers the whole thing into a loop which adds IMHO unnecessary complexity to the resulting code. Any reason not to leave that in place? -ilia On Mon, Oct 17, 2016 at 9:39 AM, Marek