Re: [Mesa-dev] [PATCH 0/7] st/mesa: add shader image support

2016-01-30 Thread Dave Airlie
On 31 January 2016 at 11:55, Ilia Mirkin wrote: > Please note that there is no complete nvc0 implementation backing this > (unlike the SSBO case), so I have not done more complete dEQP tests, > and a number of piglit tests fail. > > Furthermore, there's the RGBA vs BGRA format issue that needs to

Re: [Mesa-dev] [PATCH 6/7] st/mesa: convert GLSL image intrinsics into TGSI

2016-01-30 Thread Dave Airlie
> + for (i = 0; i < program->shader->NumImages; i++) { > + if (program->images_used & (1 << i)) { > + t->images[i] = ureg_DECL_image(ureg, i, > +program->image_targets[i], > +program->image_formats[i], >

Re: [Mesa-dev] [PATCH 1/7] gallium: make image views non-persistent objects

2016-01-30 Thread Dave Airlie
On 31 January 2016 at 11:55, Ilia Mirkin wrote: > Make them akin to shader buffers, with no refcounting/etc. Just used to > pass data about the bound image in ->set_shader_images. LGTM. Reviewed-by: Dave Airlie > > Signed-off-by: Ilia Mirkin > --- > src/gallium/auxiliary/util/u_inlines.h

Re: [Mesa-dev] [PATCH 1/4] st/mesa: unify variants and delete functions for TCS, TES, GS

2016-01-30 Thread eocallaghan
This series is, Reviewed-by: Edward O'Callaghan On 2016-01-31 02:50, Marek Olšák wrote: From: Marek Olšák no difference between those --- src/mesa/state_tracker/st_atom_shader.c | 6 +- src/mesa/state_tracker/st_cb_program.c | 18 ++- src/mesa/state_tracker/st_context.h | 6 +- sr

[Mesa-dev] [PATCH 7/7] radeonsi: Enable ARB_framebuffer_no_attachments

2016-01-30 Thread Edward O'Callaghan
Signed-off-by: Edward O'Callaghan --- src/gallium/drivers/radeonsi/si_pipe.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index f219bc4..ffc25fb 100644 --- a/src/gallium/drivers/radeonsi/si_

Re: [Mesa-dev] [PATCH 2/3] mesa: use geometric helper for computing min samples

2016-01-30 Thread eocallaghan
Reviewed-by: Edward O'Callaghan On 2016-01-31 16:58, Ilia Mirkin wrote: In case we have a draw buffer without attachments, we should be looking at the default number of samples. Signed-off-by: Ilia Mirkin --- Still doesn't work properly on nvc0, but at least the right number of min samples g

[Mesa-dev] [PATCH 5/7] mesa_st: Update framebuffer state with no.of samples, layers

2016-01-30 Thread Edward O'Callaghan
Handle the case of ARB_framebuffer_no_attachment. Also, kill off a dead debug printf() call while we are here. --- src/mesa/state_tracker/st_atom_framebuffer.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state

[Mesa-dev] [PATCH 4/7] gallium: Put no.of {samples, layers} into pipe_framebuffer_state

2016-01-30 Thread Edward O'Callaghan
Here we store the number of samples and layers directly in the pipe_framebuffer_state so that in the case of ARB_framebuffer_no_attachment we may make use of them directly. Further, we adjust various gallium/auxiliary helper functions accordingly. Signed-off-by: Edward O'Callaghan --- src/galli

[Mesa-dev] [PATCH 6/7] mesa: invalidate framebuffer when changing parameters

2016-01-30 Thread Edward O'Callaghan
From: Ilia Mirkin This fixes dEQP-GLES31.functional.fbo.completeness.no_attachments When the width or height are 0, the framebuffer is incomplete. We may also not have been passing the new state down to the driver when the widths/heights changed. Signed-off-by: Ilia Mirkin Signed-off-by: Edwar

[Mesa-dev] [PATCH 1/7] gallium: Add PIPE_CAP_FRAMEBUFFER_LAYERS

2016-01-30 Thread Edward O'Callaghan
Add PIPE_CAP to determine the number of layers for a framebuffer for GL_ARB_framebuffer_no_attachments. Signed-off-by: Edward O'Callaghan --- src/gallium/docs/source/screen.rst | 2 ++ src/gallium/drivers/freedreno/freedreno_screen.c | 1 + src/gallium/drivers/i915/i915_screen.c

[Mesa-dev] [PATCH 3/7] mesa_st: Use _mesa_geometric_ functions appropriately

2016-01-30 Thread Edward O'Callaghan
Change references to gl_framebuffer::Width, Height, MaxNumLayers and Visual::samples to use the _mesa_geometric_ convenience functions for those places where the geometry of the gl_framebuffer is needed. This is in contrast to the geometry of the intersection of the attachments of the gl_framebuffe

[Mesa-dev] [PATCH 2/7] mesa: the _mesa_geometric_* functions require full types from mtypes.h

2016-01-30 Thread Edward O'Callaghan
From: Ilia Mirkin Signed-off-by: Ilia Mirkin --- src/mesa/main/framebuffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/framebuffer.h b/src/mesa/main/framebuffer.h index bfc8a08..ab077ed 100644 --- a/src/mesa/main/framebuffer.h +++ b/src/mesa/main/framebuf

[Mesa-dev] [PATCH 4/3] mesa: use default geometry's samples when there are no attachments

2016-01-30 Thread Ilia Mirkin
Whether multisampling is turned on depends, in part, on whether attachments are themselves multisample surfaces. However when there are no attachments, we should rely on the default geometry for this. Signed-off-by: Ilia Mirkin --- With this, nvc0 works as expected (in a soon-to-be sent test upd

[Mesa-dev] [PATCH 3/3] mesa: invalidate framebuffer when changing parameters

2016-01-30 Thread Ilia Mirkin
This fixes dEQP-GLES31.functional.fbo.completeness.no_attachments When the width or height are 0, the framebuffer is incomplete. We may also not have been passing the new state down to the driver when the widths/heights/etc changed. Make sure to dirty the state so that the framebuffer state is rev

[Mesa-dev] [PATCH 2/3] mesa: use geometric helper for computing min samples

2016-01-30 Thread Ilia Mirkin
In case we have a draw buffer without attachments, we should be looking at the default number of samples. Signed-off-by: Ilia Mirkin --- Still doesn't work properly on nvc0, but at least the right number of min samples gets passed along. src/mesa/program/program.c | 7 --- 1 file changed,

[Mesa-dev] [PATCH 1/3] mesa: the _mesa_geometric_* functions require full types from mtypes.h

2016-01-30 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/mesa/main/framebuffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/framebuffer.h b/src/mesa/main/framebuffer.h index bfc8a08..ab077ed 100644 --- a/src/mesa/main/framebuffer.h +++ b/src/mesa/main/framebuffer.h @@ -26,7 +26,7

[Mesa-dev] [PATCH 2/2] gallivm: add PK2H/UP2H support

2016-01-30 Thread sroland
From: Roland Scheidegger Add support for these opcodes, the conversion functions were already there albeit need some new packing stuff. Just like the tgsi version, piglit won't like it for all the same reasons, so it's disabled (UP2H passes piglit arb_shader_language_packing tests, albeit since P

[Mesa-dev] [PATCH 1/2] tgsi: add PK2H/UP2H support

2016-01-30 Thread sroland
From: Ilia Mirkin The util functions handle the half-float conversion. Note that piglit won't like it much due to: a) The util functions use magic float mul conversion but when run inside softpipe/llvmpipe, denorms are flushed to zero, therefore when the conversion is from/to f16 denorm the resul

Re: [Mesa-dev] [PATCH 1/3] gallivm: don't crash on UP2H and set correct src type

2016-01-30 Thread Roland Scheidegger
Am 30.01.2016 um 00:46 schrieb Marek Olšák: > From: Marek Olšák > > --- > src/gallium/auxiliary/gallivm/lp_bld_tgsi.c | 1 - > src/gallium/auxiliary/tgsi/tgsi_info.c | 1 + > 2 files changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/gallium/auxiliary/gallivm/lp_bld_tgsi.c > b/sr

[Mesa-dev] [PATCH 6/7] st/mesa: convert GLSL image intrinsics into TGSI

2016-01-30 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/mesa/main/mtypes.h | 1 + src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 226 - 2 files changed, 223 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 101283c..adaa2e

[Mesa-dev] [PATCH 1/7] gallium: make image views non-persistent objects

2016-01-30 Thread Ilia Mirkin
Make them akin to shader buffers, with no refcounting/etc. Just used to pass data about the bound image in ->set_shader_images. Signed-off-by: Ilia Mirkin --- src/gallium/auxiliary/util/u_inlines.h| 11 --- src/gallium/drivers/ddebug/dd_context.c | 28 +-

[Mesa-dev] [PATCH 5/7] st/mesa: allow st_format.h to be included from C++ files

2016-01-30 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/mesa/state_tracker/st_format.h | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/state_tracker/st_format.h b/src/mesa/state_tracker/st_format.h index 90e00e8..3e10aa6 100644 --- a/src/mesa/state_tracker/st_format.h +++ b/src/mesa/state_tracke

[Mesa-dev] [PATCH 3/7] tgsi: show textual format representation

2016-01-30 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/auxiliary/tgsi/tgsi_dump.c | 2 +- src/gallium/auxiliary/tgsi/tgsi_text.c | 13 ++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_dump.c b/src/gallium/auxiliary/tgsi/tgsi_dump.c index 2ad29b9.

[Mesa-dev] [PATCH 4/7] st/mesa: add an image atom for shader images

2016-01-30 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/mesa/Makefile.sources | 1 + src/mesa/state_tracker/st_atom.c | 5 + src/mesa/state_tracker/st_atom.h | 5 + src/mesa/state_tracker/st_atom_image.c | 202 + src/mesa/state_tracker/st_context.c|

[Mesa-dev] [PATCH 7/7] st/mesa: enable GL image extensions when backend supports them

2016-01-30 Thread Ilia Mirkin
This enables ARB_shader_image_load_store and ARB_shader_image_size when the backend claims support for these. It will also implicitly enable the image component of ARB_shader_texture_image_samples. Signed-off-by: Ilia Mirkin --- src/mesa/state_tracker/st_extensions.c | 16 1 fil

[Mesa-dev] [PATCH 2/7] gallium: add PIPE_SHADER_CAP_MAX_SHADER_IMAGES

2016-01-30 Thread Ilia Mirkin
Signed-off-by: Ilia Mirkin --- src/gallium/auxiliary/gallivm/lp_bld_limits.h| 1 + src/gallium/auxiliary/tgsi/tgsi_exec.h | 1 + src/gallium/docs/source/screen.rst | 1 + src/gallium/drivers/freedreno/freedreno_screen.c | 1 + src/gallium/drivers/nouveau/nv30/nv30_scre

[Mesa-dev] [PATCH 0/7] st/mesa: add shader image support

2016-01-30 Thread Ilia Mirkin
Please note that there is no complete nvc0 implementation backing this (unlike the SSBO case), so I have not done more complete dEQP tests, and a number of piglit tests fail. Furthermore, there's the RGBA vs BGRA format issue that needs to be resolved somehow. However I feel confident that this co

Re: [Mesa-dev] [PATCH] compiler: removed unused Makefile.sources

2016-01-30 Thread Rob Clark
On Sat, Jan 30, 2016 at 3:38 PM, Rob Herring wrote: > On Sat, Jan 30, 2016 at 2:06 PM, Rob Clark wrote: >> From: Rob Clark >> >> We seem to end up w/ duplication between compiler/Makefile.sources and >> compiler/glsl/Makefile.sources. The latter appears unused. Delete it. > > The fixes for And

Re: [Mesa-dev] [PATCH] compiler: removed unused Makefile.sources

2016-01-30 Thread Rob Herring
On Sat, Jan 30, 2016 at 2:06 PM, Rob Clark wrote: > From: Rob Clark > > We seem to end up w/ duplication between compiler/Makefile.sources and > compiler/glsl/Makefile.sources. The latter appears unused. Delete it. The fixes for Android I sent yesterday use it. But at least the nir/* files cou

[Mesa-dev] [PATCH] compiler: removed unused Makefile.sources

2016-01-30 Thread Rob Clark
From: Rob Clark We seem to end up w/ duplication between compiler/Makefile.sources and compiler/glsl/Makefile.sources. The latter appears unused. Delete it. Signed-off-by: Rob Clark --- src/compiler/glsl/Makefile.sources | 222 - 1 file changed, 222 deleti

Re: [Mesa-dev] [PATCH] nv50, nvc0: fix buffer clearing to respect engine alignment requirements

2016-01-30 Thread Nick Sarnie
Fixes the test on Kepler Tested-by: Nick Sarnie On Sat, Jan 30, 2016 at 10:10 AM, Ilia Mirkin wrote: > It appears that the nvidia render engine is quite picky when it comes to > linear surfaces. It doesn't like non-256-byte aligned offsets, and > apparently doesn't even do non-256-byte strides

[Mesa-dev] [PATCH 2/4] st/mesa: unify get_variant functions for TCS, TES, GS

2016-01-30 Thread Marek Olšák
From: Marek Olšák --- src/mesa/state_tracker/st_atom_shader.c | 18 +--- src/mesa/state_tracker/st_program.c | 164 +--- src/mesa/state_tracker/st_program.h | 17 +--- 3 files changed, 28 insertions(+), 171 deletions(-) diff --git a/src/mesa/state_tracker/s

[Mesa-dev] [PATCH 3/4] st/mesa: unify destroy_program_variants cases for TCS, TES, GS

2016-01-30 Thread Marek Olšák
From: Marek Olšák --- src/mesa/state_tracker/st_program.c | 66 + 1 file changed, 16 insertions(+), 50 deletions(-) diff --git a/src/mesa/state_tracker/st_program.c b/src/mesa/state_tracker/st_program.c index 2dfb41e..d606dd7 100644 --- a/src/mesa/state_trac

[Mesa-dev] [PATCH 1/4] st/mesa: unify variants and delete functions for TCS, TES, GS

2016-01-30 Thread Marek Olšák
From: Marek Olšák no difference between those --- src/mesa/state_tracker/st_atom_shader.c | 6 +- src/mesa/state_tracker/st_cb_program.c | 18 ++- src/mesa/state_tracker/st_context.h | 6 +- src/mesa/state_tracker/st_program.c | 204 src/mesa/state_

[Mesa-dev] [PATCH 4/4] st/mesa: remove st_is_program_native

2016-01-30 Thread Marek Olšák
From: Marek Olšák The default scenario sets GL_TRUE too. --- src/mesa/state_tracker/st_cb_program.c | 13 - 1 file changed, 13 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_program.c b/src/mesa/state_tracker/st_cb_program.c index 6f9c53e..ca493d8 100644 --- a/src/mesa/stat

[Mesa-dev] [PATCH] nv50, nvc0: fix buffer clearing to respect engine alignment requirements

2016-01-30 Thread Ilia Mirkin
It appears that the nvidia render engine is quite picky when it comes to linear surfaces. It doesn't like non-256-byte aligned offsets, and apparently doesn't even do non-256-byte strides. This makes arb_clear_buffer_object-unaligned pass on both nv50 and nvc0. As a side-effect this also allows R

[Mesa-dev] [PATCH 2/2] st/mesa: release GLSL IR in LinkShader after it's not needed

2016-01-30 Thread Marek Olšák
From: Marek Olšák --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index d98627f..8a194c0 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/s

[Mesa-dev] [PATCH 1/2] mesa: call build_program_resource_list inside Driver.LinkShader

2016-01-30 Thread Marek Olšák
From: Marek Olšák to allow LinkShader to free the GLSL IR. --- src/compiler/glsl/program.h| 5 - src/mesa/drivers/dri/i965/brw_link.cpp | 2 ++ src/mesa/program/ir_to_mesa.cpp| 4 ++-- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 3 +++ 4 files changed, 11 ins

[Mesa-dev] [PATCH 1/2] st/nine: Use pipe_resource_reference for vtxbuf

2016-01-30 Thread Axel Davy
This seems cleaner to actually reference the resources for vtxbuf, rather than relying on the fact the bound d3d streams do. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 3 ++- src/gallium/state_trackers/nine/stateblock9.c | 4 ++-- 2 files changed, 4 insertions(+

[Mesa-dev] [PATCH 2/2] st/nine: Unset vtxbuf on reset

2016-01-30 Thread Axel Davy
We forgot to reset vtxbuf. This fixes some crashes. Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph --- src/gallium/state_trackers/nine/nine_state.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_tra