Re: [Mesa-dev] [PATCH v3 00/19] add compute shaders support

2016-02-11 Thread Samuel Pitoiset



On 02/11/2016 08:03 PM, Marek Olšák wrote:

BTW, all my Reviewed-by tags that I gave you for v1 and v2 now also apply to v3.


Thanks for your time and patience. :-)



Marek

On Thu, Feb 11, 2016 at 12:21 PM, Marek Olšák  wrote:

Patches 3-4, 8-10, 12, 14-15:

Reviewed-by: Marek Olšák 

Marek

On Wed, Feb 10, 2016 at 7:10 PM, Samuel Pitoiset
 wrote:

Hi,

This series adds the core support for ARB_compute_shader which is required for
OpenGL 4.3. This series is now based on mesa master since Ilia has pushed his
work related to ssbo+atomics.

In piglit, this passes all compute related tests except two of them which are
related to ARB_shader_image_load_store (Ilia is currently working on it).

In dEQP, there are 92 fails and 1383 passes. The list of fails are
explained below.

Importand changes from v3:
  - ARB_compute_shader is not exposed by default because compute shaders
required images support... To use it, don't forget to set
MESA_EXTENSION_OVERRIDE=GL_ARB_compute_shader (suggested by Ilia)
  - dump the TGSI compute program in the trace driver
  - correctly initialize pipe_grid_info for nv50/nvc0

Important changes from v2:
   - introduce TGSI_FILE_MEMORY and make use it instead of TGSI_FILE_BUFFER
   - add PIPE_SHADER_CAP_SUPPORTED_IRS and enable ARB_compute_shader only if the
 underlying driver supports TGSI
   - do not reserve a buffer for shared memory, that's useless

Patches which still need to be reviewed:
  - gallium: add a new interface for pipe_context::launch_grid() (v1 only)
  - gallium: add indirect compute parameters to pipe_grid_info (v1 only)
  - gallium: add PIPE_SHADER_CAP_SUPPORTED_IRS
  - tgsi/ureg: add shared variables support for compute shaders
  - st/mesa: add a second pipeline for compute (v1 only)
  - st/mesa: add intrinsics for shared variables (v1 only)
  - st/mesa: add mappings for compute shader sysvals (v1 only)
  - st/mesa: implement limits for ARB_compute_shader (v1 only)

Only minor changes have been applied since the v1, but I just want to be sure
that all patches are correctly Rb. The Gallium interface is now stable, so I
will probably push this series this week if I don't get strong objections. :-)

Please review, thanks!

Ilia Mirkin (1):
   mesa: make compute maximums reflect driver-provided values

