On 01/25/2016 08:07 PM, Marek Olšák wrote:
On Sun, Jan 24, 2016 at 4:47 PM, Samuel Pitoiset
wrote:
Like other resources, the indirect draw buffer must be unwrapped.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/trace/tr_context.c | 15 ++-
1 file changed, 14
ops") is going to be removed.
Marek
On Sun, Jan 24, 2016 at 10:09 PM, Samuel Pitoiset
wrote:
Signed-off-by: Samuel Pitoiset
---
src/gallium/auxiliary/cso_cache/cso_context.c | 53 +++
src/gallium/auxiliary/cso_cache/cso_context.h | 6 +++
2 files changed,
On 01/25/2016 03:28 PM, Ilia Mirkin wrote:
On Sun, Jan 24, 2016 at 4:09 PM, Samuel Pitoiset
wrote:
Like indirect draw, we need to store a resource and an offset that
needs to be 4 byte aligned. When indirect is used, the size of the
grid (in blocks) is stored with three 32-bit integers
On 01/26/2016 12:47 PM, Marek Olšák wrote:
On Sun, Jan 24, 2016 at 10:18 PM, Samuel Pitoiset
wrote:
Signed-off-by: Samuel Pitoiset
---
I have forgot this one...
src/gallium/drivers/trace/tr_context.c| 80 +++
src/gallium/drivers/trace/tr_dump_state.c
On 01/26/2016 02:22 PM, Ilia Mirkin wrote:
On Tue, Jan 26, 2016 at 5:28 AM, Marek Olšák wrote:
On Tue, Jan 26, 2016 at 6:17 AM, Alex Deucher wrote:
On Mon, Jan 25, 2016 at 6:35 PM, Nicolai Hähnle wrote:
On 24.01.2016 16:09, Samuel Pitoiset wrote:
Loosely based on tessellation shaders
On 01/25/2016 04:02 PM, Ilia Mirkin wrote:
How about
st/mesa: add compute program dispatch callbacks
or something along those lines. I don't think "state tracker" is the
right term to use.
Fine by me, thanks for the suggestion.
On Sun, Jan 24, 2016 at 4:09 PM, Samuel
On 01/26/2016 02:57 PM, Marek Olšák wrote:
On Tue, Jan 26, 2016 at 2:25 PM, Ilia Mirkin wrote:
I'd be fine with a new TGSI_FILE_MEMORY which provided options for
shared, global, and local(/private?) memory. I believe the old
TGSI_FILE_RESOURCE had support for these in a hacky way, this would
On 01/26/2016 05:45 AM, Ilia Mirkin wrote:
On Mon, Jan 25, 2016 at 11:00 PM, Michel Dänzer wrote:
On 26.01.2016 01:17, Nicolai Hähnle wrote:
On 25.01.2016 10:04, Ilia Mirkin wrote:
Yeah so this isn't going to fly. r600/radeonsi both expose
PIPE_CAP_COMPUTE, for clover, but won't support the
ng buffer.
Thanks,
Marek
On Sun, Jan 24, 2016 at 10:09 PM, Samuel Pitoiset
wrote:
At least, one shader buffer must be available for compute shaders.
Signed-off-by: Samuel Pitoiset
---
src/gallium/include/pipe/p_state.h | 2 +-
src/mesa/state_tracker/st_extensions.c | 6 --
2 files ch
On 02/03/2016 08:00 PM, Ilia Mirkin wrote:
Spotted by Coverity
Signed-off-by: Ilia Mirkin
---
v1 -> v2: forgot to remove the original free...
src/gallium/drivers/nouveau/nv50/nv50_program.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/gallium/drivers/n
Reviewed-by: Samuel Pitoiset
On 02/03/2016 07:53 PM, Ilia Mirkin wrote:
Spotted by Coverity
Signed-off-by: Ilia Mirkin
---
src/mesa/state_tracker/st_atom_storagebuf.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_atom_storagebuf.c
b/src
On 02/03/2016 09:55 PM, Ilia Mirkin wrote:
On Wed, Feb 3, 2016 at 3:47 PM, Samuel Pitoiset
wrote:
On 02/03/2016 08:00 PM, Ilia Mirkin wrote:
Spotted by Coverity
Signed-off-by: Ilia Mirkin
---
v1 -> v2: forgot to remove the original free...
src/gallium/drivers/nouveau/n
Signed-off-by: Samuel Pitoiset
---
src/gallium/auxiliary/tgsi/tgsi_transform.h | 2 +-
src/gallium/auxiliary/tgsi/tgsi_ureg.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_transform.h
b/src/gallium/auxiliary/tgsi/tgsi_transform.h
This won't fly because you forgot to add PIPE_QUERY_OCCLUSION_PREDICATE
in many places in nv50_query_hw.c (begin_query(), end_query()...).
On 02/04/2016 06:52 PM, Ilia Mirkin wrote:
Signed-off-by: Ilia Mirkin
---
src/gallium/drivers/nouveau/nv50/nv50_query_hw.c | 3 +++
1 file changed, 3 in
On 02/05/2016 03:23 PM, Ilia Mirkin wrote:
Did I? I thought it was already there, and just forgotten here. Will
recheck.
You need to add it, otherwise you will hit an assert in begin_query().
On Feb 5, 2016 5:37 AM, "Samuel Pitoiset" mailto:samuel.pitoi...@gmail.com>>
The size of shared variables needs to be stored in gl_compute_program
in order to set up pipe_compute_state::req_local_mem.
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin
---
src/mesa/main/mtypes.h| 5 +
src/mesa/main/shaderapi.c | 1 +
2 files changed, 6 insertions(+)
diff
This introduces pipe_grid_info which contains all information to
describe a launch_grid call. This will be used to implement indirect
compute in the same fashion as indirect draw.
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
Reviewed-by: Ilia Mirkin
---
src/gallium/drivers/ilo
This will allow to query the underlying drivers for the maximum
total storage size of all variables declared as with
PIPE_COMPUTE_CAP_MAX_LOCAL_SIZE.
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
Reviewed-by: Ilia Mirkin
---
src/compiler/glsl/main.cpp | 1 +
src/mesa/main
Compute needs a new and different validation path.
Changes from v2:
- make use of unreachable() instead of assert() when the pipeline is
invalid
- move the st_pipeline enumeration to st_context.h instead of st_api.h
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin (v1)
---
src
This cap indicates the supported representations of programs. It should
be a flag with the pipe_shader_ir enum values. It will allow to enable
ARB_compute_shader if the underlying driver supports TGSI.
Signed-off-by: Samuel Pitoiset
---
src/gallium/auxiliary/gallivm/lp_bld_limits.h| 2
alues
Samuel Pitoiset (19):
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 co
LOCAL_INVOCATION_ID, WORK_GROUP_ID and NUM_WORK_GROUPS are respectively
mapped to THREAD_ID, BLOCK_ID and GRID_SIZE.
Changes from v2:
- add assertions in st_translate_program()
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin (v1)
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 12
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
Reviewed-by: Ilia Mirkin
---
src/mesa/state_tracker/st_atom.c| 2 +-
src/mesa/state_tracker/st_atom.h| 1 +
src/mesa/state_tracker/st_atom_shader.c | 36 +
src/mesa/state_tracker/st_cb_program.c | 28
This adds GLSL intrinsics for load/store and atomic operations.
Changes from v2:
- use PROGRAM_MEMORY instead of PROGRAM_BUFFER
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin (v1)
---
src/mesa/state_tracker/st_extensions.c | 3 +
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 91
Changes from v2:
- removed cso_{save,restore}_compute_shader() functions and the
compute_shader_saved variable because disabling compute shaders for
meta ops is not currently needed
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin (v1)
---
src/gallium/auxiliary/cso_cache
Like indirect draw, we need to store a resource and an offset that
needs to be 4 byte aligned. When indirect is used, the size of the
grid (in blocks) is stored with three 32-bit integers.
Changes from v2:
- s/most values/block sizes/
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
According to the spec, there are no predefined inputs nor any
fixed-function outputs.
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 8
src/mesa/state_tracker/st_program.c| 19 ++-
2 files changed, 26
From: Ilia Mirkin
Looks like the various max's were never plumbed through.
Signed-off-by: Ilia Mirkin
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
---
src/compiler/glsl/builtin_variables.cpp | 15 ++-
src/compiler/glsl/glsl_parser_extras.cpp | 7 +++
This will be used for shared, global and local memory areas.
Signed-off-by: Samuel Pitoiset
---
src/mesa/main/mtypes.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 432cda9..d50376b 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa
This binds atomics, constants, samplers, ssbos, textures and ubos.
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
Reviewed-by: Ilia Mirkin
---
src/mesa/state_tracker/st_atom.c| 6
src/mesa/state_tracker/st_atom.h| 5
src/mesa/state_tracker
ARB_compute_shader is only enabled if the underlying driver exposes
TGSI through the PIPE_CAP_SHADER_SUPPORTED_IRS cap.
Changes from v2:
- make use of the new PIPE_CAP_SHADER_SUPPORTED_IRS cap instead of
enabling the extension when PIPE_CAP_COMPUTE is enabled.
Signed-off-by: Samuel Pitoiset
This introduces TGSI_FILE_MEMORY for shared, global and local memory.
Only shared memory is currently supported.
Changes from v2:
- introduce TGSI_FILE_MEMORY
Signed-off-by: Samuel Pitoiset
---
src/gallium/auxiliary/tgsi/tgsi_build.c| 1 +
src/gallium/auxiliary/tgsi/tgsi_dump.c | 5
Signed-off-by: Samuel Pitoiset
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 19 ---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index d74b84c..9303495 100644
--- a/src
This state tracker implements DispatchCompute() and DispatchComputeIndirect().
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
Reviewed-by: Ilia Mirkin
---
src/mesa/Makefile.sources | 2 +
src/mesa/state_tracker/st_cb_compute.c | 85
According to the spec, this also increases the following minimum values:
- MAX_COMBINED_TEXTURE_IMAGE_UNITS 96 (6*16), was 80
- MAX_UNIFORM_BUFFER_BINDINGS 72 (6*12), was 60
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
Reviewed-by: Ilia Mirkin
---
src/mesa
Changes from v2:
- remove use of MALLOC()
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin (v1)
---
src/gallium/drivers/trace/tr_context.c| 75 +++
src/gallium/drivers/trace/tr_dump_state.c | 51 +
src/gallium/drivers/trace
Kepler compute support is really different than Fermi and it's not
ready yet.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
b/src/ga
available below.
Please review, thanks!
Samuel Pitoiset (12):
nvc0: allocate an area for compute user constbufs
nvc0: allow to push constant buffers for compute on Fermi
nvc0: bind constant buffers for compute on Fermi
nvc0: bind driver consts on buffer 15 for compute on Fermi
nvc0
Loosely based on 3D.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 60 +
src/gallium/drivers/nouveau/nvc0/nvc0_context.c | 11 +++--
src/gallium/drivers/nouveau/nvc0/nvc0_screen.h | 2 +-
src/gallium/drivers/nouveau/nvc0
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/codegen/nv50_ir.h| 2 ++
.../drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp| 16 ++--
src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp| 10 ++
3 files changed, 26 insertions(+), 2
Shared memory address space (FILE_MEMORY_SHARED) must be used instead
of global memory when a shared memory area is declared.
Signed-off-by: Samuel Pitoiset
---
.../drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp | 42 +++---
1 file changed, 30 insertions(+), 12 deletions
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 140 +++-
src/gallium/drivers/nouveau/nvc0/nvc0_context.h | 2 +
src/gallium/drivers/nouveau/nvc0/nvc0_tex.c | 2 +-
3 files changed, 141 insertions(+), 3 deletions(-)
diff --git a
Signed-off-by: Samuel Pitoiset
---
.../drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 1 +
.../nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 102 -
.../nouveau/codegen/nv50_ir_lowering_nvc0.h| 1 +
3 files changed, 102 insertions(+), 2 deletions(-)
diff
This OP_SELP insn will be used to handle compare and swap subops.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 8
src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff
Loosely based on 3D.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 34 +
src/gallium/drivers/nouveau/nvc0/nvc0_context.c | 12 ++---
src/gallium/drivers/nouveau/nvc0/nvc0_context.h | 4 ++-
src/gallium/drivers/nouveau/nvc0
Constant buffers must be bound for compute like for 3D. This is done
by adding a new 'shader' parameter to nvc0_cb_bo_push() which allows
to use the compute channel for compute shaders, and the 3D channel
for other shader types.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drive
When indirect compute is used, the size of the grid (in blocks) is
stored as three integers inside a buffer. This requires a macro to
set up GRIDDIM_YX and GRIDDIM_Z.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/mme/Makefile | 2 +-
src/gallium/drivers/nouveau/nvc0
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 13 ++---
src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 2 ++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_compute.c
b/src/gallium/drivers
For compute shaders, we might need to upload uniforms.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 14 +++---
src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c | 12 ++--
src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
Reviewed-by: Samuel Pitoiset
On 02/07/2016 02:53 AM, Ilia Mirkin wrote:
Signed-off-by: Ilia Mirkin
v1 -> v2: adjust begin/end methods as well
---
Tested this time around.
src/gallium/drivers/nouveau/nv50/nv50_query_hw.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/
On 02/06/2016 11:52 PM, Ilia Mirkin wrote:
On Sat, Feb 6, 2016 at 5:38 PM, Samuel Pitoiset
wrote:
Constant buffers must be bound for compute like for 3D. This is done
by adding a new 'shader' parameter to nvc0_cb_bo_push() which allows
to use the compute channel for compute shader
On 02/07/2016 12:02 AM, Ilia Mirkin wrote:
On Sat, Feb 6, 2016 at 5:38 PM, Samuel Pitoiset
wrote:
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 13 ++---
src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 2 ++
2 files changed, 12
but this is definitely possible, I'll do.
On Sat, Feb 6, 2016 at 5:38 PM, Samuel Pitoiset
wrote:
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 140 +++-
src/gallium/drivers/nouveau/nvc0/nvc0_context.h | 2 +
src/galli
On 02/07/2016 12:13 AM, Ilia Mirkin wrote:
On Sat, Feb 6, 2016 at 5:38 PM, Samuel Pitoiset
wrote:
When indirect compute is used, the size of the grid (in blocks) is
stored as three integers inside a buffer. This requires a macro to
set up GRIDDIM_YX and GRIDDIM_Z.
Signed-off-by: Samuel
On 02/07/2016 12:23 AM, Ilia Mirkin wrote:
On Sat, Feb 6, 2016 at 5:38 PM, Samuel Pitoiset
wrote:
Signed-off-by: Samuel Pitoiset
---
.../drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 1 +
.../nouveau/codegen/nv50_ir_lowering_nvc0.cpp | 102 -
.../nouveau
On 02/07/2016 10:38 AM, Michael Schellenberger Costa wrote:
Hi,
Am 06/02/2016 um 23:38 schrieb Samuel Pitoiset:
For compute shaders, we might need to upload uniforms.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 14 +++---
src
On 02/07/2016 05:56 AM, Ilia Mirkin wrote:
On Sat, Feb 6, 2016 at 6:13 PM, Ilia Mirkin wrote:
On Sat, Feb 6, 2016 at 5:38 PM, Samuel Pitoiset
wrote:
When indirect compute is used, the size of the grid (in blocks) is
stored as three integers inside a buffer. This requires a macro to
set up
On 02/07/2016 12:50 AM, Ilia Mirkin wrote:
On Sat, Feb 6, 2016 at 5:04 PM, Samuel Pitoiset
wrote:
This cap indicates the supported representations of programs. It should
be a flag with the pipe_shader_ir enum values. It will allow to enable
ARB_compute_shader if the underlying driver
On 02/07/2016 12:51 AM, Ilia Mirkin wrote:
On Sat, Feb 6, 2016 at 5:04 PM, Samuel Pitoiset
wrote:
This introduces TGSI_FILE_MEMORY for shared, global and local memory.
Only shared memory is currently supported.
Changes from v2:
- introduce TGSI_FILE_MEMORY
Signed-off-by: Samuel Pitoiset
On 02/07/2016 01:02 AM, Ilia Mirkin wrote:
On Sat, Feb 6, 2016 at 5:04 PM, Samuel Pitoiset
wrote:
ARB_compute_shader is only enabled if the underlying driver exposes
TGSI through the PIPE_CAP_SHADER_SUPPORTED_IRS cap.
Changes from v2:
- make use of the new PIPE_CAP_SHADER_SUPPORTED_IRS
On 02/06/2016 11:04 PM, Samuel Pitoiset wrote:
This introduces pipe_grid_info which contains all information to
describe a launch_grid call. This will be used to implement indirect
compute in the same fashion as indirect draw.
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
Reviewed
they are currently not used.
Let's wait for Marek to be sure. :-)
On Sat, Feb 6, 2016 at 5:04 PM, Samuel Pitoiset
wrote:
Changes from v2:
- removed cso_{save,restore}_compute_shader() functions and the
compute_shader_saved variable because disabling compute shaders for
meta
On 02/07/2016 07:00 PM, Ilia Mirkin wrote:
On Sun, Feb 7, 2016 at 5:59 AM, Samuel Pitoiset
wrote:
On 02/06/2016 11:04 PM, Samuel Pitoiset wrote:
This introduces pipe_grid_info which contains all information to
describe a launch_grid call. This will be used to implement indirect
compute
Loosely based on 3D.
Changes from v2:
- get rid of the 's' param to nvc0_cb_bo_push() because it doesn't
matter to upload constbufs for compute using the 3d chan
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 60 +++
Loosely based on 3D.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 34 +
src/gallium/drivers/nouveau/nvc0/nvc0_context.c | 12 ++---
src/gallium/drivers/nouveau/nvc0/nvc0_context.h | 4 ++-
src/gallium/drivers/nouveau/nvc0
This OP_SELP insn will be used to handle compare and swap subops.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 8
src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff
For compute shaders, we might need to upload uniforms.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 14 +++---
src/gallium/drivers/nouveau/nvc0/nvc0_state_validate.c | 12 ++--
src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
When indirect compute is used, the size of the grid (in blocks) is
stored as three integers inside a buffer. This requires a macro to
set up GRIDDIM_YX and GRIDDIM_Z.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/mme/Makefile | 2 +-
src/gallium/drivers/nouveau/nvc0
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/codegen/nv50_ir.h| 2 ++
.../drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp| 16 ++--
src/gallium/drivers/nouveau/codegen/nv50_ir_print.cpp| 10 ++
3 files changed, 26 insertions(+), 2
Changes from v2:
- refactor the code to share (almost) the same logic between 3d and
compute
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 38 +++--
src/gallium/drivers/nouveau/nvc0/nvc0_context.h | 2 ++
src/gallium/drivers
Changes from v2:
- always bind the driver consts even if user params come in via clover
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_compute.c | 12 +---
src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 2 ++
2 files changed, 11 insertions(+), 3 deletions
Changes from v2:
- make sure the op is OP_SELP when emitting the predicate and add one
assert
- use bld.getSSA() for mkOp2()
- add cross edge between tryLockAndSetBB and joinBB
Signed-off-by: Samuel Pitoiset
---
.../drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 4 +
.../nouveau
Kepler compute support is really different than Fermi and it's not
ready yet.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_screen.c
b/src/ga
Shared memory address space (FILE_MEMORY_SHARED) must be used instead
of global memory when a shared memory area is declared.
Changes from v2:
- oops, do not remove TGSI_FILE_BUFFER in a switch in
nv50_ir_from_tgsi.cpp
Signed-off-by: Samuel Pitoiset
---
.../drivers/nouveau/codegen
There is no need to allocate memory when unwrapping the indirect buf.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/trace/tr_context.c | 17 ++---
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git a/src/gallium/drivers/trace/tr_context.c
b/src/gallium/drivers
good.
On Sun, Feb 7, 2016 at 4:36 PM, Samuel Pitoiset
wrote:
There is no need to allocate memory when unwrapping the indirect buf.
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/trace/tr_context.c | 17 ++---
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git
This fixes a crash with bin/arb_clear_texture-base-formats and
probably some other tests which use clear_texture().
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/trace/tr_context.c | 30 ++
1 file changed, 30 insertions(+)
diff --git a/src/gallium/drivers
On 02/07/2016 11:39 PM, Ilia Mirkin wrote:
On Sun, Feb 7, 2016 at 5:32 PM, Samuel Pitoiset
wrote:
This fixes a crash with bin/arb_clear_texture-base-formats and
probably some other tests which use clear_texture().
Signed-off-by: Samuel Pitoiset
---
src/gallium/drivers/trace/tr_context.c
This avoids a possible NULL dereference because ureg_create() might
return a NULL pointer.
Spotted by coverity.
Signed-off-by: Samuel Pitoiset
Cc: Nicolai Hähnle
---
src/mesa/state_tracker/st_cb_texture.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/state_tracker
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
g
This will be used for shared, global and local memory areas.
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin
---
src/mesa/main/mtypes.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 432cda9..d50376b 100644
--- a/src/mesa/main
Compute needs a new and different validation path.
Changes from v2:
- make use of unreachable() instead of assert() when the pipeline is
invalid
- move the st_pipeline enumeration to st_context.h instead of st_api.h
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin (v1)
---
src
The size of shared variables needs to be stored in gl_compute_program
in order to set up pipe_compute_state::req_local_mem.
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin
---
src/mesa/main/mtypes.h| 5 +
src/mesa/main/shaderapi.c | 1 +
2 files changed, 6 insertions(+)
diff
Changes from v2:
- removed cso_{save,restore}_compute_shader() functions and the
compute_shader_saved variable because disabling compute shaders for
meta ops is not currently needed
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin (v1)
Reviewed-by: Marek Olšák
---
src/gallium
Like indirect draw, we need to store a resource and an offset that
needs to be 4 byte aligned. When indirect is used, the size of the
grid (in blocks) is stored with three 32-bit integers.
Changes from v2:
- s/most values/block sizes/
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
This adds GLSL intrinsics for load/store and atomic operations.
Changes from v2:
- use PROGRAM_MEMORY instead of PROGRAM_BUFFER
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin (v1)
---
src/mesa/state_tracker/st_extensions.c | 3 +
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 91
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
Reviewed-by: Ilia Mirkin
---
src/mesa/state_tracker/st_atom.c| 2 +-
src/mesa/state_tracker/st_atom.h| 1 +
src/mesa/state_tracker/st_atom_shader.c | 36 +
src/mesa/state_tracker/st_cb_program.c | 28
According to the spec, there are no predefined inputs nor any
fixed-function outputs.
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 8
src/mesa/state_tracker/st_program.c| 19 ++-
2 files changed, 26
This cap indicates the supported representations of programs. It should
be a mask of pipe_shader_ir bits. It will allow to enable
ARB_compute_shader if the underlying driver supports TGSI.
Changes from v2:
- improve description of PIPE_SHADER_CAP_SUPPORTED_IRS
Signed-off-by: Samuel Pitoiset
This introduces pipe_grid_info which contains all information to
describe a launch_grid call. This will be used to implement indirect
compute in the same fashion as indirect draw.
Changes from v2:
- correctly initialize pipe_grid_info for nv50/nvc0
Signed-off-by: Samuel Pitoiset
Reviewed-by
This will allow to query the underlying drivers for the maximum
total storage size of all variables declared as with
PIPE_COMPUTE_CAP_MAX_LOCAL_SIZE.
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
Reviewed-by: Ilia Mirkin
---
src/compiler/glsl/main.cpp | 1 +
src/mesa/main
From: Ilia Mirkin
Looks like the various max's were never plumbed through.
Signed-off-by: Ilia Mirkin
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
---
src/compiler/glsl/builtin_variables.cpp | 15 ++-
src/compiler/glsl/glsl_parser_extras.cpp | 7 +++
LOCAL_INVOCATION_ID, WORK_GROUP_ID and NUM_WORK_GROUPS are respectively
mapped to THREAD_ID, BLOCK_ID and GRID_SIZE.
Changes from v2:
- add assertions in st_translate_program()
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin (v1)
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 12
This introduces TGSI_FILE_MEMORY for shared, global and local memory.
Only shared memory is currently supported.
Changes from v2:
- introduce TGSI_FILE_MEMORY
Signed-off-by: Samuel Pitoiset
---
src/gallium/auxiliary/tgsi/tgsi_build.c| 1 +
src/gallium/auxiliary/tgsi/tgsi_dump.c | 5
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 19 ---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index e0a38c4
This state tracker implements DispatchCompute() and DispatchComputeIndirect().
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
Reviewed-by: Ilia Mirkin
---
src/mesa/Makefile.sources | 2 +
src/mesa/state_tracker/st_cb_compute.c | 85
This binds atomics, constants, samplers, ssbos, textures and ubos.
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák
Reviewed-by: Ilia Mirkin
---
src/mesa/state_tracker/st_atom.c| 6
src/mesa/state_tracker/st_atom.h| 5
src/mesa/state_tracker
/compute_supported_irs/
- disable ARB_compute_shader and add a comment which explains why
Signed-off-by: Samuel Pitoiset
Reviewed-by: Marek Olšák (v1)
Reviewed-by: Ilia Mirkin (v1)
---
src/mesa/state_tracker/st_extensions.c | 33 +++--
1 file changed, 31 insertions(+), 2 deletions
Changes from v3:
- dump the TGSI compute program
Changes from v2:
- remove use of MALLOC()
Signed-off-by: Samuel Pitoiset
Reviewed-by: Ilia Mirkin (v1)
---
src/gallium/drivers/trace/tr_context.c| 75 +++
src/gallium/drivers/trace/tr_dump_state.c | 60
On 02/11/2016 11:51 AM, Marek Olšák wrote:
This needs a cleanup, because some program variant code has been
unified. See below.
Right, sorry I didn't see that you pushed your refactoring patch.
Thanks!
On Wed, Feb 10, 2016 at 7:10 PM, Samuel Pitoiset
wrote:
Signed-off-by: S
901 - 1000 of 5029 matches
Mail list logo