Re: [Mesa-dev] [PATCH 00/18] Good bye pragma once

2017-03-22 Thread Juha-Pekka Heikkila
real reviews here but an Ack or two will be appreciated. I read them through and all look good, they also compile all ok on my box. Acked-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> I noticed "util/strndup.h" is included only into linker.cpp and shader_query.cpp of whi

[Mesa-dev] [PATCH] Mesa: Fix performance query id check

2017-02-27 Thread Juha-Pekka Heikkila
In queryid_valid() fix handling of zero index. CC: Robert Bragg <rob...@sixbynine.org> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/main/performance_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/performanc

Re: [Mesa-dev] Mesa: Fix performance query id check

2017-02-24 Thread Juha-Pekka Heikkila
Oops. Original code can never fail on zero id but my patch is also wrong. Please ignore this patch. /Juha-Pekka On 24.02.2017 15:10, Juha-Pekka Heikkila wrote: In queryid_valid() index is unsigned so checking if it is less than zero is useless. On queryid_to_index() is comment saying 0

[Mesa-dev] i965: Remove duplicate checks

2017-02-24 Thread Juha-Pekka Heikkila
On both sides of the comment on what's being checked are exactly same checks in different order. I took out ones before the comment so comment can stay in place. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/drivers/dri/i965/brw_eu_validate.c | 12 -

[Mesa-dev] Mesa: Fix performance query id check

2017-02-24 Thread Juha-Pekka Heikkila
In queryid_valid() index is unsigned so checking if it is less than zero is useless. On queryid_to_index() is comment saying 0 is reserved to be invalid thus rule it out. CC: Robert Bragg <rob...@sixbynine.org> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- s

Re: [Mesa-dev] [PATCH 00/15] GLSL memory allocation rework for faster compilation

2016-10-13 Thread Juha-Pekka Heikkila
I forgot to reply here on the list, I've just been talking about this with Tapani face to face. My series rebased and fixed on top of mesa master branch from yesterday is here https://github.com/juhapekka/juha_mesaexperimentals/tree/jenkins Tapani was already taking rebased patches from

Re: [Mesa-dev] [PATCH 7/7] util: Fix ralloc to use malloc instead of calloc

2016-06-16 Thread Juha-Pekka Heikkila
On 14.06.2016 18:03, Jason Ekstrand wrote: On Tue, Jun 14, 2016 at 7:59 AM, Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com <mailto:juhapekka.heikk...@gmail.com>> wrote: ralloc originally had had idea of using malloc but somehow had slipped in calloc. Without these cha

[Mesa-dev] [PATCH 6/7] i965/fs: fill allocated memory with zeros where needed

2016-06-14 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp| 2 +- src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dr

[Mesa-dev] [PATCH 1/7] glsl: Fix reading of uninitialized memory

2016-06-14 Thread Juha-Pekka Heikkila
Switch to use memory allocations which zero memory for places where needed. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/compiler/glsl/ast_to_hir.cpp | 2 +- src/compiler/glsl/glcpp/glcpp-parse.y | 4 ++-- src/compiler/glsl/link_uniform_blocks.c