Samuel Pitoiset (18):
   mesa: do not use a constant for MAX_COMPUTE_SHARED_SIZE
   mesa: store shared size in gl_compute_program
   mesa: add PROGRAM_MEMORY
   gallium/cso: add support for compute shaders
   gallium: add a new interface for pipe_context::launch_grid()
   gallium: add indirect compute parameters to pipe_grid_info
   gallium: add PIPE_SHADER_CAP_SUPPORTED_IRS
   tgsi/ureg: add shared variables support for compute shaders
   st/mesa: add a second pipeline for compute
   st/mesa: add compute shader states
   st/mesa: add conversion for compute shaders
   st/mesa: add intrinsics for shared variables
   st/mesa: keep track of shared memory declarations
   st/mesa: add mappings for compute shader sysvals
   st/mesa: add state validation for compute shaders
   st/mesa: add compute program dispatch callbacks
   st/mesa: implement limits for ARB_compute_shader
   trace: add all compute related functions

  src/compiler/glsl/builtin_variables.cpp|  15 ++-
  src/compiler/glsl/glsl_parser_extras.cpp   |   7 +
  src/compiler/glsl/glsl_parser_extras.h |   5 +
  src/compiler/glsl/main.cpp |   5 +
  src/gallium/auxiliary/cso_cache/cso_context.c  |  30 +
  src/gallium/auxiliary/cso_cache/cso_context.h  |   4 +
  src/gallium/auxiliary/gallivm/lp_bld_limits.h  |   2 +
  src/gallium/auxiliary/tgsi/tgsi_build.c|   1 +
  src/gallium/auxiliary/tgsi/tgsi_dump.c |   5 +
  src/gallium/auxiliary/tgsi/tgsi_exec.h |   2 +
  src/gallium/auxiliary/tgsi/tgsi_strings.c  |   1 +
  src/gallium/auxiliary/tgsi/tgsi_text.c |   3 +
  src/gallium/auxiliary/tgsi/tgsi_ureg.c |  32 +
  src/gallium/auxiliary/tgsi/tgsi_ureg.h |   3 +
  src/gallium/docs/source/screen.rst |   2 +
  src/gallium/drivers/freedreno/freedreno_screen.c   |   2 +
  src/gallium/drivers/ilo/ilo_gpgpu.c|   8 +-
  src/gallium/drivers/ilo/ilo_screen.c   |   2 +
  src/gallium/drivers/nouveau/nv50/nv50_compute.c|  16 +--
  src/gallium/drivers/nouveau/nv50/nv50_context.h|   3 +-
  .../drivers/nouveau/nv50/nv50_query_hw_sm.c|  12 +-
  src/gallium/drivers/nouveau/nvc0/nvc0_compute.c|  19 ++-
  src/gallium/drivers/nouveau/nvc0/nvc0_context.h|   6 +-
  .../drivers/nouveau/nvc0/nvc0_query_hw_sm.c|  12 +-
  src/gallium/drivers/nouveau/nvc0/nvc0_screen.c |   2 +
  src/gallium/drivers/nouveau/nvc0/nve4_compute.c|  10 +-
  src/gallium/drivers/r300/r300_screen.c |   4 +
  

Re: [Mesa-dev] [PATCH v3 00/19] add compute shaders support

2016-02-11 Thread Marek Olšák
BTW, all my Reviewed-by tags that I gave you for v1 and v2 now also apply to v3.

Marek

