Re: [Mesa-dev] [PATCH v2] main: Fix block index when mixing UBO and SSBO blocks

2015-09-30 Thread Tapani Pälli
Reviewed-by: Tapani Pälli On 10/01/2015 09:39 AM, Iago Toral Quiroga wrote: Since we store both in UniformBlocks, we can't just compute the index by subtracting the array address start, we need to count the number of buffers of the approriate type. v2: - Just fall back to calc_resource_inde

Re: [Mesa-dev] [PATCH 1/3] mesa: consolidate texture binding code

2015-09-30 Thread Tapani Pälli
Nice cleanup, some style nitpicks (for old code) to consider below. all 3 patches are Reviewed-by: Tapani Pälli On 10/01/2015 12:36 AM, Brian Paul wrote: Before, we were doing the actual _mesa_reference_texobj() call and ctx->Driver.BindTexture() and misc housekeeping in three different places

[Mesa-dev] [PATCH v2] main: Fix block index when mixing UBO and SSBO blocks

2015-09-30 Thread Iago Toral Quiroga
Since we store both in UniformBlocks, we can't just compute the index by subtracting the array address start, we need to count the number of buffers of the approriate type. v2: - Just fall back to calc_resource_index (Tapani) --- src/mesa/main/shader_query.cpp | 5 ++--- 1 file changed, 2 inser

Re: [Mesa-dev] SSBO's in UniformBlocks list?

2015-09-30 Thread Iago Toral
On Thu, 2015-10-01 at 02:30 -0400, Ilia Mirkin wrote: > On Thu, Oct 1, 2015 at 2:24 AM, Iago Toral wrote: > > On Thu, 2015-10-01 at 02:18 -0400, Ilia Mirkin wrote: > >> On Thu, Oct 1, 2015 at 2:12 AM, Iago Toral wrote: > >> > However, I think this can be a problem in your case, because you can't

Re: [Mesa-dev] SSBO's in UniformBlocks list?

2015-09-30 Thread Ilia Mirkin
On Thu, Oct 1, 2015 at 2:24 AM, Iago Toral wrote: > On Thu, 2015-10-01 at 02:18 -0400, Ilia Mirkin wrote: >> On Thu, Oct 1, 2015 at 2:12 AM, Iago Toral wrote: >> > However, I think this can be a problem in your case, because you can't >> > remap the block index if you don't know how many blocks i

Re: [Mesa-dev] SSBO's in UniformBlocks list?

2015-09-30 Thread Iago Toral
On Thu, 2015-10-01 at 02:18 -0400, Ilia Mirkin wrote: > On Thu, Oct 1, 2015 at 2:12 AM, Iago Toral wrote: > > However, I think this can be a problem in your case, because you can't > > remap the block index if you don't know how many blocks in UniformBlocks > > before the one you are processing ar

Re: [Mesa-dev] SSBO's in UniformBlocks list?

