[Mesa-dev] [PATCH] mesa/extensions: Fix NVX_gpu_memory_info lexicographical order.

2016-02-05 Thread Vinson Lee
Fixes MesaExtensionsTest.AlphabeticallySorted. Fixes: 1d79b9958090 ("mesa: implement GL_NVX_gpu_memory_info (v2)") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94016 Signed-off-by: Vinson Lee --- src/mesa/main/extensions_table.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [Mesa-dev] [PATCH 1/4] tgsi: break gigantic tgsi_scan_shader() function into pieces

2016-02-05 Thread eocallaghan
This series is, Reviewed-by: Edward O'Callaghan On 2016-02-06 11:56, Brian Paul wrote: New functions for examining instructions, declarations, etc. --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 739 + 1 file changed, 375 insertions(+), 364 deletions(-) diff -

[Mesa-dev] [PATCH 4/6] i965/fs: Plumb separate surfaces and samplers through from NIR

2016-02-05 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_blorp_blit_eu.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs.cpp| 29 - src/mesa/drivers/dri/i965/brw_fs.h | 3 +++ src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_nir.cpp

[Mesa-dev] [PATCH 0/6] nir/i965: Separate samplers and textures

2016-02-05 Thread Jason Ekstrand
This is my second series in praparation for SPIR-V. I sent it out some time ago as an RFC. At the time I got a conditional review from Ken but I thought it was worth sending out again. The original can be found here: http://lists.freedesktop.org/archives/mesa-dev/2015-November/099103.html Ther

[Mesa-dev] [PATCH 2/6] i965/fs: Add an enum for keeping track of texture instruciton sources

2016-02-05 Thread Jason Ekstrand
These logical texture instructions can have a *lot* of sources. It's much safer if we have symbolic names for them. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 46 +++- src/mesa/drivers/dri/i965/brw_fs.h | 14 + src/mesa/drivers/dri/i965/brw_fs_vis

[Mesa-dev] [PATCH 1/6] nir: Separate texture from sampler in nir_tex_instr

2016-02-05 Thread Jason Ekstrand
This commit adds the capability to NIR to support separate textures and samplers. As it currently stands, glsl_to_nir only sets the sampler and leaves the texture alone as it did before and nir_lower_samplers assumes this. However, backends can, if they wish, assume that they are separate because

[Mesa-dev] [PATCH 3/6] i965/fs: Separate the sampler from the surface in generate_tex

2016-02-05 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs.h | 1 + src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 20 ++-- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 4a38f80..600ce70 10064

[Mesa-dev] [PATCH 6/6] i965/vec4: Plumb separate surfaces and samplers through from NIR

2016-02-05 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_vec4.h | 3 ++- src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 2 +- src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 25 +--- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 12 4 files changed, 29 insertion

[Mesa-dev] [PATCH 5/6] i965/vec4: Separate the sampler from the surface in generate_tex

2016-02-05 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp index 730be21..2d0aca4 100644 --- a/src/mesa/drivers/dri

[Mesa-dev] [RFC 0/6] nir: Rework the way texture instructions reference samplers

2016-02-05 Thread Jason Ekstrand
This patch series is the first of many that I will be sending out in the next few weeks in an attempt to land SPIR-V support. While the SPIR-V code to test said patches does not exist in mesa yet, they will be piglited and most of said patches have been baking, in one for or another, for quite som

[Mesa-dev] [RFC 4/6] i965/nir: Lower samplers before uniforms

2016-02-05 Thread Jason Ekstrand
We are about to start doing load_var of a sampler to get the binding table index. If we're going to do this, then we need to have the load_var instructions when we run lower_samplers. If we let lower_io run on uniforms first, then they will get replaced with bogus load_uniform intrinsics which we

[Mesa-dev] [RFC 1/6] nir: Add a helper for copying a deref_var

2016-02-05 Thread Jason Ekstrand
--- src/compiler/nir/nir.c | 6 +++--- src/compiler/nir/nir.h | 1 + src/compiler/nir/nir_lower_var_copies.c | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 21bf678..2247a98 100644 ---

[Mesa-dev] [RFC 6/6] nir: Rework the way texture instructions reference samplers

2016-02-05 Thread Jason Ekstrand
Originally, NIR texture instructions had a pointer to a deref chain that represented the sampler. This commit changes that. Instead, we now use a load_var to get the sampler index and then pass that directly into the sampler_offset source of the instruction. This mechanism has a couple of advant

[Mesa-dev] [RFC 3/6] nir/types: Advertise 1 vector component for sampler types

2016-02-05 Thread Jason Ekstrand
Soon we are going to start doing loads of sampler variables. When this happens, we will define the semantics of such a load to be that it returns the binding table index which is a 1-component integer. --- src/compiler/nir_types.cpp | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[Mesa-dev] [RFC 2/6] nir/builder: Add a helper for loading from a deref_var