On Thu, Feb 11, 2016 at 12:21 PM, Marek Olšák  wrote:
> Patches 3-4, 8-10, 12, 14-15:
>
> Reviewed-by: Marek Olšák 
>
> Marek
>
> On Wed, Feb 10, 2016 at 7:10 PM, Samuel Pitoiset
>  wrote:
>> Hi,
>>
>> This series adds the core support for ARB_compute_shader which is required 
>> for
>> OpenGL 4.3. This series is now based on mesa master since Ilia has pushed his
>> work related to ssbo+atomics.
>>
>> In piglit, this passes all compute related tests except two of them which are
>> related to ARB_shader_image_load_store (Ilia is currently working on it).
>>
>> In dEQP, there are 92 fails and 1383 passes. The list of fails are
>> explained below.
>>
>> Importand changes from v3:
>>  - ARB_compute_shader is not exposed by default because compute shaders
>>required images support... To use it, don't forget to set
>>MESA_EXTENSION_OVERRIDE=GL_ARB_compute_shader (suggested by Ilia)
>>  - dump the TGSI compute program in the trace driver
>>  - correctly initialize pipe_grid_info for nv50/nvc0
>>
>> Important changes from v2:
>>   - introduce TGSI_FILE_MEMORY and make use it instead of TGSI_FILE_BUFFER
>>   - add PIPE_SHADER_CAP_SUPPORTED_IRS and enable ARB_compute_shader only if 
>> the
>> underlying driver supports TGSI
>>   - do not reserve a buffer for shared memory, that's useless
>>
>> Patches which still need to be reviewed:
>>  - gallium: add a new interface for pipe_context::launch_grid() (v1 only)
>>  - gallium: add indirect compute parameters to pipe_grid_info (v1 only)
>>  - gallium: add PIPE_SHADER_CAP_SUPPORTED_IRS
>>  - tgsi/ureg: add shared variables support for compute shaders
>>  - st/mesa: add a second pipeline for compute (v1 only)
>>  - st/mesa: add intrinsics for shared variables (v1 only)
>>  - st/mesa: add mappings for compute shader sysvals (v1 only)
>>  - st/mesa: implement limits for ARB_compute_shader (v1 only)
>>
>> Only minor changes have been applied since the v1, but I just want to be sure
>> that all patches are correctly Rb. The Gallium interface is now stable, so I
>> will probably push this series this week if I don't get strong objections. 
>> :-)
>>
>> Please review, thanks!
>>
>> Ilia Mirkin (1):
>>   mesa: make compute maximums reflect driver-provided values
>>
>> Samuel Pitoiset (18):
>>   mesa: do not use a constant for MAX_COMPUTE_SHARED_SIZE
>>   mesa: store shared size in gl_compute_program
>>   mesa: add PROGRAM_MEMORY
>>   gallium/cso: add support for compute shaders
>>   gallium: add a new interface for pipe_context::launch_grid()
>>   gallium: add indirect compute parameters to pipe_grid_info
>>   gallium: add PIPE_SHADER_CAP_SUPPORTED_IRS
>>   tgsi/ureg: add shared variables support for compute shaders
>>   st/mesa: add a second pipeline for compute
>>   st/mesa: add compute shader states
>>   st/mesa: add conversion for compute shaders
>>   st/mesa: add intrinsics for shared variables
>>   st/mesa: keep track of shared memory declarations
>>   st/mesa: add mappings for compute shader sysvals
>>   st/mesa: add state validation for compute shaders
>>   st/mesa: add compute program dispatch callbacks
>>   st/mesa: implement limits for ARB_compute_shader
>>   trace: add all compute related functions
>>
>>  src/compiler/glsl/builtin_variables.cpp|  15 ++-
>>  src/compiler/glsl/glsl_parser_extras.cpp   |   7 +
>>  src/compiler/glsl/glsl_parser_extras.h |   5 +
>>  src/compiler/glsl/main.cpp |   5 +
>>  src/gallium/auxiliary/cso_cache/cso_context.c  |  30 +
>>  src/gallium/auxiliary/cso_cache/cso_context.h  |   4 +
>>  src/gallium/auxiliary/gallivm/lp_bld_limits.h  |   2 +
>>  src/gallium/auxiliary/tgsi/tgsi_build.c|   1 +
>>  src/gallium/auxiliary/tgsi/tgsi_dump.c |   5 +
>>  src/gallium/auxiliary/tgsi/tgsi_exec.h |   2 +
>>  src/gallium/auxiliary/tgsi/tgsi_strings.c  |   1 +
>>  src/gallium/auxiliary/tgsi/tgsi_text.c |   3 +
>>  src/gallium/auxiliary/tgsi/tgsi_ureg.c |  32 +
>>  src/gallium/auxiliary/tgsi/tgsi_ureg.h |   3 +
>>  src/gallium/docs/source/screen.rst |   2 +
>>  src/gallium/drivers/freedreno/freedreno_screen.c   |   2 +
>>  src/gallium/drivers/ilo/ilo_gpgpu.c|   8 +-
>>  src/gallium/drivers/ilo/ilo_screen.c   |   2 +
>>  src/gallium/drivers/nouveau/nv50/nv50_compute.c|  16 +--
>>  src/gallium/drivers/nouveau/nv50/nv50_context.h|   3 +-
>>  .../drivers/nouveau/nv50/nv50_query_hw_sm.c|  12 +-
>>  src/gallium/drivers/nouveau/nvc0/nvc0_compute.c|  19 ++-
>>  src/gallium/drivers/nouveau/nvc0/nvc0_context.h|   6 +-
>>  .../drivers/nouveau/nvc0/nvc0_query_hw_sm.c|  12 +-
>>  src/gallium/drivers/nouveau/nvc0/nvc0_screen.c |   2 +
>>  

