Re: [Mesa-dev] [PATCH] glsl: free interface_types and replace old hash_table uses

2015-07-14 Thread Timothy Arceri
On Mon, 2015-07-13 at 22:19 -0700, Kenneth Graunke wrote: On Monday, July 13, 2015 11:21:05 AM Iago Toral wrote: On Sat, 2015-07-11 at 10:13 +1000, Timothy Arceri wrote: @@ -648,27 +653,28 @@ glsl_type::get_array_instance(const glsl_type *base, unsigned array_size)

[Mesa-dev] [PATCH v3 (part2) 06/56] i965: handle visiting of ir_var_shader_storage variables

2015-07-14 Thread Iago Toral Quiroga
Reviewed-by: Jordan Justen jordan.l.jus...@intel.com --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index c7722c5..0c8b0bd

[Mesa-dev] [PATCH v3 (part2) 10/56] glsl: Lower unsized array's length calculation expression

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/glsl/lower_ubo_reference.cpp | 179 +++ 1 file changed, 179 insertions(+) diff --git a/src/glsl/lower_ubo_reference.cpp

[Mesa-dev] [PATCH v3 (part2) 00/56] ARB_shader_storage_buffer_object (mesa, i965)

2015-07-14 Thread Iago Toral Quiroga
This is the second part of the v3 series including remaining frontend bits like the optional unsized array at the bottom of SSBO definitions, layout mode std430 and implementation for GL queries/getters. It also includes all of the i965 backend implementation. Notice that this series depends on

[Mesa-dev] [PATCH v3 (part2) 13/56] i965/fs: Implement generator code for unsized array's length calculation

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/drivers/dri/i965/brw_defines.h| 1 + src/mesa/drivers/dri/i965/brw_fs.cpp | 1 + src/mesa/drivers/dri/i965/brw_fs.h | 3 ++

[Mesa-dev] [PATCH v3 (part2) 04/56] i965: set ARB_shader_storage_buffer_object related constant values

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/drivers/dri/i965/brw_context.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c

[Mesa-dev] [PATCH v3 (part2) 30/56] nir: Implement __intrinsic_store_load

2015-07-14 Thread Iago Toral Quiroga
--- src/glsl/nir/glsl_to_nir.cpp| 67 - src/glsl/nir/nir_intrinsics.h | 2 +- src/glsl/nir/nir_lower_phis_to_scalar.c | 2 + 3 files changed, 69 insertions(+), 2 deletions(-) diff --git a/src/glsl/nir/glsl_to_nir.cpp

[Mesa-dev] [PATCH v3 (part2) 21/56] glsl: a shader storage buffer must be smaller than the maximum size allowed

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Otherwise, generate a link time error as per the ARB_shader_storage_buffer_object spec. Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/glsl/glsl_types.cpp | 9 +++-- src/glsl/link_uniform_blocks.cpp | 17

[Mesa-dev] [PATCH v3 (part2) 50/56] main/tests: add ARB_shader_storage_buffer_object tokens to enum_strings

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/main/tests/enum_strings.cpp | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/mesa/main/tests/enum_strings.cpp

[Mesa-dev] [PATCH v3 (part2) 20/56] glsl: add std430 interface packing support to ssbo store and unsized array length

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/glsl/lower_ubo_reference.cpp | 65 ++-- 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/src/glsl/lower_ubo_reference.cpp

[Mesa-dev] [PATCH v3 (part2) 29/56] i965/vec4: Implement SSBO reads

2015-07-14 Thread Iago Toral Quiroga
--- src/mesa/drivers/dri/i965/brw_vec4.h | 1 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 76 ++ 2 files changed, 77 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index 870946b..d5f5ef9 100644 ---

[Mesa-dev] [PATCH v3 (part2) 26/56] i965/vec4: Implement SSBO writes

2015-07-14 Thread Iago Toral Quiroga
--- src/mesa/drivers/dri/i965/brw_vec4.h | 2 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 157 + 2 files changed, 159 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index 5f25a2c..870946b 100644

[Mesa-dev] [PATCH v3 (part2) 43/56] glsl: fix UNIFORM_BUFFER_START or UNIFORM_BUFFER_SIZE query when no buffer object is bound

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com According to ARB_uniform_buffer_object spec: If the parameter (starting offset or size) was not specified when the buffer object was bound (e.g. if bound with BindBufferBase), or if no buffer object is bound to index, zero is returned.

[Mesa-dev] [PATCH v3 (part2) 39/56] i965/vec4: Implement lowered SSBO atomic intrinsics

2015-07-14 Thread Iago Toral Quiroga
The original GLSL IR intrinsics have been lowered to an internal version that accepts a block index and an offset instead of a SSBO reference. --- src/mesa/drivers/dri/i965/brw_vec4.h | 1 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 103 + 2 files