2016-02-05 Thread Jason Ekstrand
--- src/compiler/nir/nir_builder.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h index 88ba3a1..1252301 100644 --- a/src/compiler/nir/nir_builder.h +++ b/src/compiler/nir/nir_builder.h @@ -334,6 +334,21 @@ nir_l

[Mesa-dev] [RFC 5/6] nir: Replace tex_instr.array_size with max_sampler_index

2016-02-05 Thread Jason Ekstrand
--- src/compiler/nir/nir.c | 2 +- src/compiler/nir/nir.h | 4 ++-- src/compiler/nir/nir_clone.c | 2 +- src/compiler/nir/nir_instr_set.c | 4 ++-- src/compiler/nir/nir_lower_samplers.c | 4 ++-- src/mesa/drivers/dri/i965/brw_fs_

Re: [Mesa-dev] [PATCH 1/2] glsl: replace unreachable code with an assert()

2016-02-05 Thread Kenneth Graunke
On Wednesday, February 3, 2016 10:26:07 AM PST Timothy Arceri wrote: > All interface blocks will have been lowered by this point so just > use an assert. Returning false would have caused all sorts of > problems if they were not lowered yet and there is an assert to > catch this later anyway. > >

Re: [Mesa-dev] [PATCH 2/7] st/mesa: implement GL_ATI_fragment_shader

2016-02-05 Thread Ian Romanick
On 02/05/2016 01:11 PM, Miklós Máté wrote: > v2: fix arithmetic for special opcodes > (based on comments from Marek and Ilia), > fix fog state, cleanup > --- > src/mesa/Makefile.sources | 1 + > src/mesa/program/program.h| 2 + > src/mesa/state_tracker/st_atif

[Mesa-dev] GLSL IR is no longer cool where to from here?

2016-02-05 Thread Timothy Arceri
For the past couple of months I've been working away solely in the wasteland that is GLSL IR and one things seems clear. No one wants to review this code anymore. A lot of the original developers have either moved on or are busy with other things. The difference between sending a patch with nir: .

Re: [Mesa-dev] [PATCH 1/1] r600, compute: Do not overwrite pipe_resource.screen

2016-02-05 Thread Nicolai Hähnle
On 05.02.2016 17:54, Jan Vesely wrote: found by inspection. Signed-off-by: Jan Vesely Pushed, thanks! --- src/gallium/drivers/r600/evergreen_compute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r

Re: [Mesa-dev] [PATCH] radeonsi: don't emit unnecessary NULL exports for unbound targets (v2)

2016-02-05 Thread Nicolai Hähnle
Reviewed-by: Nicolai Hähnle On 05.02.2016 17:51, Marek Olšák wrote: From: Marek Olšák v2: remove semantic index == 0 checks add the else statement to remove shadowing of args --- src/gallium/drivers/radeonsi/si_shader.c | 88 ++-- 1 file changed, 62 inserti

Re: [Mesa-dev] [PATCH] mesa: move GL_ARB_debug_output code into new debug_output.c file

2016-02-05 Thread Timothy Arceri
On Fri, 2016-02-05 at 17:54 -0700, Brian Paul wrote: > The errors.c file had grown quite large so split off this extension > code into its own file.  This involved making a handful of functions > non-static. I was going to do this when I added KHR_debug but was too new at the time and didn't want

Re: [Mesa-dev] [PATCH 26/28] glsl: lower tessellation varyings packed with component layout qualifier

2016-02-05 Thread Timothy Arceri
Hi Anuj/anyone who feels like reviewing, As this is the last remaining patch in the series that I'd like to get addtional feedback on please let me know what I can do to speed things up. I originally assumed that the code comments would help make reviewing easy despite the size of the patch. Howe

[Mesa-dev] [PATCH 1/4] tgsi: break gigantic tgsi_scan_shader() function into pieces

2016-02-05 Thread Brian Paul
New functions for examining instructions, declarations, etc. --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 739 + 1 file changed, 375 insertions(+), 364 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index

[Mesa-dev] [PATCH 4/4] tgsi: minor whitespace fixes in tgsi_scan.c

2016-02-05 Thread Brian Paul
--- src/gallium/auxiliary/tgsi/tgsi_scan.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 42b62aa..489423d 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxilia

[Mesa-dev] [PATCH 3/4] tgsi: s/true/TRUE/ in tgsi_scan.c

2016-02-05 Thread Brian Paul
Just to be consistent. --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index a7d4b0c..42b62aa 100644 --- a/src/gallium/auxili

[Mesa-dev] [PATCH 2/4] tgsi: use switches instead of big if/else ifs