2015-09-30 Thread Ilia Mirkin
On Thu, Oct 1, 2015 at 2:12 AM, Iago Toral wrote: > However, I think this can be a problem in your case, because you can't > remap the block index if you don't know how many blocks in UniformBlocks > before the one you are processing are of a different type (i.e. UBOs if > this is an SSBO or the o

Re: [Mesa-dev] [PATCH] main: Fix block index when mixing UBO and SSBO blocks

2015-09-30 Thread Iago Toral
On Thu, 2015-10-01 at 09:13 +0300, Tapani Pälli wrote: > > On 09/29/2015 05:38 PM, Iago Toral Quiroga wrote: > > Since we store both in UniformBlocks, we can't just compute the index by > > subtracting the array address start, we need to count the number of > > buffers of the approriate type. > >

Re: [Mesa-dev] [PATCH] main: Fix block index when mixing UBO and SSBO blocks

2015-09-30 Thread Tapani Pälli
On 09/29/2015 05:38 PM, Iago Toral Quiroga wrote: Since we store both in UniformBlocks, we can't just compute the index by subtracting the array address start, we need to count the number of buffers of the approriate type. --- Or we can just fall back to calc_resource_index... that would also

Re: [Mesa-dev] SSBO's in UniformBlocks list?

2015-09-30 Thread Iago Toral
On Wed, 2015-09-30 at 11:27 -0400, Ilia Mirkin wrote: > On Wed, Sep 30, 2015 at 3:18 AM, Iago Toral wrote: > > On Wed, 2015-09-30 at 02:34 -0400, Ilia Mirkin wrote: > >> On Wed, Sep 30, 2015 at 2:26 AM, Iago Toral wrote: > >> > On Tue, 2015-09-29 at 11:19 -0400, Ilia Mirkin wrote: > >> >> On Tue,

[Mesa-dev] [PATCH] mesa: add GL_UNSIGNED_INT_24_8 to _mesa_pack_depth_span

2015-09-30 Thread Tapani Pälli
Patch adds missing type (used with NV_read_depth) so that it gets handled correctly. Also add type to _mesa_problem output to aid debugging. Signed-off-by: Tapani Pälli --- src/mesa/main/pack.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/pack.c b/src/mesa

[Mesa-dev] [Bug 92183] linker.cpp:3187:46: error: ‘strtok_r’ was not declared in this scope

2015-09-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92183 Tapani Pälli changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [Mesa-dev] [PATCH] radeonsi: don't set DATA_FORMAT if ADD_TID_ENABLE is set on VI (v2)

2015-09-30 Thread Michel Dänzer
On 01.10.2015 04:11, Marek Olšák wrote: > From: Marek Olšák > > This can cause incorrect address calculations and hangs. > > v2: do it properly > > Cc: mesa-sta...@lists.freedesktop.org > Tested-and-Reviewed-by: Christian König > --- > src/gallium/drivers/radeonsi/si_descriptors.c | 9 +++

Re: [Mesa-dev] [PATCH v2 1/7] nir: split out instruction comparison functions

2015-09-30 Thread Connor Abbott
(CC'ing the list) On Wed, Sep 30, 2015 at 4:37 PM, Michael Schellenberger wrote: > Hi, > > Am 30.09.2015 um 17:11 schrieb Connor Abbott: >> Right now nir_instrs_equal() is tied pretty tightly to CSE, but we're >> going to introduce the idea of an instruction set and tie it to that >> instead. In

Re: [Mesa-dev] [PATCH 2/2] dri/common: drop loading /etc/drirc

2015-09-30 Thread Michel Dänzer
On 01.10.2015 04:35, Marek Olšák wrote: > On Mon, Sep 28, 2015 at 5:56 AM, Michel Dänzer wrote: >> On 03.09.2015 07:26, Marek Olšák wrote: >>> On Wed, Sep 2, 2015 at 10:56 PM, Kenneth Graunke >>> wrote: On Wednesday, September 02, 2015 02:26:56 AM Marek Olšák wrote: > From: Marek Olšák

Re: [Mesa-dev] [PATCH 2/2] st/mesa: try PIPE_BIND_RENDER_TARGET when choosing float texture formats

2015-09-30 Thread Roland Scheidegger
Am 01.10.2015 um 02:08 schrieb Erik Faye-Lund: > On Tue, Sep 29, 2015 at 7:50 PM, Brian Paul wrote: >> >> I was actually thinking of expanding this change to cover _all_ color >> formats but wanted to take a small step first. What do you think? >> > > I have some patches in this area sitting ar

Re: [Mesa-dev] [PATCH 2/2] st/mesa: try PIPE_BIND_RENDER_TARGET when choosing float texture formats

2015-09-30 Thread Marek Olšák
On Tue, Sep 29, 2015 at 7:50 PM, Brian Paul wrote: > I was actually thinking of expanding this change to cover _all_ color > formats but wanted to take a small step first. What do you think? Everything that is R, RG, RGB, RGBA should be renderable. Also, SNORM formats are not required to be rend

Re: [Mesa-dev] [PATCH 01/11] glsl/types: Make subroutine types have a single matrix column

2015-09-30 Thread Dave Airlie
On 1 October 2015 at 11:41, Jason Ekstrand wrote: > That way, if we do the usual thing of multiplying vector_elements by > matrix_columns we get the actual number of components in the type as per > component_slots(). > > While we're at it, we also switch to using the actual C++ field > initializer

Re: [Mesa-dev] [PATCH 00/23] Remove useless driver hooks from dd.h

2015-09-30 Thread Ian Romanick
Patches 3 through 13, 22, and 23 are Reviewed-by: Ian Romanick VBO scares me a bit, so I'll defer to Brian there. :) On 09/27/2015 03:20 PM, Marek Olšák wrote: > Hi, > > This series removes all driver hooks from dd.h that can be removed easily. > Such hooks are typically only set to one funct

[Mesa-dev] [PATCH 06/11] i965/shader: Pull setup_image_uniform_values out of backend_shader

2015-09-30 Thread Jason Ekstrand
I tried to do this once before but Curro pointed out that having it in backend_shader meant it could use the setup_vec4_uniform_values helper which did different things in vec4 and fs. Now the setup_uniform_values function differs only by an assert in the two backends so there's no real good reaso

[Mesa-dev] [PATCH 09/11] i965/nir: Pull common ARB program uniform handling into a common function

2015-09-30 Thread Jason Ekstrand
The way we deal with ARB program uniforms is basically the same in both the vec4 and the fs backend. This commit takes the best parts of both implementations and pulls the common code into a shared helper function. --- src/mesa/drivers/dri/i965/Makefile.sources | 1 + src/mesa/drivers/dri/i9

[Mesa-dev] [PATCH 11/11] i965/nir: Simplify uniform setup

2015-09-30 Thread Jason Ekstrand
--- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 19 --- src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 21 - 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp inde

[Mesa-dev] [PATCH 01/11] glsl/types: Make subroutine types have a single matrix column

2015-09-30 Thread Jason Ekstrand
That way, if we do the usual thing of multiplying vector_elements by matrix_columns we get the actual number of components in the type as per component_slots(). While we're at it, we also switch to using the actual C++ field initializers for vector_elements and matrix_columns. --- src/glsl/glsl_t

[Mesa-dev] [PATCH 08/11] i965/vec4: Use the uniform count from nir_assign_var_locations

2015-09-30 Thread Jason Ekstrand
Previously, we were counting up uniforms as we set them up. However, this count should be exactly identical to shader->num_uniforms provided by nir_assign_var_locations. (If it's not, we're in trouble anyway because that means that locations don't match up.) This matches what the fs backend is a

[Mesa-dev] [PATCH 04/11] i965/vec4: Use the actual channels used in pack_uniform_registers

2015-09-30 Thread Jason Ekstrand
Previously, pack_uniform_registers worked based on the size of the uniform as given to us when we initially set up the uniforms. However, we have to walk through the uniforms and figure out liveness anyway, so we migh as well record the number of channels used as we go. This may also allow us to

[Mesa-dev] [PATCH 05/11] i965/vec4: Get rid of the uniform_vector_size array

2015-09-30 Thread Jason Ekstrand
The uniform_vector_size array was only ever used by pack_uniform_registers which no longer needs it. --- src/mesa/drivers/dri/i965/brw_vec4.cpp| 1 - src/mesa/drivers/dri/i965/brw_vec4.h | 3 +-- src/mesa/drivers/dri/i965/brw_vec4_nir.cpp| 15 --- src

[Mesa-dev] [PATCH 00/11] i965: The grand uniform unification

2015-09-30 Thread Jason Ekstrand
It has been bothering me for quite some time that the uniform setup in the vec4 and fs backends is almost line-for-line identical but duplicated. It's also been bothering me that it's in vec4/fs_visitor even though it has very little to do with the backend compiler and has everything to do with the

[Mesa-dev] [PATCH 10/11] i965/nir: Pull GLSL uniform handling into a common function

2015-09-30 Thread Jason Ekstrand
The way we deal with GLSL uniforms and builtins is basically the same in both the vec4 and the fs backend. This commit takes the best parts of both implementations and pulls the common code into a shared helper function. --- src/mesa/drivers/dri/i965/brw_fs.h | 2 - src/mesa/drivers

[Mesa-dev] [PATCH 02/11] i965/vs: Move lazy NIR creation to codegen_vs_prog

2015-09-30 Thread Jason Ekstrand
The next commit will add code to codegen_vs_prog that requires the NIR shader to be there in all cases. It doesn't hurt anything to just move it from brw_vs_emit to its only caller. --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 12 src/mesa/drivers/dri/i965/brw_vs.c | 13 +

[Mesa-dev] [PATCH 07/11] i965/shader: Get rid of the setup_vec4_uniform_value helper

2015-09-30 Thread Jason Ekstrand
It's not used by anything anymore --- src/mesa/drivers/dri/i965/brw_fs.cpp | 14 -- src/mesa/drivers/dri/i965/brw_fs.h | 4 src/mesa/drivers/dri/i965/brw_shader.h | 4 src/mesa/drivers/dri/i965/brw_vec4.h | 3 --- src/mesa/drivers/dr

[Mesa-dev] [PATCH 03/11] i965: Pull stage_prog_data.nr_params out of the NIR shader

2015-09-30 Thread Jason Ekstrand
Previously, we had a bunch of code in each stage to figure out how many slots we needed in stage_prog_data.param. This code was mostly identical across the stages and had been copied and pasted around. Unfortunately, this meant that any time you did something special, you had to add code for it t

Re: [Mesa-dev] List of unsupported extensions per driver

2015-09-30 Thread Ian Romanick
On 09/29/2015 07:48 AM, Romain Failliot wrote: > What I don't understand is that all the lines starting with a "-" seems > to be part of the GL_ARB_gpu_shader5 extension. See the line here: > http://cgit.freedesktop.org/mesa/mesa/tree/docs/GL3.txt#n99 The two lines that just have () are only suppo

Re: [Mesa-dev] [PATCH 07.1/18] i965: Use C99 initializers for primitive arrays

2015-09-30 Thread Matt Turner
For 7, 7.1, 7.2: Reviewed-by: Matt Turner ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/2] dri/common: drop loading /etc/drirc

2015-09-30 Thread Marcin Ślusarz
On Thu, Oct 01, 2015 at 01:46:10AM +0200, Marek Olšák wrote: > On Thu, Oct 1, 2015 at 1:21 AM, Marcin Ślusarz > wrote: > > On Thu, Oct 01, 2015 at 12:57:40AM +0200, Marek Olšák wrote: > >> On Thu, Oct 1, 2015 at 12:53 AM, Marcin Ślusarz > >> wrote: > >> > On Wed, Sep 30, 2015 at 09:35:45PM +0200

Re: [Mesa-dev] [PATCH 09/23] i965/vs: Map scalar VS input locations properly; avoid tons of MOVs.

2015-09-30 Thread Kenneth Graunke
On Wednesday, September 30, 2015 12:58:13 AM Kenneth Graunke wrote: [snip] > diff --git a/src/mesa/drivers/dri/i965/brw_nir.c > b/src/mesa/drivers/dri/i965/brw_nir.c > index 64763e0..56bd3d3 100644 > --- a/src/mesa/drivers/dri/i965/brw_nir.c > +++ b/src/mesa/drivers/dri/i965/brw_nir.c > @@ -33,15

Re: [Mesa-dev] [PATCH 2/2] st/mesa: try PIPE_BIND_RENDER_TARGET when choosing float texture formats

2015-09-30 Thread Erik Faye-Lund
On Tue, Sep 29, 2015 at 7:50 PM, Brian Paul wrote: > > I was actually thinking of expanding this change to cover _all_ color formats > but wanted to take a small step first. What do you think? > I have some patches in this area sitting around here: https://github.com/kusma/mesa/commits/color_r

Re: [Mesa-dev] [PATCH 07.2/18] radeon: Use C99 initializers for primitive arrays

2015-09-30 Thread Marek Olšák
Reviewed-by: Marek Olšák Marek On Thu, Oct 1, 2015 at 12:36 AM, Ian Romanick wrote: > From: Ian Romanick > > Using C99 initializers for the primitive arrays makes things more > readable. > > Signed-off-by: Ian Romanick > Suggested-by: Matt Turner > --- > src/mesa/drivers/dri/radeon/radeon_s

Re: [Mesa-dev] [PATCH 2/2] dri/common: drop loading /etc/drirc

2015-09-30 Thread Marek Olšák
On Thu, Oct 1, 2015 at 1:21 AM, Marcin Ślusarz wrote: > On Thu, Oct 01, 2015 at 12:57:40AM +0200, Marek Olšák wrote: >> On Thu, Oct 1, 2015 at 12:53 AM, Marcin Ślusarz >> wrote: >> > On Wed, Sep 30, 2015 at 09:35:45PM +0200, Marek Olšák wrote: >> >> On Mon, Sep 28, 2015 at 5:56 AM, Michel Dänzer

Re: [Mesa-dev] [RFC] pipe-loader: abstract GALLIUM_STATIC_TARGETS behind pipe_loader API

2015-09-30 Thread Marek Olšák
On Wed, Sep 30, 2015 at 10:43 PM, Rob Clark wrote: > From: Rob Clark > > Not actually working yet, ie. doesn't even compile yet, but an idea. > > Initial motivation was for drm_gralloc/pipe, which is essentially a sort > of mini state-tracker, that needs to be able to share pipe_screen with > lib

Re: [Mesa-dev] [PATCH 2/2] dri/common: drop loading /etc/drirc

2015-09-30 Thread Marcin Ślusarz
On Thu, Oct 01, 2015 at 12:57:40AM +0200, Marek Olšák wrote: > On Thu, Oct 1, 2015 at 12:53 AM, Marcin Ślusarz > wrote: > > On Wed, Sep 30, 2015 at 09:35:45PM +0200, Marek Olšák wrote: > >> On Mon, Sep 28, 2015 at 5:56 AM, Michel Dänzer wrote: > >> > On 03.09.2015 07:26, Marek Olšák wrote: > >> >

Re: [Mesa-dev] [PATCH 3/3] radeon/llvm: Initialize gallivm targets when initializing the AMDGPU target v2

2015-09-30 Thread Marek Olšák
For the series: Reviewed-by: Marek Olšák Marek On Wed, Sep 30, 2015 at 8:59 PM, Tom Stellard wrote: > This fixes a race condition in the glx-multithreaded-shader-compile > test. > > v2: > - Replace gallivm_init_llvm_{begin,end}() with gallivm_init_llvm_targets(). > > CC: "10.6 11.0" > --- >

Re: [Mesa-dev] [PATCH 2/2] dri/common: drop loading /etc/drirc

2015-09-30 Thread Marek Olšák
On Thu, Oct 1, 2015 at 12:53 AM, Marcin Ślusarz wrote: > On Wed, Sep 30, 2015 at 09:35:45PM +0200, Marek Olšák wrote: >> On Mon, Sep 28, 2015 at 5:56 AM, Michel Dänzer wrote: >> > On 03.09.2015 07:26, Marek Olšák wrote: >> >> On Wed, Sep 2, 2015 at 10:56 PM, Kenneth Graunke >> >> wrote: >> >>>

Re: [Mesa-dev] [PATCH 2/2] dri/common: drop loading /etc/drirc

2015-09-30 Thread Marcin Ślusarz
On Wed, Sep 30, 2015 at 09:35:45PM +0200, Marek Olšák wrote: > On Mon, Sep 28, 2015 at 5:56 AM, Michel Dänzer wrote: > > On 03.09.2015 07:26, Marek Olšák wrote: > >> On Wed, Sep 2, 2015 at 10:56 PM, Kenneth Graunke > >> wrote: > >>> On Wednesday, September 02, 2015 02:26:56 AM Marek Olšák wrote:

[Mesa-dev] [PATCH 07.2/18] radeon: Use C99 initializers for primitive arrays

2015-09-30 Thread Ian Romanick
From: Ian Romanick Using C99 initializers for the primitive arrays makes things more readable. Signed-off-by: Ian Romanick Suggested-by: Matt Turner --- src/mesa/drivers/dri/radeon/radeon_swtcl.c | 40 +++--- 1 file changed, 20 insertions(+), 20 deletions(-) diff --gi

[Mesa-dev] [PATCH 07.1/18] i965: Use C99 initializers for primitive arrays

2015-09-30 Thread Ian Romanick
From: Ian Romanick Using C99 initializers for the primitive arrays makes things more readable. Signed-off-by: Ian Romanick Suggested-by: Matt Turner --- src/mesa/drivers/dri/i965/brw_draw.c | 48 ++-- 1 file changed, 24 insertions(+), 24 deletions(-) diff --gi

Re: [Mesa-dev] [PATCH 0/3][RFC] Improve GLSL support of GL_ARB_separate_shader_objects

2015-09-30 Thread gregory hainaut
On Wed, 30 Sep 2015 21:18:43 +0200 gregory hainaut wrote: > On Fri, 25 Sep 2015 16:40:31 -0700 > Ian Romanick wrote: > > > On 09/20/2015 01:15 PM, Gregory Hainaut wrote: > > > Current GLSL badly optimizes the code making it incompatible with the > > > GL_ARB_separate_shader_objects extension. >

[Mesa-dev] [Bug 92122] [bisected] Regression with Assault Android Cactus

2015-09-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92122 --- Comment #9 from Dieter Nützel --- Tapani, please attach your patch [Mesa-dev] [PATCH] mesa: fix GetProgramiv/GetActiveAttrib regression and you have my Tested-by: Dieter Nützel -- You are receiving this mail because: You are the QA Contac

[Mesa-dev] [Bug 92122] [bisected] Regression with Assault Android Cactus

2015-09-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92122 --- Comment #8 from Dieter Nützel --- Please commit soon! ;-) -- You are receiving this mail because: You are the QA Contact for the bug. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http:

[Mesa-dev] [Bug 92173] [regression, bisected] commit 266d05a broke WebGL-Water Caustics on NI/Turks (6670)

2015-09-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92173 Dieter Nützel changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Mesa-dev] [Bug 92122] [bisected] Regression with Assault Android Cactus

2015-09-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92122 Dieter Nützel changed: What|Removed |Added CC||die...@nuetzel-hh.de --- Comment #7 from

[Mesa-dev] [PATCH 2/3] mesa: remove _mesa_get_tex_unit_err() and fix error handling

2015-09-30 Thread Brian Paul
This helper was only called from _mesa_BindTextureUnit(). It's simpler to just inline it. The error check / code / message in the helper was incorrect. It was written for glBindTextures(), not glBindTextureUnit(). The correct error for a bad texture unit number is GL_INVALID_VALUE. The error m

[Mesa-dev] [PATCH 3/3] mesa: fix incorrect error in _mesa_BindTextureUnit()

2015-09-30 Thread Brian Paul
If the texture object exists, but the Name field is zero, it means the object was created but never bound to a target. Trying to bind it in _mesa_BindTextureUnit() should generate GL_INVALID_OPERATION. Fixes piglit's arb_direct_state_access-bind-texture-unit test. --- src/mesa/main/texobj.c | 3

[Mesa-dev] [PATCH 4/7] mesa: clean up #includes in uniforms.h

2015-09-30 Thread Brian Paul
--- src/mesa/main/uniforms.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/uniforms.h b/src/mesa/main/uniforms.h index 96172b7..bec035c 100644 --- a/src/mesa/main/uniforms.h +++ b/src/mesa/main/uniforms.h @@ -26,10 +26,10 @@ #ifndef UNIFORMS_H #define UN

[Mesa-dev] [PATCH 1/3] mesa: consolidate texture binding code

2015-09-30 Thread Brian Paul
Before, we were doing the actual _mesa_reference_texobj() call and ctx->Driver.BindTexture() and misc housekeeping in three different places. This consolidates the common code in a new bind_texture() function. --- src/mesa/main/texobj.c | 200 +++-- 1 f

[Mesa-dev] [PATCH 5/7] mesa: clean up #includes in ir_to_mesa.cpp

2015-09-30 Thread Brian Paul
--- src/mesa/program/ir_to_mesa.cpp | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 4201a80..35ea791 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.c

[Mesa-dev] [PATCH 7/7] st/mesa: clean up #includes in st_draw.c

2015-09-30 Thread Brian Paul
--- src/mesa/state_tracker/st_draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 2ad679b..f4b273b 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -42,6 +42,

[Mesa-dev] [PATCH 1/7] mesa: clean up #includes in ff_fragment_shader.cpp

2015-09-30 Thread Brian Paul
Get rid of "../glsl/" paths. Sort alphabetically. --- src/mesa/main/ff_fragment_shader.cpp | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index c682892..c0030bc 100644 --- a/

[Mesa-dev] [PATCH 6/7] mesa: clean up #includes in sampler.cpp

2015-09-30 Thread Brian Paul
--- src/mesa/program/sampler.cpp | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/mesa/program/sampler.cpp b/src/mesa/program/sampler.cpp index ea3024d..b1168fd 100644 --- a/src/mesa/program/sampler.cpp +++ b/src/mesa/program/sampler.cpp @@ -23,13 +23,12 @@ * D

[Mesa-dev] [PATCH 3/7] mesa: clean up #includes in uniform_query.cpp

2015-09-30 Thread Brian Paul
--- src/mesa/main/uniform_query.cpp | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 0bee594..33c959d 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -28,1

[Mesa-dev] [PATCH 2/7] mesa: clean up #includes in pipelineobj.c

2015-09-30 Thread Brian Paul
--- src/mesa/main/pipelineobj.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c index c2e1d29..51ee10f 100644 --- a/src/mesa/main/pipelineobj.c +++ b/src/mesa/main/pipelineobj.c @@ -31,6 +31,7 @@ * GL_ARB_separat

Re: [Mesa-dev] [PATCH 07/18] i915: Use c99 initializers for primitive arrays

2015-09-30 Thread Matt Turner
We should do this for i965 too. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 13/18] i915: Drop broken front_buffer_reading/drawing optimization