[Mesa-dev] [PATCH 3/7] util: use rzalloc instead on ralloc in _mesa_set_create(()

2016-06-14 Thread Juha-Pekka Heikkila
rzalloc guarantee we get zeroed memory which is needed here. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/util/set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/set.c b/src/util/set.c index 99abefd..d64291d 100644 --- a/src/util

[Mesa-dev] [PATCH 5/7] i965/vec4: zero allocated memory where needed

2016-06-14 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp b/src/mesa/drivers/dr

[Mesa-dev] [PATCH 7/7] util: Fix ralloc to use malloc instead of calloc

2016-06-14 Thread Juha-Pekka Heikkila
working. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/util/ralloc.c | 49 + src/util/ralloc.h | 2 +- 2 files changed, 34 insertions(+), 17 deletions(-) diff --git a/src/util/ralloc.c b/src/util/ralloc.c index 9

[Mesa-dev] [PATCH 2/7] util: use rzalloc instead on ralloc in _mesa_hash_table_create()

2016-06-14 Thread Juha-Pekka Heikkila
rzalloc guarantee we get zeroed memory which is needed here. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/util/hash_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/hash_table.c b/src/util/hash_table.c index 4cfe3d9..9097e85

[Mesa-dev] [PATCH 4/7] nir: zero allocated memory where needed

2016-06-14 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/compiler/nir/nir.c | 6 +++--- src/compiler/nir/nir_opt_dce.c | 2 +- src/compiler/nir/nir_phi_builder.c | 2 +- src/compiler/nir/nir_search.c | 2 +- src/compiler/nir/nir_to_ssa.c | 2 +

[Mesa-dev] [PATCH 0/7] Fix ralloc/rzalloc usage v2

2016-06-14 Thread Juha-Pekka Heikkila
with these changes. /Juha-Pekka Juha-Pekka Heikkila (7): glsl: Fix reading of uninitialized memory util: use rzalloc instead on ralloc in _mesa_hash_table_create() util: use rzalloc instead on ralloc in _mesa_set_create(() nir: zero allocated memory where needed i965/vec4: zero allocated

Re: [Mesa-dev] [PATCH 1/7] [RFC] util: Fix ralloc to use malloc instead of calloc

2016-06-07 Thread Juha-Pekka Heikkila
On 07.06.2016 20:26, Ian Romanick wrote: On 06/07/2016 07:26 AM, Juha-Pekka Heikkila wrote: ralloc originally had had idea of using malloc but somehow had slipped in calloc. Without these changes rzalloc did double job of zeroing the memory, first calloc and then memset. Now change ralloc

Re: [Mesa-dev] [PATCH 7/7] [RFC] i965/fs: fill allocated memory with zeros where needed

2016-06-07 Thread Juha-Pekka Heikkila
On 07.06.2016 18:07, Ilia Mirkin wrote: On Tue, Jun 7, 2016 at 10:26 AM, Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> wrote: Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +- src/mesa/driv

[Mesa-dev] [PATCH 7/7] [RFC] i965/fs: fill allocated memory with zeros where needed

2016-06-07 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/drivers/dri/i965/brw_fs.cpp | 2 +- src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp| 2 +- src/mesa/drivers/dri/i965/brw_fs_dead_code_eliminate.cpp | 4 ++-- 3 files changed, 4 inse

[Mesa-dev] [PATCH 6/7] [RFC] i965/vec4: zero allocated memory where needed

2016-06-07 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_dead_code_eliminate.cpp b/src/mesa/drivers/dr

[Mesa-dev] [PATCH 4/7] [RFC] util: use rzalloc instead on ralloc in _mesa_set_create(()

2016-06-07 Thread Juha-Pekka Heikkila
rzalloc guarantee we get zeroed memory which is needed here. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/util/set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/set.c b/src/util/set.c index 99abefd..d64291d 100644 --- a/src/util

[Mesa-dev] [PATCH 5/7] [RFC] nir: zero allocated memory where needed

2016-06-07 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/compiler/nir/nir.c | 6 +++--- src/compiler/nir/nir_opt_dce.c | 2 +- src/compiler/nir/nir_phi_builder.c | 2 +- src/compiler/nir/nir_search.c | 2 +- src/compiler/nir/nir_to_ssa.c | 2 +

[Mesa-dev] [PATCH 3/7] [RFC] util: use rzalloc instead on ralloc in _mesa_hash_table_create()

2016-06-07 Thread Juha-Pekka Heikkila
rzalloc guarantee we get zeroed memory which is needed here. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/util/hash_table.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/hash_table.c b/src/util/hash_table.c index 4cfe3d9..9097e85

[Mesa-dev] [PATCH 1/7] [RFC] util: Fix ralloc to use malloc instead of calloc

2016-06-07 Thread Juha-Pekka Heikkila
working. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/util/ralloc.c | 31 +++ src/util/ralloc.h | 2 +- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/src/util/ralloc.c b/src/util/ralloc.c index 9526011..e27d835

[Mesa-dev] [PATCH 2/7] [RFC] glsl: Fix reading of uninitialized memory

2016-06-07 Thread Juha-Pekka Heikkila
Switch to use memory allocations which zero memory for places where needed. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/compiler/glsl/ast_to_hir.cpp | 2 +- src/compiler/glsl/glcpp/glcpp-parse.y | 4 ++-- src/compiler/glsl/link_uniform_blocks.c

[Mesa-dev] [PATCH 0/7] [RFC] Fix ralloc/rzalloc usage

2016-06-07 Thread Juha-Pekka Heikkila
now all piglit tests are returning same results as without this set. Tapani Pälli did earlier point out there were some problems with different setups so this anyway have to be tested well if it was ever to be applied on mesa master branch. /Juha-Pekka Juha-Pekka Heikkila (7): util: Fix ralloc

[Mesa-dev] [PATCH] i965/blorb: remove dead code in brw_blorp_const_color_program::compile()

2016-04-22 Thread Juha-Pekka Heikkila
base_mrf is unsigned, checking if its greater or equal to zero will not fail. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dr

[Mesa-dev] [PATCH] nir: Add missing break into switch in construct_value()

2016-04-22 Thread Juha-Pekka Heikkila
There seemed to be missing one break in nested switchcases. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/compiler/nir/nir_search.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_search.c b/src/compiler/nir/nir_search.c index dc53a90..d

[Mesa-dev] [PATCH 2/2] meta: initialize values to avoid random behaviour on error path

2016-04-16 Thread Juha-Pekka Heikkila
if brw_meta_stencil_blit() errored at wrong place 'target' would be uninitialized and cause random behaviour on leaving the funtion. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c | 2 +- 1 file changed, 1 insertion

[Mesa-dev] [PATCH 1/2] meta: Avoid random memory access on error

2016-04-16 Thread Juha-Pekka Heikkila
Initialize drawFb to NULL in _mesa_meta_CopyImageSubData_uncompressed() if getting readFb fails uninitialized drawFb will cause randomness on cleanup. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/drivers/common/meta_copy_image.c | 2 +- 1 file chan

[Mesa-dev] [PATCH 0/2] two super simple patches

2016-04-16 Thread Juha-Pekka Heikkila
These are just fixes for error paths. Juha-Pekka Heikkila (2): meta: Avoid random memory access on error meta: initialize values to avoid random behaviour on error path src/mesa/drivers/common/meta_copy_image.c | 2 +- src/mesa/drivers/dri/i965/brw_meta_stencil_blit.c | 2 +- 2

[Mesa-dev] [PATCH] i965: Add missing null checks in intel_mipmap_tree.c

2016-02-17 Thread Juha-Pekka Heikkila
Just check miptree_create() returned other than NULL as everywhere else in the file. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/drivers/dri/i965/intel_mipmap_tree.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dr

[Mesa-dev] [PATCH 1/2] i965: in brw_link_shader() react to low memory

2016-02-03 Thread Juha-Pekka Heikkila
Check _mesa_new_parameter_list() returned other than null. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/drivers/dri/i965/brw_link.cpp | 4 src/mesa/main/ff_fragment_shader.cpp | 6 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH 2/2] glsl: Check for null pointer at ir_variable_refcount_visitor()

2016-02-03 Thread Juha-Pekka Heikkila
Look after calloc give memory address. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/compiler/glsl/ir_variable_refcount.cpp | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/compiler/glsl/ir_variable_refcount.cpp b/src/compile

[Mesa-dev] [PATCH 0/2] Simple Klocwork patches

2016-02-03 Thread Juha-Pekka Heikkila
I'm thinking these things maybe could be wrapped up inside something like "#ifdef windows" or so in the future. At least for Android and Linux these are normally quite useless. /Juha-Pekka Juha-Pekka Heikkila (2): i965: in brw_link_shader() react to low memory glsl: Check for nu

Re: [Mesa-dev] [PATCH] util/ralloc: Remove double zero'ing of rzalloc buffers

2016-02-01 Thread Juha-Pekka Heikkila
intel.com> Cc: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> Cc: Kenneth Graunke <kenn...@whitecape.org> --- For a release build, I saw the code size shrink by 64 bytes. src/util/ralloc.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --g

[Mesa-dev] [PATCH] meta: Check after null return value at blitframebuffer_texture()

2016-01-31 Thread Juha-Pekka Heikkila
Look after _mesa_meta_setup_sampler() return value. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/drivers/common/meta_blit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c

Re: [Mesa-dev] [PATCH 1/3] glsl: build up a mask of active shader stages in a program

2015-12-07 Thread Juha-Pekka Heikkila
small comment on patch 2, otherwise these are Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> /Juha-Pekka On 07.12.2015 11:29, Tapani Pälli wrote: This will be used for validating SSO pipeline where all active stages in linked programs should be in use when rendering.

Re: [Mesa-dev] [PATCH 2/3] mesa: build up a mask of active shader stages in a pipeline

2015-12-07 Thread Juha-Pekka Heikkila
On 07.12.2015 11:29, Tapani Pälli wrote: This will be used for validating SSO pipeline where all active stages in linked programs should be in use when rendering. Signed-off-by: Tapani Pälli --- src/mesa/main/mtypes.h | 2 ++ src/mesa/main/pipelineobj.c | 39

[Mesa-dev] [PATCH] glsl: remove useless null checks and make match_explicit_outputs_to_inputs() static

2015-12-02 Thread Juha-Pekka Heikkila
match_explicit_outputs_to_inputs() cannot get null inputs and if it ever did triggering first null check would later in the function cause segfault. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> CC: timothy.arc...@collabora.com --- src/glsl/linker.cpp | 10 +-

Re: [Mesa-dev] [PATCH] glsl: handle case where index is array deref in optimize_split_arrays

2015-11-24 Thread Juha-Pekka Heikkila
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> On 19.11.2015 13:12, Tapani Pälli wrote: Previously pass did not traverse to those array dereferences which were used as indices to arrays. This fixes Synmark2 Gl42CSCloth application issues. Signed-off-by: Tapani Pälli <

Re: [Mesa-dev] [PATCH 1/7] glsl: move and reused code to find first and last shaders

2015-11-23 Thread Juha-Pekka Heikkila
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> On 21.11.2015 10:02, Timothy Arceri wrote: From: Timothy Arceri <timothy.arc...@collabora.com> --- src/glsl/linker.cpp | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff

Re: [Mesa-dev] [PATCH 2/7] glsl: only call dead code pass when new inputs/outputs demoted

2015-11-23 Thread Juha-Pekka Heikkila
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> On 21.11.2015 10:02, Timothy Arceri wrote: From: Timothy Arceri <timothy.arc...@collabora.com> This will help avoid eliminating inputs/outputs needed by SSOs. Cc: Gregory Hainaut <gregory.hain...@gmail.com&

[Mesa-dev] [PATCH] i965: Don't write beyond allocated memory.

2015-11-13 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/mesa/drivers/dri/i965/brw_eu_validate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_validate.c b/src/mesa/drivers/dri/i965/brw_eu_validate.c index eb57962..2

Re: [Mesa-dev] [PATCH 1/3] mesa: rename UniformBlockStageIndex to InterfaceBlockStageIndex

2015-10-29 Thread Juha-Pekka Heikkila
This set was Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> On 28.10.2015 07:38, Jordan Justen wrote: Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com> Cc: Samuel Iglesias Gonsálvez <sigles...@igalia.com> Cc: Iago Toral Quiroga <ito...@igali

[Mesa-dev] [PATCH] glsl: join calculate_array_size() and calculate_array_stride()

2015-10-27 Thread Juha-Pekka Heikkila
These helpers are ran for same case the same loop. Here joined their operation so the loop is ran just once. Also fixed out-of-memory condition here. v2: Make the loop simpler to read as per Tapani's suggestion Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- sr

[Mesa-dev] [PATCH] glsl: join calculate_array_size() and calculate_array_stride()

2015-10-21 Thread Juha-Pekka Heikkila
These helpers are ran for same case the same loop. Here joined their operation so the loop is ran just once. Also fixed out-of-memory condition here. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikk...@gmail.com> --- src/glsl/linker.cpp

Re: [Mesa-dev] [PATCH 0/9] Mostly trivial clean ups

2015-07-31 Thread Juha-Pekka Heikkila
this set is Reviewed-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com On 30.07.2015 17:14, Ian Romanick wrote: All but the last of these patches have been sitting in one tree or another for quite some time. All of these files were touched as part of other work, but that work is stalled

Re: [Mesa-dev] [PATCH] util: Take memset out of rzalloc_size()

2015-05-07 Thread Juha-Pekka Heikkila
On 06.05.2015 21:51, Rob Clark wrote: On Wed, May 6, 2015 at 1:24 PM, Kenneth Graunke kenn...@whitecape.org wrote: On Wednesday, May 06, 2015 03:35:27 PM Juha-Pekka Heikkila wrote: rzalloc_size() call ralloc_size() to allocate memory. ralloc_size() use calloc to get memory thus zeroing

[Mesa-dev] [PATCH] util: Take memset out of rzalloc_size()

2015-05-06 Thread Juha-Pekka Heikkila
rzalloc_size() call ralloc_size() to allocate memory. ralloc_size() use calloc to get memory thus zeroing in rzalloc_size is not necessary. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/util/ralloc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/util/ralloc.c

[Mesa-dev] [PATCH 2/3] mesa/main: avoid null access in format_array_table_init()

2015-05-05 Thread Juha-Pekka Heikkila
If _mesa_hash_table_create failed we'd get null pointer. Report error and go away. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/formats.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index

[Mesa-dev] [PATCH 3/3] mesa/main: check for null in invalid_array_element_syntax()

2015-05-05 Thread Juha-Pekka Heikkila
name string is coming through API call, need to be careful with it. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/program_resource.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/program_resource.c b/src/mesa/main

[Mesa-dev] [PATCH 1/3] mesa/main: Remove _mesa_HashClone()

2015-05-05 Thread Juha-Pekka Heikkila
I didn't find this being used anywhere. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/hash.c | 28 src/mesa/main/hash.h | 3 --- 2 files changed, 31 deletions(-) diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c index

[Mesa-dev] [PATCH 0/3] Simple Klocwork patches.

2015-05-05 Thread Juha-Pekka Heikkila
Just simple Klocwork found issues. /Juha-Pekka Juha-Pekka Heikkila (3): mesa/main: Remove _mesa_HashClone() mesa/main: avoid null access in format_array_table_init() mesa/main: check for null in invalid_array_element_syntax() src/mesa/main/formats.c | 10 ++ src/mesa

[Mesa-dev] [PATCH 06/13] mesa/main: Don't free QueryObjects which were never allocated

2015-05-05 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/queryobj.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/queryobj.c b/src/mesa/main/queryobj.c index fbccf3f..3adea35 100644 --- a/src/mesa/main/queryobj.c +++ b/src/mesa

[Mesa-dev] [PATCH 11/13] i965: Add missing return on error path

2015-05-05 Thread Juha-Pekka Heikkila
If there was memory allocation failure have to return away from brw_new_buffer_object Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/drivers/dri/i965/intel_buffer_objects.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 10/13] mesa/main: Check context pointer in _mesa_error before using it

2015-05-05 Thread Juha-Pekka Heikkila
I guess this should not really be able to segfault but still it seems to be able to during context creation. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/errors.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git

[Mesa-dev] [PATCH 00/13] Fix context creation error handling

2015-05-05 Thread Juha-Pekka Heikkila
context creation things have not yet settled properly. After this set Waffle is able to correctly report if there was failure during context creation, before this set only possible result is segfault. /Juha-Pekka Juha-Pekka Heikkila (13): mesa/meta: Don't free meta if it was never initialized i965

[Mesa-dev] [PATCH 01/13] mesa/meta: Don't free meta if it was never initialized

2015-05-05 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/drivers/common/meta.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index d2ab7b8..b2cb0d5 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src

[Mesa-dev] [PATCH 04/13] mesa/main: Don't go freeing pipeline data which is not reserved

2015-05-05 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/pipelineobj.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c index 0fefa7d..73a6af8 100644 --- a/src/mesa/main/pipelineobj.c

[Mesa-dev] [PATCH 08/13] mesa/main: Don't go deleting unallocated TransformFeedbackObjects

2015-05-05 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/transformfeedback.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/transformfeedback.c b/src/mesa/main/transformfeedback.c index 103011c..cbf8598 100644 --- a/src

[Mesa-dev] [PATCH 07/13] mesa/main: Don't free unallocated vertex array state

2015-05-05 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/varray.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 42e7f89..b65e6ef 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main

[Mesa-dev] [PATCH 02/13] i965: If cache has no BO don't try to unmap BO

2015-05-05 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/drivers/dri/i965/brw_state_cache.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c index 157b33d

[Mesa-dev] [PATCH 05/13] mesa/program: Don't clear caches which are not allocated

2015-05-05 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/program/prog_cache.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/mesa/program/prog_cache.c b/src/mesa/program/prog_cache.c index ed93af7..eef5339 100644 --- a/src/mesa

[Mesa-dev] [PATCH 03/13] mesa/main: Don't go freeing texture data which was never allocated

2015-05-05 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/texstate.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 1af9d47..d133104 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa

[Mesa-dev] [PATCH 09/13] mesa/main: Don't free unallocated performance monitor

2015-05-05 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/performance_monitor.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/performance_monitor.c b/src/mesa/main/performance_monitor.c index 2d740da..292086c 100644 --- a/src

[Mesa-dev] [PATCH 12/13] mesa/main: Don't proceed on deleting null hash table

2015-05-05 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/hash.c b/src/mesa/main/hash.c index d04cccd..533b1d1 100644 --- a/src/mesa/main/hash.c +++ b/src/mesa/main/hash.c @@ -152,7

[Mesa-dev] [PATCH 13/13] mesa/main: Verify context creation on progress

2015-05-05 Thread Juha-Pekka Heikkila
Stop context creation if something failed. If something errored during context creation we'd segfault. Now will clean up and return error. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/shared.c | 66 +++--- 1 file

Re: [Mesa-dev] [PATCH 1/2] swrast: Fix rgba_draw_pixels with GL_COLOR_INDEX

2015-05-04 Thread Juha-Pekka Heikkila
These two patches Reviewed-and-tested-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com On 04.05.2015 12:24, Iago Toral Quiroga wrote: When we implemented the format conversion rewrite we forgot to handle GL_COLOR_INDEX here, which needs special handling. Fixes the following piglit test

Re: [Mesa-dev] [RFC PATCH 1/2] glsl: Transform pow(x, 4) into (x*x)*(x*x).

2015-04-23 Thread Juha-Pekka Heikkila
: 6099580 - 6099443 (-0.00%) instructions in affected programs: 47526 - 47389 (-0.29%) helped:137 Ping. Patch look ok to me. Reviewed-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com ___ mesa-dev mailing list

Re: [Mesa-dev] [PATCH 07/23] ir_to_mesa: Add support for ir_triop_csel

2015-03-25 Thread Juha-Pekka Heikkila
Took a moment to understand how this works but I think it does. Reviewed-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com /Juha-Pekka On 20.03.2015 22:58, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com The only drivers that use this path are i915 and swrast. Both

[Mesa-dev] [PATCH] Mesa: Add generated files to .gitignore

2015-03-09 Thread Juha-Pekka Heikkila
src/egl/main/.install-mesa-links src/glx/.install-mesa-links src/mapi/.install-mesa-links src/mesa/drivers/dri/i965/test_fs_cmod_propagation src/mesa/drivers/dri/i965/test_fs_saturate_propagation added to .gitignore files on their own directories Signed-off-by: Juha-Pekka Heikkila

Re: [Mesa-dev] [PATCH] i965: Use new/delete instead of realloc() in brw_ir_allocator.h

2015-02-11 Thread Juha-Pekka Heikkila
On 11.02.2015 19:02, Matt Turner wrote: On Wed, Feb 11, 2015 at 6:37 AM, Juha-Pekka Heikkila juhapekka.heikk...@gmail.com wrote: There is no error path available thus instead of giving realloc possibility to fail use new which will never return null pointer and throws bad_alloc on failure

[Mesa-dev] [PATCH] i965: Use new/delete instead of realloc() in brw_ir_allocator.h

2015-02-11 Thread Juha-Pekka Heikkila
There is no error path available thus instead of giving realloc possibility to fail use new which will never return null pointer and throws bad_alloc on failure. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/drivers/dri/i965/brw_ir_allocator.h | 19

[Mesa-dev] [PATCH] i965: Use new/delete instead of realloc() in brw_ir_allocator.h

2015-02-11 Thread Juha-Pekka Heikkila
There is no error path available thus instead of giving realloc possibility to fail use new which will never return null pointer and throws bad_alloc on failure. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/drivers/dri/i965/brw_ir_allocator.h | 16

[Mesa-dev] [PATCH 3/6] meta: react to errors in create_texture_for_pbo()

2015-02-10 Thread Juha-Pekka Heikkila
Check if we got requested temporary buffers and no NULL pointer. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- In original patch there was missing '*'s for tmp_pbo and tmp_tex. tmp_pbo will not get value if end up in rehashing and rehashing fails. If tmp_tex does not get

[Mesa-dev] [PATCH 6/6] nir: check malloc return value in print_block()

2015-02-10 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/glsl/nir/nir_print.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/glsl/nir/nir_print.c b/src/glsl/nir/nir_print.c index 9c07950..c250850 100644 --- a/src/glsl/nir/nir_print.c +++ b/src/glsl/nir/nir_print.c

[Mesa-dev] [PATCH 1/6] mesa/main: in _mesa_unpack_color_index_to_rgba_ubyte() check allocated pointers

2015-01-26 Thread Juha-Pekka Heikkila
Check we really got memory we were asking for. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/pack.c | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/main/pack.c b/src/mesa/main/pack.c index d1f368c..da2128d 100644 --- a/src/mesa/main/pack.c

[Mesa-dev] [PATCH 0/6] Klocwork set again

2015-01-26 Thread Juha-Pekka Heikkila
Regular patch set about klocwork complaints to avoid segfaulting. /Juha-Pekka Juha-Pekka Heikkila (6): mesa/main: in _mesa_unpack_color_index_to_rgba_ubyte() check allocated pointers nir: Check in register_*_instr() after null pointers meta: react to NULL pointers

Re: [Mesa-dev] [PATCH 3/5] nir: add new constant folding infrastructure

2015-01-26 Thread Juha-Pekka Heikkila
On 20.01.2015 21:43, Jason Ekstrand wrote: On Mon, Jan 19, 2015 at 5:01 PM, Connor Abbott cwabbo...@gmail.com mailto:cwabbo...@gmail.com wrote: On Mon, Jan 19, 2015 at 4:04 PM, Jason Ekstrand ja...@jlekstrand.net mailto:ja...@jlekstrand.net wrote: I've got some specific

[Mesa-dev] [PATCH 2/6] nir: Check in register_*_instr() after null pointers

2015-01-26 Thread Juha-Pekka Heikkila
If _mesa_set_create() return null there is low memory. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/glsl/nir/nir_lower_vars_to_ssa.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/glsl/nir/nir_lower_vars_to_ssa.c b/src/glsl/nir

[Mesa-dev] [PATCH 3/6] meta: react to NULL pointers in create_texture_for_pbo()

2015-01-26 Thread Juha-Pekka Heikkila
Check if null pointers were given and bail out. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/drivers/common/meta_tex_subimage.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/src/mesa/drivers/common/meta_tex_subimage.c b/src/mesa/drivers/common

[Mesa-dev] [PATCH 5/6] nir: in insert_phi_nodes() check memory allocations succeeded.

2015-01-26 Thread Juha-Pekka Heikkila
Report memory error and bail out on failure. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/glsl/nir/nir_to_ssa.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/glsl/nir/nir_to_ssa.c b/src/glsl/nir/nir_to_ssa.c index 9c577fa

[Mesa-dev] [PATCH 4/6] util: in _mesa_set_create() mark error if out of memory

2015-01-26 Thread Juha-Pekka Heikkila
added calls to _mesa_error_no_memory() if memory allocation returned null pointer. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/util/set.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/set.c b/src/util/set.c index c3252a0..b0baccc

[Mesa-dev] [PATCH 6/6] nir: check malloc return value in print_block()

2015-01-26 Thread Juha-Pekka Heikkila
report error on null return value and bail out. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/glsl/nir/nir_print.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/glsl/nir/nir_print.c b/src/glsl/nir/nir_print.c index 9c07950..79c4cd8 100644 --- a/src/glsl

[Mesa-dev] [PATCH] mesa/main: In _mesa_CompressedTextureSubImage3D() check found texObj

2015-01-12 Thread Juha-Pekka Heikkila
Check returned texObj is not null. If texObj is null there is already GL_INVALID_OPERATION error set. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/teximage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/main/teximage.c b/src/mesa/main

[Mesa-dev] [PATCH] mapi: add glapi-test and shared-glapi-test to .gitignore

2014-12-14 Thread Juha-Pekka Heikkila
On the same go remove src/mapi/shared-glapi/tests/.gitignore and src/mapi/glapi/tests/.gitignore as useless. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mapi/.gitignore| 2 ++ src/mapi/glapi/tests/.gitignore| 1 - src/mapi/shared-glapi

[Mesa-dev] [PATCH] util: add u_atomic_test to .gitignore

2014-12-14 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/util/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/.gitignore b/src/util/.gitignore index e945ecb..ecf4985 100644 --- a/src/util/.gitignore +++ b/src/util/.gitignore @@ -1 +1,2 @@ format_srgb.c

[Mesa-dev] [PATCH] i965: add test_vf_float_conversions to .gitignore

2014-12-12 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/drivers/dri/i965/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/.gitignore b/src/mesa/drivers/dri/i965/.gitignore index cb66728..8eb9f4e 100644 --- a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH] mapi: add shared-glapi-test to .gitignore

