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) 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 fra

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 - (USED

[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 *instruct

[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 --- 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(+) diff --git a/src/mesa/drive

[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 KEYWORD(13

[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 --- 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 b/src/mesa/drivers/dri/i965/brw_contex

[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 Signed-off-by: Samuel Iglesias Gonsalvez --- 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 b/src/glsl/nir/glsl_to_nir.cpp index 66430f3..8b

[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 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 --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 4 ++-- 1 file chan

[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 Signed-off-by: Samuel Iglesias Gonsalvez --- 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 b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index

[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 --- src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp b/src/me

[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 @@ nir_visitor::

[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 --- 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 100644 --- a/src/mesa/driv

[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 Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/lower_ubo_reference.cpp | 179 +++ 1 file changed, 179 insertions(+) diff --git a/src/glsl/lower_ubo_reference.cpp b/src/glsl/lower_ubo_reference.cpp index 8b08107..9d0a796

[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 th

[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 Signed-off-by: Samuel Iglesias Gonsalvez --- 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 ++ src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 47

[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 Signed-off-by: Samuel Iglesias Gonsalvez --- 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 b/src/mesa/drivers/dri/i965/brw_context.c index 8a0ffbe..c4cc6f2 100644

[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 +++ b

[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 insert

[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 +++ b

[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 --- a/src/mesa

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

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Defined in ARB_shader_storage_buffer_object extension. Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/main/uniforms.c | 52 src/mesa/main/uniforms.h | 4 2 files changed, 56 insertions(+) diff --git

[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 b/src/glsl/nir/glsl_to_n

[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 Otherwise, generate a link time error as per the ARB_shader_storage_buffer_object spec. Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/glsl_types.cpp | 9 +++-- src/glsl/link_uniform_blocks.cpp | 17 + src/glsl/linker.cpp

[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 Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/main/tests/enum_strings.cpp | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/mesa/main/tests/enum_strings.cpp b/src/mesa/main/tests/enum_strings.cpp index dc5fe75..be11482 100644 --- a

[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 Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/lower_ubo_reference.cpp | 65 ++-- 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/src/glsl/lower_ubo_reference.cpp b/src/glsl/lower_ubo_reference.cpp index

[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 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 , zero is returned." Signed-off-by: Samuel Iglesi

[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 changed

[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 Notice that we should differentiate betweeb shader storage blocks and uniform blocks, since they have different limits. Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/linker.cpp | 43 +++ 1 file changed, 39 insertio

[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 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 condition and error messages

[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 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 Gonsalvez --- src/mes

[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 --- 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 +2764,7 @@ apply_ty

[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 3d6d639..1a29b2

[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 Now std140 is not the only interface packing qualifier that can be used. Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/ast.h | 10 + src/glsl/ast_to_hir.cpp | 54 + src/glsl/glsl_types.cpp

[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 This commit also adds functions to calculate std430 base alignment and sizes Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/ast.h | 1 + src/glsl/ast_to_hir.cpp | 20 +-- src/glsl/ast_type.cpp| 1 + src/glsl

[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 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 cannot have different

[Mesa-dev] [PATCH v3 (part2) 55/56] glsl: Consider active all elements of a shared/std140 block array

2015-07-14 Thread Iago Toral Quiroga
From: Antia Puentes Commmit 1ca25ab (glsl: Do not eliminate 'shared' or 'std140' blocks or block members) considers active 'shared' and 'std140' uniform blocks and uniform block arrays but did not include the block array elements. It was possible to have an active uniform block array without any

[Mesa-dev] [PATCH v3 (part2) 37/56] nir: 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/glsl/nir/glsl_to_nir.cpp | 55 +++ src/glsl/nir/nir_intrinsics.h | 12 ++ 2 files changed, 67 inse

[Mesa-dev] [PATCH v3 (part2) 27/56] nir: Implement __intrinsic_store_ssbo

2015-07-14 Thread Iago Toral Quiroga
--- src/glsl/nir/glsl_to_nir.cpp | 36 src/glsl/nir/nir_intrinsics.h | 12 ++-- 2 files changed, 42 insertions(+), 6 deletions(-) diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp index 8b3a8ec..880b6c2 100644 --- a/src/glsl/nir

[Mesa-dev] [PATCH v3 (part2) 03/56] i965: Set MaxShaderStorageBuffers for compute shaders

2015-07-14 Thread Iago Toral Quiroga
Reviewed-by: Jordan Justen --- 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 b/src/mesa/drivers/dri/i965/brw_context.c index d92d7c2..8a0ffbe 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/

[Mesa-dev] [PATCH v3 (part2) 23/56] glsl: ignore buffer variables when counting uniform components

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/link_uniforms.cpp | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp index 131e76c..eefe7dc 100644 --- a/src/glsl/link_

[Mesa-dev] [PATCH v3 (part2) 46/56] glsl: Allow memory layout qualifiers on shader storage buffer objects

2015-07-14 Thread Iago Toral Quiroga
Since memory qualifiers are also keywords we need to do the same trick we use for other keywords that can be used as layout qualifiers to handle alternate capitalizations in desktop GLSL, like row_major, etc. --- src/glsl/ast_to_hir.cpp | 31 src/glsl/glsl_parser.yy | 75 +

[Mesa-dev] [PATCH v3 (part2) 52/56] mesa: Add getters for the GL_ARB_shader_storage_buffer_object max constants

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/main/get.c | 1 + src/mesa/main/get_hash_params.py | 12 2 files changed, 13 insertions(+) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 4fc30e7..822bc17 100644 --- a

[Mesa-dev] [PATCH v3 (part2) 53/56] i965: Enable ARB_shader_storage_buffer_object extension for gen7+

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/drivers/dri/i965/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 6b3bd12..e3b1406 10064

[Mesa-dev] [PATCH v3 (part2) 48/56] glsl: Do not allow reads from write-only variables

2015-07-14 Thread Iago Toral Quiroga
The error location won't be right, but fixing that would require to check for this as we process each type of AST node that can involve a variable read. --- src/glsl/ast_to_hir.cpp | 49 + 1 file changed, 49 insertions(+) diff --git a/src/glsl/ast_t

[Mesa-dev] [PATCH v3 (part2) 40/56] glsl: First argument to atomic functions must be a buffer variable

2015-07-14 Thread Iago Toral Quiroga
--- src/glsl/ast_function.cpp | 37 + 1 file changed, 37 insertions(+) diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp index 92e26bf..be6aba6 100644 --- a/src/glsl/ast_function.cpp +++ b/src/glsl/ast_function.cpp @@ -141,6 +141,31 @@ verify_i

[Mesa-dev] [PATCH v3 (part2) 25/56] i965/fs: Do not include the header with a pixel mask in untyped read messages

2015-07-14 Thread Iago Toral Quiroga
We need our reads to provide well-defined results for all enabled channels even for helper invocations, which means that we should not use a pixel mask with them. --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 4 ++-- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 35 -

[Mesa-dev] [PATCH v3 (part2) 51/56] glapi: add ARB_shader_storage_block_buffer_object

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez v2: - Add ShaderStorageBlockBinding to static_data.py Signed-off-by: Samuel Iglesias Gonsalvez Reviewed-by: Jordan Justen --- .../glapi/gen/ARB_shader_storage_buffer_object.xml | 36 ++ src/mapi/glapi/gen/GL4x.xml| 18

[Mesa-dev] [PATCH v3 (part2) 12/56] i965/vec4: Implement unsized array's length calculation

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Notice that Skylake needs to include a header in the sampler message so it will need some tweaks to work there. Signed-off-by: Samuel Iglesias Gonsalvez --- src/mesa/drivers/dri/i965/brw_defines.h | 3 ++ src/mesa/drivers/dri/i965/brw_shader.cpp

[Mesa-dev] [PATCH v3 (part2) 36/56] glsl: lower SSBO atomic intrinsics

2015-07-14 Thread Iago Toral Quiroga
The first argument to SSBO atomics is a reference to a SSBO buffer variable so we want to compute its block index and offset and provide these values to an internal version of the intrinsic that takes them instead of the buffer variable reference. --- src/glsl/lower_ubo_reference.cpp | 141 +++

[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 +++ b/src/glsl/builtin_functions.cp

[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 Including TOP_LEVEL_ARRAY_SIZE and TOP_LEVEL_ARRAY_STRIDE queries. Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/ir_uniform.h| 5 + src/glsl/link_uniforms.cpp | 17 ++- src/glsl/linker.cpp | 10 +- src/mesa/main/program

[Mesa-dev] [PATCH v3 (part2) 45/56] glsl: Apply memory qualifiers to buffer variables

2015-07-14 Thread Iago Toral Quiroga
--- src/glsl/ast_to_hir.cpp | 25 + src/glsl/glsl_types.h | 10 ++ 2 files changed, 35 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index f0c2e5b..92bf414 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -5587,

[Mesa-dev] [PATCH v3 (part2) 24/56] glsl: shader storage blocks use different max block size values than uniforms

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez Signed-off-by: Samuel Iglesias Gonsalvez --- src/glsl/linker.cpp | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index e932b8d..330ef56 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/link

[Mesa-dev] [PATCH v3 (part2) 09/56] glsl: Add parser/compiler support for unsized array's length()

2015-07-14 Thread Iago Toral Quiroga
From: Samuel Iglesias Gonsalvez It also creates unop and triop expressions to tell the driver to calculate the unsized array length. It is needed two expressions to do the calculation: * The unop expression saves the ir_rvalue* whose length should be calculated. * Afterwards, this unop is goi

[Mesa-dev] [PATCH v3 (part2) 56/56] i965/vec4: Skip dependency control for opcodes emitting multiple instructions

2015-07-14 Thread Iago Toral Quiroga
The same we did for the fragment shader with commit 7452f18b. --- src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp index 443bf48..8876e02 100

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

[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 changed: What|Removed |Added CC||ism...@donmez.ws -- You are receiving t

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 : > From: Samuel Iglesias Gonsalvez > > Signed-off-by: Samuel Iglesias Gonsalvez > --- > src/glsl/lower_ubo_reference.cpp | 179 > +++ ^ This is 80 characters wide in this case(for reference), so we're blowing the

[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 --- Created attachment 117106 --> https://bugs.freedesktop.org/attachment.cgi?id=117106&action=edit Fix build against EGL implementations that don't support the EGL_MESA_screen_surface extension There

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 : >> From: Samuel Iglesias Gonsalvez >> >> Signed-off-by: Samuel Iglesias Gonsalvez >> --- >> src/glsl/lower_ubo_reference.cpp | 179 >> +++ > > ^ This is 80 characters

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 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 believe float > ex

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

2015-07-14 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga 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 100644 > ---

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 wrote: > --- > docs/GL3.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/docs/GL3.txt

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 no

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 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 file chan

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 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 deletions(-) >

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

2015-07-14 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga 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 100644 > --- a

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

2015-07-14 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga 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 b/src/mesa/vbo/vbo_con

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 no

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

[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 --- src/gallium/drivers/nouveau/nv50/nv50_shader_state.c | 2 ++ src/gallium/drivers/nouveau/nvc0/nvc0_state_val

[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: ext_transform_

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

2015-07-14 Thread Iago Toral
Reviewed-by: Iago Toral Quiroga 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 ++-- > src/mesa/swrast/s_copypix.c |

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 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 a/src/mesa/program/pr

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 --g

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 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 to learn that th

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 : > 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 > arises because

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 +- >

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.

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" mailto:bri...@vmware.com>> wrote: > > This adds the new glGetTextureSubImage() and > glGetCompressedTextureSubImage() functions. Also update the > dispatch sanity test program. > --- > src/mapi/glapi/gen/ARB

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 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 > --- > src/mesa/drivers/dri/i965/brw_fs.cpp | 24 ++-- >

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 > > On Mon, 2015-07-13 at 16:22 -0700, Matt Turner wrote: >> --- >> src/gall

[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 b/src/glsl/ir_c

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 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 > +++ b/src/g

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 wrote: > + > + > + Surely texture rather than program? Cheers, Daniel ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

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 wrote: > Hi, > > On 14 July 2015 at 02:21, Brian Paul wrote: >> + And 165, not 96. >> + >> + > > Surely texture rather than program? > > Cheers, > Daniel > ___ > mesa-dev mailing list > mesa-d

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 On Tue, Jul 14, 2015 at 6:57 AM, Samuel Pitoiset wrote: > 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 prevent

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 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 eglGetDisplay(NULL) calls dr

[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 20

[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 Signed-off-by: Emil Velikov --- src/SConscript | 3 +-- src/egl/Makefile.am | 5 ++--- src/egl/SConscript | 33 ++

[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 --- configure.ac | 3 +- src/Makefile.am | 8 +-- src/e

[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 --- Android.mk | 3 +- src/egl/drivers/dri2/Android.mk | 63 - src/egl/main/Android.mk | 35 --- 3 files changed, 25 insertions(+), 76 delet

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

2015-07-14 Thread Emil Velikov
Signed-off-by: Emil Velikov --- 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 b/src/egl/Makefile.am inde

[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 ba

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

2015-07-14 Thread Emil Velikov
Signed-off-by: Emil Velikov --- 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 b/src/egl/main/Android.mk index 0ba7295..

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

2015-07-14 Thread Emil Velikov
Signed-off-by: Emil Velikov --- 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 @@ endif if HAVE_EGL_DRIVER

  1   2   >