2015-09-30 Thread Ian Romanick
From: Ville Syrjälä Bring the following commit over to i915: commit ec542d74578bbef6b55125dd6aba1dc7f5079e65 Author: Eric Anholt Date: Mon Mar 3 10:43:10 2014 -0800 i965: Drop broken front_buffer_reading/drawing optimization. Not sure if it might fix anything, but since the i965 and i

[Mesa-dev] [PATCH 15/18] radeon: Drop broken front_buffer_reading/drawing optimization

2015-09-30 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/radeon/radeon_common.c| 37 -- .../drivers/dri/radeon/radeon_common_context.c | 10 +++--- .../drivers/dri/radeon/radeon_common_context.h | 17 -- 3 files changed, 18 insertions(+

[Mesa-dev] [PATCH 05/18] i915: Handle provoking vertex in intelFastRenderClippedPoly()

2015-09-30 Thread Ian Romanick
From: Ville Syrjälä intelFastRenderClippedPoly() renders the polygon using triangles. For polygons the provoking vertex is always the first one, and currently this function assumes that the provoking vertex for triangles is the last one. In case the user changed the provoking vertex convention, t

[Mesa-dev] [PATCH 07/18] i915: Use c99 initializers for primitive arrays

2015-09-30 Thread Ian Romanick
From: Ville Syrjälä Using c99 initializers for the primitive arrays makes things more readable. Signed-off-by: Ville Syrjälä Reviewed-by: Ian Romanick --- src/mesa/drivers/dri/i915/intel_render.c | 60 src/mesa/drivers/dri/i915/intel_tris.c | 40 ++--

[Mesa-dev] [PATCH 10/18] i915: Adjust line size limits

2015-09-30 Thread Ian Romanick
From: Ville Syrjälä The hardware can draw lines 0.5 to 7.5 pixels wide. Adjust the limits to 1.0-7.0. The old limits seems to be from the era when i915 and i965 were sharing this code. Not really sure if 1.0-7.0 is correct. Maybe it could be 0.5.7.5 as those are the hw limits, or maybe some comb

[Mesa-dev] [PATCH 18/18] t_dd_dmatmp: Use 'X &= ~N' instead of 'X -= X & N'

2015-09-30 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick Suggested-by: Brian Paul --- src/mesa/tnl_dd/t_dd_dmatmp.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index 4eff883..3a30142 100644 --- a/src/mesa/tnl_d

[Mesa-dev] [PATCH 06/18] i915: Use _tnl_RenderClippedPolygon and _tnl_RenderClippedLine

2015-09-30 Thread Ian Romanick
From: Ville Syrjälä _tnl_RenderClippedPolygon and _tnl_RenderClippedLine already do most of what we want so use them. Signed-off-by: Ville Syrjälä Reviewed-by: Ian Romanick --- src/mesa/drivers/dri/i915/intel_tris.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) d