Re: [Mesa-dev] [PATCH v3 00/19] add compute shaders support

2016-02-11 Thread Marek Olšák
Patches 3-4, 8-10, 12, 14-15:

Reviewed-by: Marek Olšák 

Marek

On Wed, Feb 10, 2016 at 7:10 PM, Samuel Pitoiset
 wrote:
> Hi,
>
> This series adds the core support for ARB_compute_shader which is required for
> OpenGL 4.3. This series is now based on mesa master since Ilia has pushed his
> work related to ssbo+atomics.
>
> In piglit, this passes all compute related tests except two of them which are
> related to ARB_shader_image_load_store (Ilia is currently working on it).
>
> In dEQP, there are 92 fails and 1383 passes. The list of fails are
> explained below.
>
> Importand changes from v3:
>  - ARB_compute_shader is not exposed by default because compute shaders
>required images support... To use it, don't forget to set
>MESA_EXTENSION_OVERRIDE=GL_ARB_compute_shader (suggested by Ilia)
>  - dump the TGSI compute program in the trace driver
>  - correctly initialize pipe_grid_info for nv50/nvc0
>
> Important changes from v2:
>   - introduce TGSI_FILE_MEMORY and make use it instead of TGSI_FILE_BUFFER
>   - add PIPE_SHADER_CAP_SUPPORTED_IRS and enable ARB_compute_shader only if 
> the
> underlying driver supports TGSI
>   - do not reserve a buffer for shared memory, that's useless
>
> Patches which still need to be reviewed:
>  - gallium: add a new interface for pipe_context::launch_grid() (v1 only)
>  - gallium: add indirect compute parameters to pipe_grid_info (v1 only)
>  - gallium: add PIPE_SHADER_CAP_SUPPORTED_IRS
>  - tgsi/ureg: add shared variables support for compute shaders
>  - st/mesa: add a second pipeline for compute (v1 only)
>  - st/mesa: add intrinsics for shared variables (v1 only)
>  - st/mesa: add mappings for compute shader sysvals (v1 only)
>  - st/mesa: implement limits for ARB_compute_shader (v1 only)
>
> Only minor changes have been applied since the v1, but I just want to be sure
> that all patches are correctly Rb. The Gallium interface is now stable, so I
> will probably push this series this week if I don't get strong objections. :-)
>
> Please review, thanks!
>
> Ilia Mirkin (1):
>   mesa: make compute maximums reflect driver-provided values
>
> Samuel Pitoiset (18):
>   mesa: do not use a constant for MAX_COMPUTE_SHARED_SIZE
>   mesa: store shared size in gl_compute_program
>   mesa: add PROGRAM_MEMORY
>   gallium/cso: add support for compute shaders
>   gallium: add a new interface for pipe_context::launch_grid()
>   gallium: add indirect compute parameters to pipe_grid_info
>   gallium: add PIPE_SHADER_CAP_SUPPORTED_IRS
>   tgsi/ureg: add shared variables support for compute shaders
>   st/mesa: add a second pipeline for compute
>   st/mesa: add compute shader states
>   st/mesa: add conversion for compute shaders
>   st/mesa: add intrinsics for shared variables
>   st/mesa: keep track of shared memory declarations
>   st/mesa: add mappings for compute shader sysvals
>   st/mesa: add state validation for compute shaders
>   st/mesa: add compute program dispatch callbacks
>   st/mesa: implement limits for ARB_compute_shader
>   trace: add all compute related functions
>
>  src/compiler/glsl/builtin_variables.cpp|  15 ++-
>  src/compiler/glsl/glsl_parser_extras.cpp   |   7 +
>  src/compiler/glsl/glsl_parser_extras.h |   5 +
>  src/compiler/glsl/main.cpp |   5 +
>  src/gallium/auxiliary/cso_cache/cso_context.c  |  30 +
>  src/gallium/auxiliary/cso_cache/cso_context.h  |   4 +
>  src/gallium/auxiliary/gallivm/lp_bld_limits.h  |   2 +
>  src/gallium/auxiliary/tgsi/tgsi_build.c|   1 +
>  src/gallium/auxiliary/tgsi/tgsi_dump.c |   5 +
>  src/gallium/auxiliary/tgsi/tgsi_exec.h |   2 +
>  src/gallium/auxiliary/tgsi/tgsi_strings.c  |   1 +
>  src/gallium/auxiliary/tgsi/tgsi_text.c |   3 +
>  src/gallium/auxiliary/tgsi/tgsi_ureg.c |  32 +
>  src/gallium/auxiliary/tgsi/tgsi_ureg.h |   3 +
>  src/gallium/docs/source/screen.rst |   2 +
>  src/gallium/drivers/freedreno/freedreno_screen.c   |   2 +
>  src/gallium/drivers/ilo/ilo_gpgpu.c|   8 +-
>  src/gallium/drivers/ilo/ilo_screen.c   |   2 +
>  src/gallium/drivers/nouveau/nv50/nv50_compute.c|  16 +--
>  src/gallium/drivers/nouveau/nv50/nv50_context.h|   3 +-
>  .../drivers/nouveau/nv50/nv50_query_hw_sm.c|  12 +-
>  src/gallium/drivers/nouveau/nvc0/nvc0_compute.c|  19 ++-
>  src/gallium/drivers/nouveau/nvc0/nvc0_context.h|   6 +-
>  .../drivers/nouveau/nvc0/nvc0_query_hw_sm.c|  12 +-
>  src/gallium/drivers/nouveau/nvc0/nvc0_screen.c |   2 +
>  src/gallium/drivers/nouveau/nvc0/nve4_compute.c|  10 +-
>  src/gallium/drivers/r300/r300_screen.c |   4 +
>  src/gallium/drivers/r600/evergreen_compute.c   |  19 ++-
>  src/gallium/drivers/r600/r600_pipe.c   |   2 +
>  src/gallium/drivers/radeonsi/si_compute.c  |  33 