2014-12-12 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mapi/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/mapi/.gitignore diff --git a/src/mapi/.gitignore b/src/mapi/.gitignore new file mode 100644 index 000..060683b --- /dev/null +++ b/src/mapi

[Mesa-dev] [PATCH] glx: remove __glXstrdup()

2014-12-12 Thread Juha-Pekka Heikkila
I didn't find this being used anywhere Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/glx/glxclient.h | 3 --- src/glx/glxcmds.c | 17 - 2 files changed, 20 deletions(-) diff --git a/src/glx/glxclient.h b/src/glx/glxclient.h index 74c19c4..aaca989

[Mesa-dev] [PATCH 13/13] mesa/main: Verify context creation on progress

2014-12-03 Thread Juha-Pekka Heikkila
Stop context creation if something failed. If something errored during context creation we'd segfault. Now will clean up and return error. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/shared.c | 66 +++--- 1 file

[Mesa-dev] [PATCH 01/13] mesa/meta: Don't free meta if it was never initialized

2014-12-02 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/drivers/common/meta.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 87532c1..e106899 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src

[Mesa-dev] [PATCH 03/13] mesa/main: Don't go freeing texture data which was never allocated

2014-12-02 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/texstate.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index e0f0852..6f7d781 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa

[Mesa-dev] [PATCH 13/13] mesa/main: Verify context creation on progress