[Mesa-dev] [PATCH 16/18] t_dd_dmatmp: Require HAVE_POINTS

2015-09-30 Thread Ian Romanick
From: Ian Romanick Two drivers use this file, and both support points. The i915 driver gained support for points only recently. Signed-off-by: Ian Romanick --- src/mesa/tnl_dd/t_dd_dmatmp.h | 34 +++--- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git

[Mesa-dev] [PATCH 01/18] t_dd_dmatmp: Replace fprintf with unreachable

2015-09-30 Thread Ian Romanick
From: Ian Romanick From http://lists.freedesktop.org/archives/mesa-dev/2015-May/084883.html: "There are no real error cases here, just dead code. validate_render() is supposed to make sure we never call these functions if the code can't actually render the primitives. The fprintf

[Mesa-dev] [PATCH 12/18] mesa/i965: Refactor brw_is_front_buffer_{drawing, reading} to common code

2015-09-30 Thread Ian Romanick
From: Ian Romanick There are multiple similar implementations of these functions, and a later patch was going to add another. Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/i965/brw_context.c | 15 --- src/mesa/drivers/dri/i965/brw_draw.c | 3 ++- src/mesa/drivers/dri

[Mesa-dev] [PATCH 11/18] i830: Fix culling with user fbos on gen2

2015-09-30 Thread Ian Romanick
From: Ville Syrjälä Flip the cull bits when rendering to a user fbo on gen2. This was already done on gen3 (since before git history starts) but was missing from the gen2 code. Fixes rendering of the driver+kart model in supertuxkart kart selection screen. Signed-off-by: Ville Syrjälä Reviewed