[Mesa-dev] [PATCH v3 00/19] add compute shaders support

2016-02-10 Thread Samuel Pitoiset
Hi,

This series adds the core support for ARB_compute_shader which is required for
OpenGL 4.3. This series is now based on mesa master since Ilia has pushed his
work related to ssbo+atomics.

In piglit, this passes all compute related tests except two of them which are
related to ARB_shader_image_load_store (Ilia is currently working on it).

In dEQP, there are 92 fails and 1383 passes. The list of fails are
explained below.

Importand changes from v3:
 - ARB_compute_shader is not exposed by default because compute shaders
   required images support... To use it, don't forget to set
   MESA_EXTENSION_OVERRIDE=GL_ARB_compute_shader (suggested by Ilia)
 - dump the TGSI compute program in the trace driver
 - correctly initialize pipe_grid_info for nv50/nvc0

Important changes from v2:
  - introduce TGSI_FILE_MEMORY and make use it instead of TGSI_FILE_BUFFER
  - add PIPE_SHADER_CAP_SUPPORTED_IRS and enable ARB_compute_shader only if the
underlying driver supports TGSI
  - do not reserve a buffer for shared memory, that's useless

Patches which still need to be reviewed:
 - gallium: add a new interface for pipe_context::launch_grid() (v1 only)
 - gallium: add indirect compute parameters to pipe_grid_info (v1 only)
 - gallium: add PIPE_SHADER_CAP_SUPPORTED_IRS
 - tgsi/ureg: add shared variables support for compute shaders
 - st/mesa: add a second pipeline for compute (v1 only)
 - st/mesa: add intrinsics for shared variables (v1 only)
 - st/mesa: add mappings for compute shader sysvals (v1 only)
 - st/mesa: implement limits for ARB_compute_shader (v1 only)