[Mesa-dev] [PATCH v3 (part2) 22/56] glsl: number of active shader storage blocks must be within allowed limits

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Notice that we should differentiate betweeb shader storage blocks and uniform blocks, since they have different limits. Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/glsl/linker.cpp | 43

[Mesa-dev] [PATCH v3 (part2) 08/56] glsl: add support for unsized arrays in shader storage blocks

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com They only can be defined in the last position of the shader storage blocks. When an unsized array is used in different shaders, it might be converted in different sized arrays, avoid get a linker error in that case. v2: - Rework error

[Mesa-dev] [PATCH v3 (part2) 15/56] i965/wm: emit null buffer surfaces when null buffers are attached

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Otherwise we can expect odd things to happen if, for example, we ask for the size of the attached buffer from shader code, since that might query this value from the surface we uploaded and get random results. Signed-off-by: Samuel Iglesias

[Mesa-dev] [PATCH v3 (part2) 33/56] glsl: atomic counters can be declared as buffer-qualified variables

2015-07-14 Thread Iago Toral Quiroga
From: Kristian Høgsberg k...@bitplanet.net --- src/glsl/ast_to_hir.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index a814b8a..f0c2e5b 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -2764,7

[Mesa-dev] [PATCH v3 (part2) 42/56] mesa: Add queries for GL_SHADER_STORAGE_BUFFER

2015-07-14 Thread Iago Toral Quiroga
These handle querying the buffer name attached to a giving binding point as well as the start offset and size of that buffer. --- src/mesa/main/get.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index

[Mesa-dev] [PATCH v3 (part2) 18/56] glsl: propagate interface packing information to arrays of scalars, vectors.

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Now std140 is not the only interface packing qualifier that can be used. Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/glsl/ast.h | 10 + src/glsl/ast_to_hir.cpp | 54

[Mesa-dev] [PATCH v3 (part2) 17/56] glsl: Add parser/compiler support for std430 interface packing qualifier

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com This commit also adds functions to calculate std430 base alignment and sizes Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/glsl/ast.h | 1 + src/glsl/ast_to_hir.cpp | 20 +--

[Mesa-dev] [PATCH v3 (part2) 19/56] glsl: propagate std430 packing qualifier to struct's members and array of structs

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com When propagating std430 packing qualifier to the struct's members, new glsl_types need to be created because the existing ones are const. The new glsl_types are meant to replace the already defined one taking into account that the field names

[Mesa-dev] [PATCH v3 (part2) 47/56] glsl: Do not allow assignments to read-only variables