2014-12-02 Thread Juha-Pekka Heikkila
Stop context creation if something failed. If something errored during context creation we'd segfault. Now will clean up and return error. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/shared.c | 63 ++ 1 file

[Mesa-dev] [PATCH] i965: Make validate_reg tables constant

2014-12-01 Thread Juha-Pekka Heikkila
Declare local tables constant. Also added extra '32' at end of width_for_reg to be future proof, cvt function which give indexes to access here could already give index to reach place number five now containing '32'. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa

[Mesa-dev] [PATCH 01/13] mesa/meta: Don't free meta if it was never initialized

2014-11-28 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/drivers/common/meta.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c index 87532c1..fab360d 100644 --- a/src/mesa/drivers/common/meta.c +++ b/src

[Mesa-dev] [PATCH 02/13] i965: If cache has no BO don't try to unmap BO

2014-11-28 Thread Juha-Pekka Heikkila
Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/drivers/dri/i965/brw_state_cache.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_state_cache.c b/src/mesa/drivers/dri/i965/brw_state_cache.c index cf42ada

[Mesa-dev] [PATCH 00/13] Fix context creation error handling

2014-11-28 Thread Juha-Pekka Heikkila
in Piglit start to pass. /Juha-Pekka Juha-Pekka Heikkila (13): mesa/meta: Don't free meta if it was never initialized i965: If cache has no BO don't try to unmap BO mesa/main: Don't go freeing texture data which was never allocated mesa/main: Don't go freeing pipeline data which is not reserved

[Mesa-dev] [PATCH 10/13] mesa/main: Check context pointer in _mesa_error before using it

2014-11-28 Thread Juha-Pekka Heikkila
I guess this should not really be able to segfault but still it seems to be able to during context creation. Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/main/errors.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git

[Mesa-dev] [PATCH 11/13] i965: Add missing return on error path

2014-11-28 Thread Juha-Pekka Heikkila
If there was memory allocation failure have to return away from brw_new_buffer_object Signed-off-by: Juha-Pekka Heikkila juhapekka.heikk...@gmail.com --- src/mesa/drivers/dri/i965/intel_buffer_objects.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965

  1   2   3   4   >