Only minor changes have been applied since the v1, but I just want to be sure
that all patches are correctly Rb. The Gallium interface is now stable, so I
will probably push this series this week if I don't get strong objections. :-)

Please review, thanks!

Ilia Mirkin (1):
  mesa: make compute maximums reflect driver-provided values

Samuel Pitoiset (18):
  mesa: do not use a constant for MAX_COMPUTE_SHARED_SIZE
  mesa: store shared size in gl_compute_program
  mesa: add PROGRAM_MEMORY
  gallium/cso: add support for compute shaders
  gallium: add a new interface for pipe_context::launch_grid()
  gallium: add indirect compute parameters to pipe_grid_info
  gallium: add PIPE_SHADER_CAP_SUPPORTED_IRS
  tgsi/ureg: add shared variables support for compute shaders
  st/mesa: add a second pipeline for compute
  st/mesa: add compute shader states
  st/mesa: add conversion for compute shaders
  st/mesa: add intrinsics for shared variables
  st/mesa: keep track of shared memory declarations
  st/mesa: add mappings for compute shader sysvals
  st/mesa: add state validation for compute shaders
  st/mesa: add compute program dispatch callbacks
  st/mesa: implement limits for ARB_compute_shader
  trace: add all compute related functions

 src/compiler/glsl/builtin_variables.cpp|  15 ++-
 src/compiler/glsl/glsl_parser_extras.cpp   |   7 +
 src/compiler/glsl/glsl_parser_extras.h |   5 +
 src/compiler/glsl/main.cpp |   5 +
 src/gallium/auxiliary/cso_cache/cso_context.c  |  30 +
 src/gallium/auxiliary/cso_cache/cso_context.h  |   4 +
 src/gallium/auxiliary/gallivm/lp_bld_limits.h  |   2 +
 src/gallium/auxiliary/tgsi/tgsi_build.c|   1 +
 src/gallium/auxiliary/tgsi/tgsi_dump.c |   5 +
 src/gallium/auxiliary/tgsi/tgsi_exec.h |   2 +
 src/gallium/auxiliary/tgsi/tgsi_strings.c  |   1 +
 src/gallium/auxiliary/tgsi/tgsi_text.c |   3 +
 src/gallium/auxiliary/tgsi/tgsi_ureg.c |  32 +
 src/gallium/auxiliary/tgsi/tgsi_ureg.h |   3 +
 src/gallium/docs/source/screen.rst |   2 +
 src/gallium/drivers/freedreno/freedreno_screen.c   |   2 +
 src/gallium/drivers/ilo/ilo_gpgpu.c|   8 +-
 src/gallium/drivers/ilo/ilo_screen.c   |   2 +
 src/gallium/drivers/nouveau/nv50/nv50_compute.c|  16 +--
 src/gallium/drivers/nouveau/nv50/nv50_context.h|   3 +-
 .../drivers/nouveau/nv50/nv50_query_hw_sm.c|  12 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_compute.c|  19 ++-
 src/gallium/drivers/nouveau/nvc0/nvc0_context.h|   6 +-
 .../drivers/nouveau/nvc0/nvc0_query_hw_sm.c|  12 +-
 src/gallium/drivers/nouveau/nvc0/nvc0_screen.c |   2 +
 src/gallium/drivers/nouveau/nvc0/nve4_compute.c|  10 +-
 src/gallium/drivers/r300/r300_screen.c |   4 +
 src/gallium/drivers/r600/evergreen_compute.c   |  19 ++-
 src/gallium/drivers/r600/r600_pipe.c   |   2 +
 src/gallium/drivers/radeonsi/si_compute.c  |  33 +++--
 src/gallium/drivers/radeonsi/si_pipe.c |   5 +
 src/gallium/drivers/svga/svga_screen.c |   6 +
 src/gallium/drivers/trace/tr_context.c |  75 +++
 src/gallium/drivers/trace/tr_dump_state.c  |  60 +
 src/gallium/drivers/trace/tr_dump_state.h  |   4 +