[Mesa-dev] [PATCH 02/18] t_dd_dmatmp: Allow flat shaded polygons with tri fans

2015-09-30 Thread Ian Romanick
From: Ville Syrjälä We can allow rendering flat shaded polygons using tri fans if we check the provoking vertex convention. v2 (idr): Remove _EXT suffixes from GL_FIRST_VERTEX_CONVENTION. Signed-off-by: Ville Syrjälä Reviewed-by: Ian Romanick --- src/mesa/tnl_dd/t_dd_dmatmp.h | 6 -- 1 f

[Mesa-dev] [PATCH 04/18] t_dd_dmatmp: Check provoking vertex convention when rendering quads

2015-09-30 Thread Ian Romanick
From: Ville Syrjälä When drawing quads using triangles we need to be careful to make the provoking vertices match when flat shading. v2: Major rebase on top of Ian other t_dd_dmatmp.h work. Signed-off-by: Ville Syrjälä Signed-off-by: Ian Romanick --- src/mesa/tnl_dd/t_dd_dmatmp.h | 46 ++

[Mesa-dev] [PATCH 17/18] t_dd_dmatmp: Use C99 mixed code and declarations

2015-09-30 Thread Ian Romanick
From: Ian Romanick While this file lives in src/mesa/tnl_dd, it is built only in drivers that live in src/mesa/drivers/dri. We don't generally allow C99-isms in common code, but we have allowed C99-isms in src/mesa/drivers/dri for quite some time. Signed-off-by: Ian Romanick --- src/mesa/tnl_