2015-07-14 Thread Iago Toral Quiroga
--- src/glsl/ast_to_hir.cpp | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index ab62599..92391a0 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -762,8 +762,15 @@ do_assignment(exec_list

[Mesa-dev] [PATCH v3 (part2) 02/56] i965: Implement DriverFlags.NewShaderStorageBuffer

2015-07-14 Thread Iago Toral Quiroga
We use the same dirty state for SSBOs and UBOs because they share the same infrastructure. Reviewed-by: Jordan Justen jordan.l.jus...@intel.com --- src/mesa/drivers/dri/i965/brw_state_upload.c | 1 + src/mesa/drivers/dri/i965/intel_buffer_objects.c | 2 ++ 2 files changed, 3 insertions(+)

[Mesa-dev] [PATCH v3 (part2) 44/56] glsl: Allow use of memory qualifiers with ARB_shader_storage_buffer_object.

2015-07-14 Thread Iago Toral Quiroga
--- src/glsl/glsl_lexer.ll | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index 845deeb..82ad245 100644 --- a/src/glsl/glsl_lexer.ll +++ b/src/glsl/glsl_lexer.ll @@ -404,11 +404,11 @@ image2DShadow

[Mesa-dev] [PATCH v3 (part2) 01/56] i965: Use 16-byte offset alignment for shader storage buffers

2015-07-14 Thread Iago Toral Quiroga
This is the same we do for other things like uniforms because it ensures optimal performance. Reviewed-by: Jordan Justen jordan.l.jus...@intel.com --- src/mesa/drivers/dri/i965/brw_context.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c

[Mesa-dev] [PATCH v3 (part2) 11/56] nir: add shader storage buffer's unsized array length calculation

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/glsl/nir/glsl_to_nir.cpp | 10 ++ src/glsl/nir/nir_intrinsics.h | 9 + 2 files changed, 19 insertions(+) diff --git a/src/glsl/nir/glsl_to_nir.cpp

[Mesa-dev] [PATCH v3 (part2) 16/56] i965/wm: surfaces should have the API buffer size, not the drm buffer size

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com The returned drm buffer object has a size multiple of 4096 but that should not be exposed to the API user, which is working with a different size. Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com ---

[Mesa-dev] [PATCH v3 (part2) 14/56] i965/fs/nir: implement unsized array's length calculation

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 50 1 file changed, 50 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp

[Mesa-dev] [PATCH v3 (part2) 05/56] i965: Upload Shader Storage Buffer Object surfaces

2015-07-14 Thread Iago Toral Quiroga
Since these are a special kind of UBOs we emit them together reusing the same infrastructure, however, we use a RAW surface so we can reuse existing untyped read/write/atomic messages which include a pixel mask header that we need to set to obtain correct behavior with helper invocations of the

Re: [Mesa-dev] [PATCH 4/4] i965: Optimize batchbuffer macros.

2015-07-14 Thread Chris Wilson
On Mon, Jul 13, 2015 at 02:52:00PM -0700, Matt Turner wrote: --- a/src/mesa/drivers/dri/i965/brw_urb.c +++ b/src/mesa/drivers/dri/i965/brw_urb.c @@ -252,7 +252,7 @@ void brw_upload_urb_fence(struct brw_context *brw) if ((USED_BATCH(brw-batch) 15) 12) { int pad = 16 -

[Mesa-dev] [PATCH v3 (part2) 31/56] i965/nir/fs: Implement SSBO reads

2015-07-14 Thread Iago Toral Quiroga
--- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 62 1 file changed, 62 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index f3fcb4a..9bf41f7 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++

[Mesa-dev] [PATCH v3 (part2) 34/56] glsl: Rename atomic counter functions

2015-07-14 Thread Iago Toral Quiroga
Shader Storage Buffer Object will add new atomic functions that are not associated with counters, so better have atomic counter-specific functions explicitly include the word counter in their names. --- src/glsl/builtin_functions.cpp | 30 +++--- 1 file changed, 15

[Mesa-dev] [PATCH v3 (part2) 28/56] i965/nir/fs: Implement SSBO writes

2015-07-14 Thread Iago Toral Quiroga
--- src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 71 1 file changed, 71 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 5f2c4fa..f3fcb4a 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++

[Mesa-dev] [PATCH v3 (part2) 38/56] i965/nir/fs: Implement SSBO atomics

2015-07-14 Thread Iago Toral Quiroga
--- src/mesa/drivers/dri/i965/brw_fs.h | 2 + src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 77 2 files changed, 79 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index ea204d3..844f813 100644 ---

[Mesa-dev] [PATCH v3 (part2) 41/56] mesa: add glShaderStorageBlockBinding()

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Defined in ARB_shader_storage_buffer_object extension. Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/mesa/main/uniforms.c | 52 src/mesa/main/uniforms.h | 4 2

[Mesa-dev] [PATCH v3 (part2) 07/56] i965/fs: Do not split buffer variables

2015-07-14 Thread Iago Toral Quiroga
Buffer variables are the same as uniforms, only that read/write, so we want the same treatment. Reviewed-by: Jordan Justen jordan.l.jus...@intel.com --- src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp | 1 + 1 file changed, 1 insertion(+) diff --git

[Mesa-dev] [PATCH v3 (part2) 32/56] nir: ignore an instruction's dest if it hasn't any

2015-07-14 Thread Iago Toral Quiroga
--- src/glsl/nir/glsl_to_nir.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp index f5a664a..1d83a98 100644 --- a/src/glsl/nir/glsl_to_nir.cpp +++ b/src/glsl/nir/glsl_to_nir.cpp @@ -1011,7 +1011,8 @@

Re: [Mesa-dev] [PATCH v3 (part2) 00/56] ARB_shader_storage_buffer_object (mesa, i965)

2015-07-14 Thread Iago Toral
BTW, notice that patches 1-3, 5-7 and 51 have already been reviewed by Jordan. Iago On Tue, 2015-07-14 at 09:46 +0200, Iago Toral Quiroga wrote: This is the second part of the v3 series including remaining frontend bits like the optional unsized array at the bottom of SSBO definitions, layout

Re: [Mesa-dev] [RFC] loader: libudev vs sysfs vs libdrm

2015-07-14 Thread Julien Isorce
- libdrm: used as a last resource fall-back after the above two. the sole option used by *BSD, MacOS and Android. Hi, Unless I am missing something, libdrm is not used on MacOS. On osx, EGL_PLATFORM=x11 eglGetDisplay(NULL) calls dri2_initialize_x11 which fallback to

Re: [Mesa-dev] [PATCH v3 (part2) 54/56] docs: Mark ARB_shader_storage_buffer_object as done for i965.

2015-07-14 Thread Iago Toral
Hi Mike, On Tue, 2015-07-14 at 09:30 +, Mike Lothian wrote: Hi Iago Nice work, was it an oversight this wasn't enabled for GLES 3.1? Or is the implementation slightly different? Good question, to be honest I don't remember right now, I think I checked this at some point and did not

Re: [Mesa-dev] [PATCH 10/13] swrast: Avoid double promotion.

2015-07-14 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga ito...@igalia.com On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: --- src/mesa/swrast/s_aaline.c| 28 ++-- src/mesa/swrast/s_aalinetemp.h| 4 ++-- src/mesa/swrast/s_atifragshader.c | 4 ++--

Re: [Mesa-dev] [PATCH 05/13] nir: Avoid double promition.

2015-07-14 Thread Iago Toral
On Tue, 2015-07-14 at 11:30 +0200, Iago Toral wrote: Reviewed-by: Iago Toral Quiroga ito...@igalia.com BTW, ldexpf and copysignf are c99 too, so I guess you'll need to wrap these too. Iago On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: --- src/glsl/nir/nir_opcodes.py | 4 ++-- 1

Re: [Mesa-dev] [PATCH 11/13] program: Avoid double promotion.

2015-07-14 Thread Iago Toral
Needs wrappers for sinf, cosf, powf, logf. Reviewed-by: Iago Toral Quiroga ito...@igalia.com On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: --- src/mesa/program/prog_execute.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 07/13] util: Avoid double promition.

2015-07-14 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga ito...@igalia.com On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: --- src/util/register_allocate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/register_allocate.c b/src/util/register_allocate.c index 2ad8c3c..95be20f

Re: [Mesa-dev] [PATCH 09/13] tnl: Avoid double promotion.

2015-07-14 Thread Iago Toral
On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: There are a couple of unrelated changes in t_vb_lighttmp.h that I hope you'll excuse -- there's a block of code that's duplicated modulo a few trivial differences that I took the liberty of fixing. --- src/mesa/tnl/t_draw.c | 2

[Mesa-dev] [Bug 90264] [Regression, bisected] Tooltip corruption in Chrome

2015-07-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90264 İsmail Dönmez ism...@donmez.ws changed: What|Removed |Added CC||ism...@donmez.ws --

Re: [Mesa-dev] [PATCH v3 (part2) 54/56] docs: Mark ARB_shader_storage_buffer_object as done for i965.

2015-07-14 Thread Mike Lothian
Hi Iago Nice work, was it an oversight this wasn't enabled for GLES 3.1? Or is the implementation slightly different? Cheers Mike On Tue, 14 Jul 2015 at 08:48 Iago Toral Quiroga ito...@igalia.com wrote: --- docs/GL3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Mesa-dev] [PATCH 05/13] nir: Avoid double promition.

2015-07-14 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga ito...@igalia.com On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: --- src/glsl/nir/nir_opcodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/nir/nir_opcodes.py b/src/glsl/nir/nir_opcodes.py index 56e96d9..df5b7e2

Re: [Mesa-dev] [PATCH v3 (part2) 10/56] glsl: Lower unsized array's length calculation expression

2015-07-14 Thread Thomas Helland
2015-07-14 9:46 GMT+02:00 Iago Toral Quiroga ito...@igalia.com: From: Samuel Iglesias Gonsalvez sigles...@igalia.com Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/glsl/lower_ubo_reference.cpp | 179 +++ ^ This is 80 characters

[Mesa-dev] [PATCH 2/2] nv50/nvc0: force cache flush for constbufs

2015-07-14 Thread Samuel Pitoiset
This fixes the following piglit test: ext_transform_feedback-immediate-reuse-uniform-buffer I didn't test on nvc0 but this should work as expected. Signed-off-by: Samuel Pitoiset samuel.pitoi...@gmail.com --- src/gallium/drivers/nouveau/nv50/nv50_shader_state.c | 2 ++

[Mesa-dev] [PATCH 1/2] nouveau: always align buffers to 0x100

2015-07-14 Thread Samuel Pitoiset
Only constbufs must be aligned to 0x100, but since a TFB buffer can be rebinded as a constant buffer it must be also aligned. This patch prevents this behaviour by aligning everything to 256-byte increments at buffer creation. This fixes dmesg fails for the following piglit test:

Re: [Mesa-dev] [PATCH v3 (part2) 10/56] glsl: Lower unsized array's length calculation expression

2015-07-14 Thread Samuel Iglesias Gonsálvez
On 14/07/15 11:05, Thomas Helland wrote: 2015-07-14 9:46 GMT+02:00 Iago Toral Quiroga ito...@igalia.com: From: Samuel Iglesias Gonsalvez sigles...@igalia.com Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/glsl/lower_ubo_reference.cpp | 179

Re: [Mesa-dev] [PATCH 06/13] gallium/auxiliary: Avoid double promotion.

2015-07-14 Thread Iago Toral
This one will need wrapping for fabsf. Reviewed-by: Iago Toral Quiroga ito...@igalia.com On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: --- src/gallium/auxiliary/util/u_format_rgb9e5.h | 2 +- src/gallium/auxiliary/util/u_math.h | 2 +- 2 files changed, 2 insertions(+), 2

Re: [Mesa-dev] [PATCH v3 (part2) 54/56] docs: Mark ARB_shader_storage_buffer_object as done for i965.

2015-07-14 Thread Samuel Iglesias Gonsálvez
On 14/07/15 11:40, Iago Toral wrote: Hi Mike, On Tue, 2015-07-14 at 09:30 +, Mike Lothian wrote: Hi Iago Nice work, was it an oversight this wasn't enabled for GLES 3.1? Or is the implementation slightly different? Good question, to be honest I don't remember right now, I think I

[Mesa-dev] [Bug 91020] Mesa's demo / tools won't compile since EGL changes

2015-07-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91020 --- Comment #4 from George Diamantopoulos georged...@gmail.com --- Created attachment 117106 -- https://bugs.freedesktop.org/attachment.cgi?id=117106action=edit Fix build against EGL implementations that don't support the

Re: [Mesa-dev] [PATCH 04/13] i965: Use float calculations when double is unnecessary.

2015-07-14 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga ito...@igalia.com On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: Literals without an f/F suffix are of type double, and implicit conversion rules specify that the float in (float op double) be converted to a double before the operation is performed. I

Re: [Mesa-dev] [PATCH 08/13] vbo: Avoid double promotion.

2015-07-14 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga ito...@igalia.com On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: --- src/mesa/vbo/vbo_context.c| 6 +++--- src/mesa/vbo/vbo_exec_array.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mesa/vbo/vbo_context.c

Re: [Mesa-dev] [PATCH 00/13] Avoid double promotion

2015-07-14 Thread Thomas Helland
Hi Matt, Just a small nitpick I noticed; s/promition/promotion in the commit message. -Thomas 2015-07-14 1:22 GMT+02:00 Matt Turner matts...@gmail.com: In the process of looking at the assembly generated from the OUT_BATCH series, I noticed a bunch of float - double round trips. Mostly this

Re: [Mesa-dev] [PATCH 00/13] Avoid double promotion

2015-07-14 Thread Daniel Stone
Hi, On 14 July 2015 at 00:22, Matt Turner matts...@gmail.com wrote: but it's not really useful in general because float arguments are always cast to double when passed as arguments to varargs functions like printf (why?), and it warns about that, generating a lot of noise. It might shock you

Re: [Mesa-dev] [PATCH 12/13] mesa/math: Avoid double promotion.

2015-07-14 Thread Iago Toral
On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: --- src/mesa/math/m_clip_tmp.h | 20 ++--- src/mesa/math/m_matrix.c | 70 +++--- src/mesa/math/m_norm_tmp.h | 2 +- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git

Re: [Mesa-dev] [PATCH 06/13] gallium/auxiliary: Avoid double promotion.

2015-07-14 Thread Roland Scheidegger
gallium is already using fabsf in lots of other places. Supported by older msvc versions. Roland Am 14.07.2015 um 11:50 schrieb Iago Toral: This one will need wrapping for fabsf. Reviewed-by: Iago Toral Quiroga ito...@igalia.com On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: ---

[Mesa-dev] [PATCH] glsl: replace null check with assert

2015-07-14 Thread Timothy Arceri
This was added in 54f583a20 since then error handling has improved. The test this was added to fix now fails earlier since 01822706ec --- src/glsl/ir_constant_expression.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/glsl/ir_constant_expression.cpp

Re: [Mesa-dev] [PATCH 2/5] i965/fs: fix stride and type for hw_reg's in regs_read()

2015-07-14 Thread Francisco Jerez
Connor Abbott cwabbo...@gmail.com writes: sources with file == HW_REG get all their information from the fixed_hw_reg field, so we need to get the stride and type from there when computing the size. Signed-off-by: Connor Abbott connor.w.abb...@intel.com ---

Re: [Mesa-dev] [PATCH 13/13] mesa: Avoid double promotion.

2015-07-14 Thread Iago Toral
On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: --- src/mesa/main/ffvertex_prog.c | 10 +- src/mesa/main/fog.c | 2 +- src/mesa/main/get.c | 2 +- src/mesa/main/light.c | 30 +++--- src/mesa/main/lines.c

Re: [Mesa-dev] [PATCH 11/13] mesa: add API dispatch for GL_ARB_get_texture_sub_image

2015-07-14 Thread Brian Paul
On 07/13/2015 10:39 PM, Ilia Mirkin wrote: On Jul 13, 2015 9:21 PM, Brian Paul bri...@vmware.com mailto:bri...@vmware.com wrote: This adds the new glGetTextureSubImage() and glGetCompressedTextureSubImage() functions. Also update the dispatch sanity test program. ---

Re: [Mesa-dev] [PATCH 12/13] mesa/math: Avoid double promotion.

2015-07-14 Thread Iago Toral
On Tue, 2015-07-14 at 13:19 +0200, Iago Toral wrote: On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: --- src/mesa/math/m_clip_tmp.h | 20 ++--- src/mesa/math/m_matrix.c | 70 +++--- src/mesa/math/m_norm_tmp.h | 2 +- 3 files

Re: [Mesa-dev] [PATCH 05/13] nir: Avoid double promition.

2015-07-14 Thread Emil Velikov
On 14 July 2015 at 00:22, Matt Turner matts...@gmail.com wrote: --- src/glsl/nir/nir_opcodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/glsl/nir/nir_opcodes.py b/src/glsl/nir/nir_opcodes.py index 56e96d9..df5b7e2 100644 --- a/src/glsl/nir/nir_opcodes.py

Re: [Mesa-dev] [PATCH 1/2] nouveau: always align buffers to 0x100

2015-07-14 Thread Ilia Mirkin
Actually any buffer can be bound as a constbuf, not just TFB. Reviewed-by: Ilia Mirkin imir...@alum.mit.edu On Tue, Jul 14, 2015 at 6:57 AM, Samuel Pitoiset samuel.pitoi...@gmail.com wrote: Only constbufs must be aligned to 0x100, but since a TFB buffer can be rebinded as a constant buffer it

Re: [Mesa-dev] [PATCH 12/14] scons: rework the EGL build

2015-07-14 Thread Matt Turner
On Tue, Jul 14, 2015 at 8:02 AM, Emil Velikov emil.l.veli...@gmail.com wrote: The scons equivalent of the previous commit - just fold the almost identical driver + main Sconscripts. Cc: Alexander von Gluck IV kallis...@unixzen.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com ---

Re: [Mesa-dev] [PATCH 00/14] EGL build system cleanups

2015-07-14 Thread Matt Turner
On Tue, Jul 14, 2015 at 8:02 AM, Emil Velikov emil.l.veli...@gmail.com wrote: Hello all, This series aims at folding the separate egl/main + egl/driver/foo build scripts into one. Thanks for doing all this -- it's something I've wanted to do for a while. It looks really nice. 2-6, 8-11 (11

[Mesa-dev] [PATCH 00/14] EGL build system cleanups

2015-07-14 Thread Emil Velikov
Hello all, This series aims at folding the separate egl/main + egl/driver/foo build scripts into one. As a big hunk in either script is HAVE_PLATFORM_FOO dependant this allows us to remove the duplicated bits. While clearing it up I've noticed that the scons egl+x11 library was broken since

Re: [Mesa-dev] [PATCH 11/13] mesa: add API dispatch for GL_ARB_get_texture_sub_image

2015-07-14 Thread Ilia Mirkin
On Tue, Jul 14, 2015 at 10:32 AM, Daniel Stone dan...@fooishbar.org wrote: Hi, On 14 July 2015 at 02:21, Brian Paul bri...@vmware.com wrote: +category name=GL_ARB_get_texture_sub_image number=96 And 165, not 96. +function name=GetTextureSubImage offset=assign +param

Re: [Mesa-dev] [RFC] loader: libudev vs sysfs vs libdrm

2015-07-14 Thread Emil Velikov
On 14 July 2015 at 07:48, Julien Isorce julien.iso...@gmail.com wrote: - libdrm: used as a last resource fall-back after the above two. the sole option used by *BSD, MacOS and Android. Hi, Unless I am missing something, libdrm is not used on MacOS. On osx, EGL_PLATFORM=x11

Re: [Mesa-dev] [PATCH 11/14] automake: rework the EGL build

2015-07-14 Thread Matt Turner
On Tue, Jul 14, 2015 at 8:02 AM, Emil Velikov emil.l.veli...@gmail.com wrote: Simplify things by merging the two makefiles. This way we can combine the duplicated HAVE_PLATFORM_ checks, and build the library without having a separate static library. Signed-off-by: Emil Velikov

Re: [Mesa-dev] [PATCH 14/14] egl: remove old makefile.sources

2015-07-14 Thread Matt Turner
On Tue, Jul 14, 2015 at 8:02 AM, Emil Velikov emil.l.veli...@gmail.com wrote: Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/egl/Makefile.am | 3 +-- src/egl/main/Makefile.sources | 29 - 2 files changed, 1 insertion(+), 31 deletions(-)

Re: [Mesa-dev] [PATCH 12/13] mesa/math: Avoid double promotion.

2015-07-14 Thread Mike Stroyan
What we want here is c = cosf( angle * (float)(M_PI / 180.0) ); so the compiler can evaluate the constant expression and use a float representation for the result. I always find it a little awkward deciding between using OpenGL's types like GLfloat or simple language types when working with

Re: [Mesa-dev] [PATCH 12/14] scons: rework the EGL build

2015-07-14 Thread Emil Velikov
On 14 July 2015 at 16:20, Matt Turner matts...@gmail.com wrote: On Tue, Jul 14, 2015 at 8:02 AM, Emil Velikov emil.l.veli...@gmail.com wrote: The scons equivalent of the previous commit - just fold the almost identical driver + main Sconscripts. Cc: Alexander von Gluck IV

Re: [Mesa-dev] [PATCH 14/14] egl: remove old makefile.sources

2015-07-14 Thread Emil Velikov
On 14 July 2015 at 16:21, Matt Turner matts...@gmail.com wrote: On Tue, Jul 14, 2015 at 8:02 AM, Emil Velikov emil.l.veli...@gmail.com wrote: Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/egl/Makefile.am | 3 +-- src/egl/main/Makefile.sources | 29

Re: [Mesa-dev] [PATCH 11/14] automake: rework the EGL build

2015-07-14 Thread Emil Velikov
On 14 July 2015 at 16:19, Matt Turner matts...@gmail.com wrote: On Tue, Jul 14, 2015 at 8:02 AM, Emil Velikov emil.l.veli...@gmail.com wrote: [snip] +libEGL_la_SOURCES = \ + ${LIBEGL_C_FILES} I think you probably just want $(LIBEGL_C_FILES) instead of ${...} This is what the original

Re: [Mesa-dev] [PATCH 11/13] mesa: add API dispatch for GL_ARB_get_texture_sub_image

2015-07-14 Thread Daniel Stone
Hi, On 14 July 2015 at 02:21, Brian Paul bri...@vmware.com wrote: +category name=GL_ARB_get_texture_sub_image number=96 +function name=GetTextureSubImage offset=assign +param name=program type=GLuint/ Surely texture rather than program? Cheers, Daniel

[Mesa-dev] [PATCH 06/14] egl: remove final Windows specific workaround

2015-07-14 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/egl/main/Android.mk | 3 +-- src/egl/main/Makefile.am | 3 +-- src/egl/main/SConscript | 1 - src/egl/main/egldriver.c | 5 - 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/egl/main/Android.mk

[Mesa-dev] [PATCH 09/14] egl: automake: remove unused HAVE_XCB_DRI2 define

2015-07-14 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/egl/main/Makefile.am | 1 - 1 file changed, 1 deletion(-) diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am index 03fb826..32fed81 100644 --- a/src/egl/main/Makefile.am +++ b/src/egl/main/Makefile.am @@ -68,7 +68,6 @@

[Mesa-dev] [PATCH 04/14] egl: remove _EGL_PLATFORM_WINDOWS enum

2015-07-14 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/egl/main/egldisplay.c | 1 - src/egl/main/egldisplay.h | 1 - 2 files changed, 2 deletions(-) diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c index f29f54e..f6db03a 100644 --- a/src/egl/main/egldisplay.c +++

[Mesa-dev] [PATCH 08/14] egl: remove unused _EGL_DRIVER_SEARCH_DIR define

2015-07-14 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/egl/main/Android.mk | 3 +-- src/egl/main/Makefile.am | 3 +-- src/egl/main/SConscript | 4 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/egl/main/Android.mk b/src/egl/main/Android.mk index 4856528..270c165

[Mesa-dev] [PATCH 10/14] gbm: do not build intermittent libgbm_dri static library

2015-07-14 Thread Emil Velikov
The only user of it (libgbm.la) immediately links it. Just build it directly into the library. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/gbm/Makefile.am | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am index

[Mesa-dev] [PATCH 05/14] egl: remove custom string functions

2015-07-14 Thread Emil Velikov
Support for Windows has been removed for a while now, and virtually every POSIX compliant system provides strcasecmp, strdup and snprintf. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/egl/main/Makefile.sources | 2 -- src/egl/main/eglapi.c | 3 +--

[Mesa-dev] [PATCH 02/14] egl: remove flatten HAVE_SHARED_GLAPI

2015-07-14 Thread Emil Velikov
It is simply not possible to use the dri backend without shared glapi, as the alternative provider (libGL) is not always present. We have fixed the build for a while now, so we can rip this out. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/egl/drivers/dri2/Android.mk | 1 -

[Mesa-dev] [PATCH 12/14] scons: rework the EGL build

2015-07-14 Thread Emil Velikov
The scons equivalent of the previous commit - just fold the almost identical driver + main Sconscripts. Cc: Alexander von Gluck IV kallis...@unixzen.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/SConscript | 3 +-- src/egl/Makefile.am | 5 ++---

[Mesa-dev] [PATCH 11/14] automake: rework the EGL build

2015-07-14 Thread Emil Velikov
Simplify things by merging the two makefiles. This way we can combine the duplicated HAVE_PLATFORM_ checks, and build the library without having a separate static library. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- configure.ac | 3 +- src/Makefile.am

[Mesa-dev] [PATCH 13/14] android: rework the EGL build

2015-07-14 Thread Emil Velikov
See previous two commits for details. Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- Android.mk | 3 +- src/egl/drivers/dri2/Android.mk | 63 - src/egl/main/Android.mk | 35 --- 3 files changed,

[Mesa-dev] [PATCH 14/14] egl: remove old makefile.sources

2015-07-14 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/egl/Makefile.am | 3 +-- src/egl/main/Makefile.sources | 29 - 2 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 src/egl/main/Makefile.sources diff --git a/src/egl/Makefile.am

[Mesa-dev] [PATCH 01/14] egl: remove the non-haiku scons build

2015-07-14 Thread Emil Velikov
It has been broken since 2011 with commit c98ea26e16b(egl: Make egl_dri2 and egl_glx built-in drivers.). When the backends got merged into the main library each entry point was guarded by a _EGL_BUILT_IN_DRIVER_* define. As the define was missing, the linker kindly removed the whole of the dri2

[Mesa-dev] [PATCH 07/14] egl/haiku: remove unused DEFAULT_DRIVER_DIR define

2015-07-14 Thread Emil Velikov
Cc: Alexander von Gluck IV kallis...@unixzen.com Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/egl/drivers/haiku/SConscript | 4 1 file changed, 4 deletions(-) diff --git a/src/egl/drivers/haiku/SConscript b/src/egl/drivers/haiku/SConscript index ec6020e..9db7ecf 100644 ---

[Mesa-dev] [PATCH 03/14] egl: remove final references of platform_null

2015-07-14 Thread Emil Velikov
Signed-off-by: Emil Velikov emil.l.veli...@gmail.com --- src/egl/main/Makefile.am | 4 src/egl/main/egldisplay.c | 1 - src/egl/main/egldisplay.h | 1 - 3 files changed, 6 deletions(-) diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am index 9030d27..ec0f88e 100644 ---

Re: [Mesa-dev] [PATCH 01/14] egl: remove the non-haiku scons build

2015-07-14 Thread Jose Fonseca
Reviewed-by: Jose Fonseca jfons...@vmware.com On 14/07/15 16:02, Emil Velikov wrote: It has been broken since 2011 with commit c98ea26e16b(egl: Make egl_dri2 and egl_glx built-in drivers.). When the backends got merged into the main library each entry point was guarded by a

Re: [Mesa-dev] [PATCH] i965: Mark constant static data as const.

2015-07-14 Thread Pohjolainen, Topi
On Mon, Jul 13, 2015 at 04:15:02PM -0700, Matt Turner wrote: --- src/mesa/drivers/dri/i965/brw_curbe.c | 2 +- src/mesa/drivers/dri/i965/brw_draw_upload.c | 44 ++--- 2 files changed, 23 insertions(+), 23 deletions(-) Reviewed-by: Topi Pohjolainen

[Mesa-dev] [PATCH v3 (part2) 35/56] glsl: Add atomic functions from ARB_shader_storage_buffer_object

2015-07-14 Thread Iago Toral Quiroga
--- src/glsl/builtin_functions.cpp | 185 + 1 file changed, 185 insertions(+) diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index 4ba6d6f..c8ecefe 100644 --- a/src/glsl/builtin_functions.cpp +++

[Mesa-dev] [PATCH v3 (part2) 54/56] docs: Mark ARB_shader_storage_buffer_object as done for i965.

2015-07-14 Thread Iago Toral Quiroga
--- docs/GL3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 33a282e..6427616 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -164,7 +164,7 @@ GL 4.3, GLSL 4.30: GL_ARB_program_interface_query DONE (all drivers)

[Mesa-dev] [PATCH v3 (part2) 49/56] main: Add SHADER_STORAGE_BLOCK and BUFFER_VARIABLE support for ARB_program_interface_query

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez sigles...@igalia.com Including TOP_LEVEL_ARRAY_SIZE and TOP_LEVEL_ARRAY_STRIDE queries. Signed-off-by: Samuel Iglesias Gonsalvez sigles...@igalia.com --- src/glsl/ir_uniform.h| 5 + src/glsl/link_uniforms.cpp | 17 ++- src/glsl/linker.cpp

  1   2   >