2016-02-05 Thread Brian Paul
--- src/gallium/auxiliary/tgsi/tgsi_scan.c | 60 -- 1 file changed, 36 insertions(+), 24 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 4199dbe..a7d4b0c 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_s

[Mesa-dev] [PATCH] st/mesa: move VS creation in bitmap code

2016-02-05 Thread Brian Paul
Do this one-time init with the other on-time inits. --- src/mesa/state_tracker/st_cb_bitmap.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index d8c3dbd..f39d956 10064

[Mesa-dev] [PATCH 1/3] gallium/util: whitespace, formatting fixes in u_debug.c

2016-02-05 Thread Brian Paul
--- src/gallium/auxiliary/util/u_debug.c | 201 ++- 1 file changed, 106 insertions(+), 95 deletions(-) diff --git a/src/gallium/auxiliary/util/u_debug.c b/src/gallium/auxiliary/util/u_debug.c index 2b60559..7a3d51f 100644 --- a/src/gallium/auxiliary/util/u_debug.c

[Mesa-dev] [PATCH 3/3] gallium/util: switch over to new u_debug_image.[ch] code

2016-02-05 Thread Brian Paul
--- src/gallium/auxiliary/Makefile.sources | 4 +- src/gallium/auxiliary/util/u_debug.c | 313 + src/gallium/auxiliary/util/u_debug.h | 39 src/gallium/drivers/llvmpipe/lp_flush.c| 1 + src/gallium/drivers/softpipe/sp_flush.c| 1 + sr

[Mesa-dev] [PATCH] mesa: move GL_ARB_debug_output code into new debug_output.c file

2016-02-05 Thread Brian Paul
The errors.c file had grown quite large so split off this extension code into its own file. This involved making a handful of functions non-static. --- src/compiler/glsl/glsl_parser_extras.cpp |1 + src/mapi/glapi/gen/gl_genexec.py |1 + src/mesa/Makefile.sources|

[Mesa-dev] [PATCH 2/3] gallium/util: put image dumping functions into separate file

2016-02-05 Thread Brian Paul
To try to reduce the clutter in u_debug.[ch] --- src/gallium/auxiliary/util/u_debug_image.c | 348 + src/gallium/auxiliary/util/u_debug_image.h | 74 ++ 2 files changed, 422 insertions(+) create mode 100644 src/gallium/auxiliary/util/u_debug_image.c create mode 1

[Mesa-dev] [Bug 94016] make check MesaExtensionsTest.AlphabeticallySorted regression

2016-02-05 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=94016 Bug ID: 94016 Summary: make check MesaExtensionsTest.AlphabeticallySorted regression Product: Mesa Version: git Hardware: x86-64 (AMD64) OS: All

Re: [Mesa-dev] [PATCH v2 i-g-t] igt/list-workarounds: Extend the script to Mesa

2016-02-05 Thread Dylan Baker
Quoting Damien Lespiau (2016-02-05 15:46:51) > On Fri, Feb 05, 2016 at 01:55:19PM -0800, Sameer Kibey wrote: > > Updated the list-workarounds script so that it > > can parse Mesa directory if provided. Moved the > > common code to a separate function to allow > > reuse for both kernel and mesa. > >

Re: [Mesa-dev] [PATCH v2 i-g-t] igt/list-workarounds: Extend the script to Mesa