[Mesa-dev] [PATCH 09/18] i915: Enable intel_render path for points

2015-09-30 Thread Ian Romanick
From: Ville Syrjälä The sub-pixel adjustment for points was killed off in commit 60d762aa625095a8c1f9597d8530bb5a6fa61b4c Author: Xiang, Haihao Date: Wed Jan 2 11:38:51 2008 +0800 i915: Needn't adjust pixel centers. fix #12944 so if we don't need it in intel_tris.c we don't need it in

[Mesa-dev] [PATCH 08/18] i915: Use COPY_DWORDS for points

2015-09-30 Thread Ian Romanick
From: Ville Syrjälä The sub-pixel adjustment for points was killed off in commit 60d762aa625095a8c1f9597d8530bb5a6fa61b4c Author: Xiang, Haihao Date: Wed Jan 2 11:38:51 2008 +0800 i915: Needn't adjust pixel centers. fix #12944 so we can just as well use COPY_DWORDS(). Signed-off-by:

[Mesa-dev] [PATCH 14/18] radeon: Use _mesa_is_front_buffer_drawing

2015-09-30 Thread Ian Romanick
From: Ian Romanick Signed-off-by: Ian Romanick --- src/mesa/drivers/dri/radeon/radeon_common.c | 21 - src/mesa/drivers/dri/radeon/radeon_common.h | 1 - src/mesa/drivers/dri/radeon/radeon_screen.h | 1 - src/mesa/drivers/dri/radeon/radeon_span.c | 7 +-- 4 files ch

[Mesa-dev] [PATCH 03/18] t_dd_dmatmp: Disallow flat shading when rendering quad strips via tri strips

2015-09-30 Thread Ian Romanick
From: Ville Syrjälä When rendering quad strips via tri strips we can't get the provoking vertex right, so disallow flat shading. v2: Major rebase on top of Ian's other t_dd_dmatmp.h work. Signed-off-by: Ville Syrjälä Signed-off-by: Ian Romanick --- src/mesa/tnl_dd/t_dd_dmatmp.h | 7 ++-

[Mesa-dev] [PATCH 00/18] More t_dd_dmatmp janitor work and misc other

2015-09-30 Thread Ian Romanick
This is the last of the t_dd_dmatmp janitor work that I plan to do. The first patch is a change suggested by Ville while I was reviewing some of his patches to t_dd_dmatmp earlier this year. I re-found Ville's patches while I was searching my inbox for reviews to my previous t_dd_dmatmp series.

[Mesa-dev] [RFC] pipe-loader: abstract GALLIUM_STATIC_TARGETS behind pipe_loader API

2015-09-30 Thread Rob Clark
From: Rob Clark Not actually working yet, ie. doesn't even compile yet, but an idea. Initial motivation was for drm_gralloc/pipe, which is essentially a sort of mini state-tracker, that needs to be able to share pipe_screen with libGL linked into the same process (to ensure we didn't end up with

Re: [Mesa-dev] [PATCH v2] mesa: use strtok_s for strtok_r on windows

2015-09-30 Thread Brian Paul
On 09/30/2015 11:38 AM, Tapani Pälli wrote: https://msdn.microsoft.com/en-us/library/ftsafwz3.aspx v2: use _WIN32 instead of _MSC_VER (Brian Paul) Signed-off-by: Tapani Pälli Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92183 --- src/mesa/main/imports.h | 3 +++ 1 file changed, 3

[Mesa-dev] [PATCH 2/3] gallivm: Allow drivers and state trackers to initialize gallivm LLVM targets v2

2015-09-30 Thread Tom Stellard
Drivers and state trackers that use LLVM for generating code, must register the targets they use with LLVM's global TargetRegistry. The TargetRegistry is not thread-safe, so all targets must be added to the registry before it can be queried for target information. When drivers and state trackers i

[Mesa-dev] [PATCH 1/3] gallium/radeon: Use call_once() when initailizing LLVM targets

2015-09-30 Thread Tom Stellard
CC: "10.6 11.0" --- src/gallium/drivers/radeon/radeon_llvm_emit.c | 25 - 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/gallium/drivers/radeon/radeon_llvm_emit.c b/src/gallium/drivers/radeon/radeon_llvm_emit.c index 0002559..5d93a4d 100644 --- a/src/

[Mesa-dev] [PATCH 3/3] radeon/llvm: Initialize gallivm targets when initializing the AMDGPU target v2

2015-09-30 Thread Tom Stellard
This fixes a race condition in the glx-multithreaded-shader-compile test. v2: - Replace gallivm_init_llvm_{begin,end}() with gallivm_init_llvm_targets(). CC: "10.6 11.0" --- src/gallium/drivers/radeon/radeon_llvm_emit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers

[Mesa-dev] [RFC] Vendor-neutral dispatch library for OpenGL

2015-09-30 Thread Kyle Brenneman
I'm working on libglvnd, a vendor-neutral dispatch library for OpenGL, and I wanted to see if anyone had any comments or suggestions about it. Right now, I'm trying to get the GLX interface wrapped up, but I'd like to get some feedback from the Mesa community before I'd be confidant in calling

Re: [Mesa-dev] [PATCH 2/2] dri/common: drop loading /etc/drirc

2015-09-30 Thread Marek Olšák
On Mon, Sep 28, 2015 at 5:56 AM, Michel Dänzer wrote: > On 03.09.2015 07:26, Marek Olšák wrote: >> On Wed, Sep 2, 2015 at 10:56 PM, Kenneth Graunke >> wrote: >>> On Wednesday, September 02, 2015 02:26:56 AM Marek Olšák wrote: From: Marek Olšák A user can be using Mesa 11.0, but /

Re: [Mesa-dev] [PATCH 1/2] st/dri: don't use _ctx in client_wait_sync