2016-02-05 Thread Damien Lespiau
On Fri, Feb 05, 2016 at 01:55:19PM -0800, Sameer Kibey wrote: > Updated the list-workarounds script so that it > can parse Mesa directory if provided. Moved the > common code to a separate function to allow > reuse for both kernel and mesa. > > The new command line is: > Usage: list-workarounds [o

Re: [Mesa-dev] [PATCH 01/11] mesa: Refactor _mesa_framebuffer_renderbuffer

2016-02-05 Thread Anuj Phogat
On Fri, Feb 5, 2016 at 3:04 PM, Anuj Phogat wrote: > On Fri, Feb 5, 2016 at 1:04 PM, Ian Romanick wrote: >> From: Ian Romanick >> >> This function previously was only used in fbobject.c and contained a >> bunch of API validation. Split the function into >> framebuffer_renderbuffer that is stati

Re: [Mesa-dev] [PATCH 1/4] st/mesa: handle indirect samplers in arrays/structs properly (v3)

2016-02-05 Thread Timothy Arceri
On Fri, 2016-02-05 at 13:40 +1000, Dave Airlie wrote: > From: Dave Airlie > > The state tracker never handled this properly, and it finally > annoyed me for the second time so I decided to fix it properly. > > This is inspired by the NIR sampler lowering code and I only realised > NIR seems to d

Re: [Mesa-dev] [PATCH 0/7] Fixes for SW:KotOR (v2)

2016-02-05 Thread Matt Turner
Thanks a ton for contributing this. This is really cool. I've replied to a couple of patches with a lot of style comments. These issues appear in a lot of places I didn't point out (it was getting a bit repetitive). A summary is - Use spaces around operators - Use BSD-style function declaration

Re: [Mesa-dev] [PATCH 2/7] st/mesa: implement GL_ATI_fragment_shader

2016-02-05 Thread Matt Turner
On Fri, Feb 5, 2016 at 1:11 PM, Miklós Máté wrote: > v2: fix arithmetic for special opcodes > (based on comments from Marek and Ilia), > fix fog state, cleanup > --- > src/mesa/Makefile.sources | 1 + > src/mesa/program/program.h| 2 + > src/mesa/state_tracke

Re: [Mesa-dev] [PATCH 01/11] mesa: Refactor _mesa_framebuffer_renderbuffer

2016-02-05 Thread Anuj Phogat
On Fri, Feb 5, 2016 at 1:04 PM, Ian Romanick wrote: > From: Ian Romanick > > This function previously was only used in fbobject.c and contained a > bunch of API validation. Split the function into > framebuffer_renderbuffer that is static and contains the validation, and > _mesa_framebuffer_rend

[Mesa-dev] [PATCH 1/1] r600, compute: Do not overwrite pipe_resource.screen

2016-02-05 Thread Jan Vesely
found by inspection. Signed-off-by: Jan Vesely --- src/gallium/drivers/r600/evergreen_compute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c index bc27333..3b4f139 100644 --- a/src

[Mesa-dev] [PATCH] radeonsi: don't emit unnecessary NULL exports for unbound targets (v2)

2016-02-05 Thread Marek Olšák
From: Marek Olšák v2: remove semantic index == 0 checks add the else statement to remove shadowing of args --- src/gallium/drivers/radeonsi/si_shader.c | 88 ++-- 1 file changed, 62 insertions(+), 26 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shade

Re: [Mesa-dev] [PATCH 1/7] mesa: optionally associate a gl_program to ati_fragment_shader

2016-02-05 Thread Matt Turner
On Fri, Feb 5, 2016 at 1:11 PM, Miklós Máté wrote: > the state tracker will use it > --- > src/mesa/drivers/common/driverfuncs.c | 3 +++ > src/mesa/main/atifragshader.c | 13 - > src/mesa/main/dd.h| 7 ++- > src/mesa/main/mtypes.h| 1

Re: [Mesa-dev] [PATCH] meta: Fix the pbo usage in meta for GLES{1, 2} contexts

2016-02-05 Thread Anuj Phogat
On Fri, Feb 5, 2016 at 11:30 AM, Ian Romanick wrote: > > On 12/24/2015 01:04 PM, Anuj Phogat wrote: > > OpenGL ES 1.0 doesn't support using GL_STREAM_DRAW and both > > ES 1.0 and 2.0 don't support GL_STREAM_READ in glBufferData(). > > So, handle it correctly by calling the _mesa_meta_begin() > > b

[Mesa-dev] [PATCH v2] workarounds: Update workaround names and platforms

2016-02-05 Thread Sameer Kibey
Update the format in which workarounds are documented in the source code. This allows mesa to be parsed by the list-workarounds utility in intel-gpu-tools. Signed-off-by: Sameer Kibey --- changed byt to vlv for consistency. src/mesa/drivers/dri/i965/brw_binding_tables.c | 2 +- src/mesa/drivers/

[Mesa-dev] [PATCH v2 i-g-t] igt/list-workarounds: Extend the script to Mesa

2016-02-05 Thread Sameer Kibey
Updated the list-workarounds script so that it can parse Mesa directory if provided. Moved the common code to a separate function to allow reuse for both kernel and mesa. The new command line is: Usage: list-workarounds [options] path-to-kernel -k path-to-kernel -m path-to-mesa The legacy

Re: [Mesa-dev] MesaGL <-> non-Mesa OpenCL interop interface

2016-02-05 Thread Marek Olšák
On Fri, Feb 5, 2016 at 8:31 PM, Nicolai Hähnle wrote: > Hi, > > > On 04.02.2016 17:25, Marek Olšák wrote: >> >> I would like to start a discussion about an OpenGL-OpenCL interop >> interface where OpenCL is not part of Mesa. >> >> I think the only way to do this is to have Mesa export functions th

Re: [Mesa-dev] [PATCH 7/7] mesa: optimize out the realloc from glCopyTexImagexD()

2016-02-05 Thread Ilia Mirkin
On Fri, Feb 5, 2016 at 4:11 PM, Miklós Máté wrote: > v2: comment about the purpose of the code > --- > src/mesa/main/teximage.c | 32 > 1 file changed, 32 insertions(+) > > diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c > index 50141be..cac05d5 1

Re: [Mesa-dev] [PATCH 2/7] st/mesa: implement GL_ATI_fragment_shader

2016-02-05 Thread Ilia Mirkin
On Fri, Feb 5, 2016 at 4:11 PM, Miklós Máté wrote: > v2: fix arithmetic for special opcodes > (based on comments from Marek and Ilia), > fix fog state, cleanup > --- > src/mesa/Makefile.sources | 1 + > src/mesa/program/program.h| 2 + > src/mesa/state_tracke

Re: [Mesa-dev] [PATCH 00/18] RadeonSI: Restructuring shader codegen part 3

2016-02-05 Thread Nicolai Hähnle
Patches 4-10 and 12-18 are also Reviewed-by: Nicolai Hähnle On 05.02.2016 14:20, Marek Olšák wrote: Hi, This is the last part of restructuring needed for having one shader variant per shader. Summary: - a lot of changes are about PS inputs and interpolation - code movements, cleanups Behav

[Mesa-dev] [PATCH 4/7] mesa: remove check_compatible() in make_current

2016-02-05 Thread Miklós Máté
this was marked for removal since 2007 ctx::Visual is also removed, since this was its only legit user --- .../drivers/dri/radeon/radeon_common_context.c | 2 +- src/mesa/main/blend.c | 4 +- src/mesa/main/blend.h | 4 +- src/mesa/ma

[Mesa-dev] [PATCH 3/7] st/mesa: enable GL_ATI_fragment_shader

2016-02-05 Thread Miklós Máté
--- src/mesa/state_tracker/st_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index f25bd74..a2caa11 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@

Re: [Mesa-dev] [PATCH 11/18] radeonsi: don't emit unnecessary NULL exports for unbound targets

2016-02-05 Thread Nicolai Hähnle
On 05.02.2016 14:20, Marek Olšák wrote: From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 63 +--- 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c i

[Mesa-dev] [PATCH 2/7] st/mesa: implement GL_ATI_fragment_shader

2016-02-05 Thread Miklós Máté
v2: fix arithmetic for special opcodes (based on comments from Marek and Ilia), fix fog state, cleanup --- src/mesa/Makefile.sources | 1 + src/mesa/program/program.h| 2 + src/mesa/state_tracker/st_atifs_to_tgsi.c | 734 ++ src/mes

[Mesa-dev] [PATCH 6/7] glx: remove incorrect refcounting of DRIdrawable

2016-02-05 Thread Miklós Máté
dri drawables must never be released when unbound from a context as long as their corresponding glx objects (window, pixmap, pbuffer) still exist this fixes fd.o bug #93955 and disappearing characters in KotOR when soft shadows are enabled --- src/glx/dri2_glx.c | 4 src/glx/dri3_glx.c

[Mesa-dev] [PATCH 0/7] Fixes for SW:KotOR (v2)

2016-02-05 Thread Miklós Máté
Hi, this series is the second version of my patch set, which aims to improve the looks of Star Wars: Knights of the Old Republic (via Wine). The main feature is the implementation of GL_ATI_fragment_shader for all Gallium divers (though I could only test it with radeonsi, llvmpipe, and softpipe

[Mesa-dev] [PATCH 5/7] st/mesa: fix handling the fallback texture

2016-02-05 Thread Miklós Máté
v2: fix const-ness --- src/mesa/state_tracker/st_atom_sampler.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_atom_sampler.c b/src/mesa/state_tracker/st_atom_sampler.c index 94231cf..7c8fa13 100644 --- a/src/mesa/state_tracker/st_atom_sampler.c

[Mesa-dev] [PATCH 1/7] mesa: optionally associate a gl_program to ati_fragment_shader

2016-02-05 Thread Miklós Máté
the state tracker will use it --- src/mesa/drivers/common/driverfuncs.c | 3 +++ src/mesa/main/atifragshader.c | 13 - src/mesa/main/dd.h| 7 ++- src/mesa/main/mtypes.h| 1 + src/mesa/main/state.c | 14 +- 5

[Mesa-dev] [PATCH 7/7] mesa: optimize out the realloc from glCopyTexImagexD()

2016-02-05 Thread Miklós Máté
v2: comment about the purpose of the code --- src/mesa/main/teximage.c | 32 1 file changed, 32 insertions(+) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 50141be..cac05d5 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage

[Mesa-dev] [PATCH 07/11] i965/meta: Use internal functions for renderbuffer access

2016-02-05 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i965/brw_meta_fast_clear.c | 5 ++--- src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c | 8 src/mesa/drivers/dri/i965/brw_meta_updownsample.c | 6 ++ 3 files changed, 8 insertions(+), 11 deletions(-) diff -

[Mesa-dev] [PATCH 06/11] i965/meta: Return struct gl_renderbuffer* from brw_get_rb_for_slice instead of GL API handle

2016-02-05 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i965/brw_context.h | 7 --- src/mesa/drivers/dri/i965/brw_meta_fast_clear.c | 9 + src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c | 18 ++ src/mesa/drivers/dri/i965/brw_meta_updo

[Mesa-dev] [PATCH 02/11] mesa: Refactor renderbuffer_storage to make _mesa_renderbuffer_storage

2016-02-05 Thread Ian Romanick
From: Ian Romanick Pulls the parts of renderbuffer_storage that aren't just parameter validation out into a function that can be called from other parts of Mesa (e.g., meta). Signed-off-by: Ian Romanick --- src/mesa/main/fbobject.c | 97 +--- src/mes

[Mesa-dev] [PATCH 09/11] meta/decompress: Track renderbuffer using gl_renderbuffer instead of GL API object handle

2016-02-05 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 13 + src/mesa/drivers/common/meta.h | 3 ++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index b42a3cf..217d376 1

[Mesa-dev] [PATCH 04/11] meta: Use _mesa_CreateRenderbuffers instead of _mesa_GenRenderbuffers and _mesa_BindRenderbuffer

2016-02-05 Thread Ian Romanick
From: Ian Romanick This has the advantage that it does not pollute the global binding state. It also enables later patches that will stop calling _mesa_GenRenderbuffers / _mesa_CreateRenderbuffers which pollute the renderbuffer namespace. Signed-off-by: Ian Romanick --- src/mesa/drivers/commo

[Mesa-dev] [PATCH 08/11] i965/meta: Don't pollute the renderbuffer namespace

2016-02-05 Thread Ian Romanick
From: Ian Romanick tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated n

[Mesa-dev] [PATCH 11/11] meta/decompress: Don't pollute the renderbuffer namespace

2016-02-05 Thread Ian Romanick
From: Ian Romanick tl;dr: For many types of GL object, we can *NEVER* use the Gen function. In OpenGL ES (all versions!) and OpenGL compatibility profile, applications don't have to call Gen functions. The GL spec is very clear about how you can mix-and-match generated names and non-generated n

[Mesa-dev] [PATCH 10/11] meta: Use internal functions for renderbuffer access

2016-02-05 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c| 10 -- src/mesa/drivers/common/meta_copy_image.c | 12 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/met

[Mesa-dev] [PATCH 03/11] i965/meta: Use _mesa_CreateRenderbuffers instead of _mesa_GenRenderbuffers and _mesa_BindRenderbuffer

2016-02-05 Thread Ian Romanick
From: Ian Romanick This has the advantage that it does not pollute the global binding state. It also enables later patches that will stop calling _mesa_GenRenderbuffers / _mesa_CreateRenderbuffers which pollute the renderbuffer namespace. Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i

[Mesa-dev] [PATCH 01/11] mesa: Refactor _mesa_framebuffer_renderbuffer

2016-02-05 Thread Ian Romanick
From: Ian Romanick This function previously was only used in fbobject.c and contained a bunch of API validation. Split the function into framebuffer_renderbuffer that is static and contains the validation, and _mesa_framebuffer_renderbuffer that is suitable for calling from elsewhere in Mesa (e.

[Mesa-dev] [PATCH 05/11] meta: Don't save or restore the renderbuffer binding

2016-02-05 Thread Ian Romanick
From: Ian Romanick Nothing left in meta does anything with the RBO binding, so we don't need to save or restore it. The FBO binding is still modified. Signed-off-by: Ian Romanick --- src/mesa/drivers/common/meta.c | 6 -- src/mesa/drivers/common/meta.h | 2 +- 2 files changed, 1 insertion

Re: [Mesa-dev] [PATCH 03/18] radeonsi: move SPI_PS_INPUT_CNTL value computation to a separate function

2016-02-05 Thread Nicolai Hähnle
On 05.02.2016 14:20, Marek Olšák wrote: From: Marek Olšák --- src/gallium/drivers/radeonsi/si_state_shaders.c | 74 + 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_sta

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

2016-02-05 Thread Marek Olšák
On Fri, Feb 5, 2016 at 8:46 PM, Ian Romanick wrote: > On 01/30/2016 06:48 AM, Marek Olšák wrote: >> 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/

Re: [Mesa-dev] [Mesa-stable] [PATCH v3] glx: update to updated version of EXT_create_context_es2_profile

2016-02-05 Thread Ian Romanick
On 02/04/2016 07:54 AM, Ilia Mirkin wrote: > On Thu, Feb 4, 2016 at 10:50 AM, Emil Velikov > wrote: >> Hi Ilia, >> >> On 3 February 2016 at 14:52, Ilia Mirkin wrote: >>> The EXT spec has been updated to: >>> - logically combine the es2_profile and es_profile exts >>> - allow any legal version

Re: [Mesa-dev] [Piglit] [PATCH] Add (un)packHalf tests which don't fail on GCN

2016-02-05 Thread Ian Romanick
On 02/05/2016 08:04 AM, Marek Olšák wrote: > On Fri, Feb 5, 2016 at 4:48 PM, Roland Scheidegger wrote: >> Am 05.02.2016 um 16:08 schrieb Marek Olšák: >>> On Fri, Feb 5, 2016 at 3:56 PM, Roland Scheidegger >>> wrote: Am 05.02.2016 um 15:44 schrieb Marek Olšák: > On Fri, Feb 5, 2016 at 10

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

2016-02-05 Thread Ian Romanick
On 01/30/2016 06:48 AM, Marek Olšák wrote: > 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 ++ I think i915 should get the same treatment, right? Or does it pick it up

Re: [Mesa-dev] [PATCH v2 1/9] gallium: Add PIPE_CAP_FRAMEBUFFER_LAYERS

2016-02-05 Thread Nicolai Hähnle
On 05.02.2016 10:31, Brian Paul wrote: On 02/05/2016 04:44 AM, Edward O'Callaghan wrote: 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 ++ sr

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

2016-02-05 Thread Ian Romanick
On 01/30/2016 06:48 AM, Marek Olšák wrote: > 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 10

Re: [Mesa-dev] MesaGL <-> non-Mesa OpenCL interop interface

2016-02-05 Thread Nicolai Hähnle
Hi, On 04.02.2016 17:25, Marek Olšák wrote: I would like to start a discussion about an OpenGL-OpenCL interop interface where OpenCL is not part of Mesa. I think the only way to do this is to have Mesa export functions that convert Mesa OpenGL objects into DMABUF handles. Such functions can be

Re: [Mesa-dev] [PATCH] meta: Fix the pbo usage in meta for GLES{1, 2} contexts

2016-02-05 Thread Ian Romanick
On 12/24/2015 01:04 PM, Anuj Phogat wrote: > OpenGL ES 1.0 doesn't support using GL_STREAM_DRAW and both > ES 1.0 and 2.0 don't support GL_STREAM_READ in glBufferData(). > So, handle it correctly by calling the _mesa_meta_begin() > before create_texture_for_pbo(). > > Cc: "11.1" > Signed-off-by:

Re: [Mesa-dev] [PATCH 1/1] r600g: Ignore format for PIPE_BUFFER targets

2016-02-05 Thread Marek Olšák
Pushed, thanks. Marek On Fri, Feb 5, 2016 at 6:01 PM, Jan Vesely wrote: > Fixes compute since 7dd31b81fee7fe40bd09cf3fbc324fcc32782479 > gallium/radeon: support PIPE_CAP_SURFACE_REINTERPRET_BLOCKS > > Signed-off-by: Jan Vesely > --- > src/gallium/drivers/radeon/r600_texture.c | 2 +- > 1 file

[Mesa-dev] [PATCH 16/18] radeonsi: split out code for deleting si_shader

2016-02-05 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_state_shaders.c | 65 ++--- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 802225c..8d7ceaa 100644 -

[Mesa-dev] [PATCH 15/18] radeonsi: move code writing tess factors into a separate function

2016-02-05 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 30 +- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 6379ba4..0f10460 100644 --- a/src/gallium/

[Mesa-dev] [PATCH 17/18] radeonsi: compile geometry shaders immediately

2016-02-05 Thread Marek Olšák
From: Marek Olšák they have only 1 variant --- src/gallium/drivers/radeonsi/si_state_shaders.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 8d7ceaa..bc00ec2 100644 --

[Mesa-dev] [PATCH 18/18] gallium/radeon: add a function for adding llvm function attributes

2016-02-05 Thread Marek Olšák
From: Marek Olšák This will be used for setting the new InitialPSInputAddr attribute. --- src/gallium/drivers/radeon/radeon_llvm_emit.c | 13 + src/gallium/drivers/radeon/radeon_llvm_emit.h | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/ra

[Mesa-dev] [PATCH 02/18] radeonsi: generate a color_two_side variant only if the shader reads colors

2016-02-05 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_state_shaders.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index bbef429..8613af2 100644 --- a/src/gallium/drivers/rad

[Mesa-dev] [PATCH 12/18] radeonsi: remove useless code that handles dx10_clamp_mode

2016-02-05 Thread Marek Olšák
From: Marek Olšák "enable-no-nans-fp-math" is a wrong string and there was a disagreement about fixing it. --- src/gallium/drivers/radeonsi/si_shader.c| 7 --- src/gallium/drivers/radeonsi/si_shader.h| 1 - src/gallium/drivers/radeonsi/si_state_shaders.c | 12 ++--

[Mesa-dev] [PATCH 10/18] radeonsi: dump SPI_PS_INPUT values along with shader stats

2016-02-05 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 85203e0..bd45d4a 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/ga

[Mesa-dev] [PATCH 11/18] radeonsi: don't emit unnecessary NULL exports for unbound targets

2016-02-05 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 63 +--- 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index bd45d4a..18e4ab9 100644 --- a/src/galli

[Mesa-dev] [PATCH 14/18] radeonsi: make LLVM IR dumping less messy

2016-02-05 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_compute.c | 3 ++- src/gallium/drivers/radeonsi/si_shader.c | 18 +++--- src/gallium/drivers/radeonsi/si_shader.h | 3 ++- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_compute

[Mesa-dev] [PATCH 13/18] radeonsi: move a few r600_can_dump_shader calls to where they're needed

2016-02-05 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index b28e1d7..c19e4a9 100644 --- a/src/gallium/drivers/radeonsi/si_s

[Mesa-dev] [PATCH 08/18] radeonsi: don't force gl_SampleMaskIn to 1 for smoothing

2016-02-05 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index d9006bc..68ce387 100644 --- a/src/gallium/drivers/radeonsi/si_

[Mesa-dev] [PATCH 05/18] radeonsi: remove si_shader::ps_input_interpolate

2016-02-05 Thread Marek Olšák
From: Marek Olšák tgsi_shader_info has this too. --- src/gallium/drivers/radeonsi/si_shader.c | 8 +++- src/gallium/drivers/radeonsi/si_shader.h | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_s

[Mesa-dev] [PATCH 07/18] radeonsi: split PS input interpolation code into its own function

2016-02-05 Thread Marek Olšák
From: Marek Olšák This will be used by the fragment shader prolog. --- src/gallium/drivers/radeonsi/si_shader.c | 127 +-- 1 file changed, 71 insertions(+), 56 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shade

[Mesa-dev] [PATCH 09/18] radeonsi: read SPI_PS_INPUT_ADDR from LLVM if it returns it

2016-02-05 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_shader.c| 5 - src/gallium/drivers/radeonsi/si_shader.h| 1 + src/gallium/drivers/radeonsi/si_state_shaders.c | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c

[Mesa-dev] [PATCH 04/18] radeonsi: move BCOLOR PS input locations after all other inputs

2016-02-05 Thread Marek Olšák
From: Marek Olšák BCOLOR inputs were immediately after COLOR inputs. Thus, all following inputs were offset by 1 if color_two_side was enabled, and not offset if it was not enabled, which is a variation that's problematic if we want to have 1 variant per shader and the variant doesn't care about

[Mesa-dev] [PATCH 03/18] radeonsi: move SPI_PS_INPUT_CNTL value computation to a separate function

2016-02-05 Thread Marek Olšák
From: Marek Olšák --- src/gallium/drivers/radeonsi/si_state_shaders.c | 74 + 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_state_shaders.c b/src/gallium/drivers/radeonsi/si_state_shaders.c index 8613af2..fbe0e37 100644 -

[Mesa-dev] [PATCH 06/18] radeonsi: implement forcing per-sample_interpolation using the shader key only

2016-02-05 Thread Marek Olšák
From: Marek Olšák It was partly a state and partly emulated by shader code, but since we want to do this in a fragment shader prolog, we need to put it into the shader key, which will be used to generate the prolog. This also removes the spi_ps_input states and moves the registers to the PS stat

[Mesa-dev] [PATCH 01/18] radeonsi: move si_shader_context initialization into a separate function

2016-02-05 Thread Marek Olšák
From: Marek Olšák This will be re-used later. --- src/gallium/drivers/radeonsi/si_shader.c | 103 ++- 1 file changed, 60 insertions(+), 43 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index d9ed6b2..d7

[Mesa-dev] [PATCH 00/18] RadeonSI: Restructuring shader codegen part 3

2016-02-05 Thread Marek Olšák
Hi, This is the last part of restructuring needed for having one shader variant per shader. Summary: - a lot of changes are about PS inputs and interpolation - code movements, cleanups Behavior changes: - removed unnecessary MRT_NULL exports - geometry shaders aren't compiled on demand Please

Re: [Mesa-dev] [PATCH] list-workarounds: Extend the script to Mesa

2016-02-05 Thread Kibey, Sameer
> -Original Message- > From: Lespiau, Damien > Sent: Friday, February 05, 2016 4:16 AM > To: Kibey, Sameer > Cc: intel-...@lists.freedesktop.org; mesa-dev@lists.freedesktop.org; Sharp, > Sarah A; Widawsky, Benjamin > Subject: Re: [PATCH] list-workarounds: Extend the script to Mesa > > On

  1   2   >