2015-09-30 Thread Marek Olšák
On Sun, Sep 27, 2015 at 8:02 AM, Albert Freeman wrote: > On 25 September 2015 at 23:49, Marek Olšák wrote: >> From: Marek Olšák >> >> Not needed and it can be NULL. >> >> Cc: 10.6 11.0 >> --- >> src/gallium/state_trackers/dri/dri2.c | 6 -- >> 1 file changed, 4 insertions(+), 2 deletions(-

Re: [Mesa-dev] [PATCH 0/3][RFC] Improve GLSL support of GL_ARB_separate_shader_objects

2015-09-30 Thread gregory hainaut
On Fri, 25 Sep 2015 16:40:31 -0700 Ian Romanick wrote: > On 09/20/2015 01:15 PM, Gregory Hainaut wrote: > > Current GLSL badly optimizes the code making it incompatible with the > > GL_ARB_separate_shader_objects extension. > > > > Typical example of the current behavior: > > > > VS: > > out SH

[Mesa-dev] [PATCH] radeonsi: don't set DATA_FORMAT if ADD_TID_ENABLE is set on VI (v2)

2015-09-30 Thread Marek Olšák
From: Marek Olšák This can cause incorrect address calculations and hangs. v2: do it properly Cc: mesa-sta...@lists.freedesktop.org Tested-and-Reviewed-by: Christian König --- src/gallium/drivers/radeonsi/si_descriptors.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --g

Re: [Mesa-dev] [PATCH 12/23] i965: Introduce new SHADER_OPCODE_URB_WRITE_SIMD8_MASKED/PER_SLOT opcodes.

2015-09-30 Thread Kenneth Graunke
On Wednesday, September 30, 2015 11:23:48 AM Matt Turner wrote: > On Wed, Sep 30, 2015 at 12:58 AM, Kenneth Graunke > wrote: > > diff --git a/src/mesa/drivers/dri/i965/brw_inst.h > > b/src/mesa/drivers/dri/i965/brw_inst.h > > index c5132ba..b551334 100644 > > --- a/src/mesa/drivers/dri/i965/brw_

Re: [Mesa-dev] [PATCH 12/23] i965: Introduce new SHADER_OPCODE_URB_WRITE_SIMD8_MASKED/PER_SLOT opcodes.

2015-09-30 Thread Matt Turner
On Wed, Sep 30, 2015 at 12:58 AM, Kenneth Graunke wrote: > diff --git a/src/mesa/drivers/dri/i965/brw_inst.h > b/src/mesa/drivers/dri/i965/brw_inst.h > index c5132ba..b551334 100644 > --- a/src/mesa/drivers/dri/i965/brw_inst.h > +++ b/src/mesa/drivers/dri/i965/brw_inst.h > @@ -386,6 +386,7 @@ FF(

Re: [Mesa-dev] [PATCH] i965/vec4: copy abs/negate modifiers on src/dst_reg conversion constructors

2015-09-30 Thread Jason Ekstrand
On Wed, Sep 30, 2015 at 11:03 AM, Alejandro Piñeiro wrote: > > > On 30/09/15 19:38, Jason Ekstrand wrote: >> I'm not sure if this makes sense. I can see how it would be useful >> (less information lost when going src_reg -> dst_reg -> src_reg). >> However, it seems wrong to me to assume that dst_

Re: [Mesa-dev] [PATCH 05/23] nir: Introduce new nir_intrinsic_load_per_vertex_input intrinsics.

2015-09-30 Thread Jason Ekstrand
On Wed, Sep 30, 2015 at 12:58 AM, Kenneth Graunke wrote: > Geometry and tessellation shaders process multiple vertices; their > inputs are arrays indexed by the vertex number. While GLSL makes > this look like a normal array, it can be very different behind the > scenes. > > On Intel hardware, al

Re: [Mesa-dev] [PATCH] i965/vec4: copy abs/negate modifiers on src/dst_reg conversion constructors

2015-09-30 Thread Alejandro Piñeiro
On 30/09/15 19:38, Jason Ekstrand wrote: > I'm not sure if this makes sense. I can see how it would be useful > (less information lost when going src_reg -> dst_reg -> src_reg). > However, it seems wrong to me to assume that dst_reg.abs or > dst_reg.negate means anything useful. Hmm, true. FWI

Re: [Mesa-dev] [PATCH 00/23] i965 SIMD8 GS and NIR input refactors

2015-09-30 Thread Matt Turner
On Wed, Sep 30, 2015 at 12:58 AM, Kenneth Graunke wrote: > Hello, > > Here's a respin of my SIMD8 VS input refactors, new GS input refactors, > and finally the long-awaited SIMD8 GS support. > > Patches 1-10 are input refactoring. Patches 11-23 are SIMD8 GS support. 1-4 and 6-11 are Reviewed-by

Re: [Mesa-dev] [PATCH] i965/vec4: copy abs/negate modifiers on src/dst_reg conversion constructors

2015-09-30 Thread Matt Turner
On Wed, Sep 30, 2015 at 10:38 AM, Jason Ekstrand wrote: > I'm not sure if this makes sense. I can see how it would be useful > (less information lost when going src_reg -> dst_reg -> src_reg). > However, it seems wrong to me to assume that dst_reg.abs or > dst_reg.negate means anything useful. M

[Mesa-dev] [Bug 92173] [regression, bisected] commit 266d05a broke WebGL-Water Caustics on NI/Turks (6670)

2015-09-30 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92173 --- Comment #2 from Tapani Pälli --- (In reply to Tapani Pälli from comment #1) > this bug is likely a duplicate for #92122 having said that it seems unlikely that the bug would cause gpu hangs or slow downs but likely just wrong rendering, ther

Re: [Mesa-dev] [PATCH 10/23] i965/vs: Simplify fs_visitor's ATTR file.

2015-09-30 Thread Matt Turner
On Wed, Sep 30, 2015 at 12:58 AM, Kenneth Graunke wrote: > Previously, ATTR was indexed by VERT_ATTRIB_* slots; at the end of > compilation, assign_vs_urb_setup() translated those into GRF units, > and converted ATTR to HW_REGs. > > This patch moves the transslation earlier, making ATTR work in te

Re: [Mesa-dev] [PATCH 09/23] i965/vs: Map scalar VS input locations properly; avoid tons of MOVs.

2015-09-30 Thread Matt Turner
On Wed, Sep 30, 2015 at 12:58 AM, Kenneth Graunke wrote: > Previously, we used nir_lower_io with the scalar type_size function, > which mapped VERT_ATTRIB_* locations to...some numbers. Then, in > fs_visitor::nir_setup_inputs(), we created temporaries indexed by > those numbers, and emitted MOVs

  1   2   >