Re: [Mesa-dev] [RFC 4/6] i965: Implement INTEL_performance_query extension

2015-05-28 Thread Petri Latvala
(Stream 1)", + "N stream-out (stream 1) primitives (written)"), + NAMED_STAT(GEN7_SO_NUM_PRIMS_WRITTEN(2), "SO_NUM_PRIMS_WRITTEN (Stream 2)", + "N stream-out (stream 2) primitives (written)"), + NAMED_STAT(GEN7_SO_NUM_PRIMS_WRITTEN(3), &qu

Re: [Mesa-dev] [PATCH v2 12/15] nv50/ir: optimize the use of std::tr1::unordered_set

2015-05-20 Thread Petri Latvala
On 05/20/2015 06:30 AM, Ilia Mirkin wrote: +typedef const iterator const_iterator; + This at least is wrong. A const iterator allows *iter = val, a const_iterator doesn't. A const_iterator allows ++, a const iterator doesn't. -- Pet

Re: [Mesa-dev] [RFC 01/16] glsl: Add tracking for GLSL precision qualifiers

2015-05-18 Thread Petri Latvala
e. */ int stream; + + /** +* Precission qualifier +*/ + unsigned precision; }; Typo in the comment, "Precision". Is there a piglit test for uniforms with different precisions? That should be mentioned in the commit

Re: [Mesa-dev] [PATCH 9/9] mark GL_ARB_framebuffer_no_attachments as done for i965

2015-04-29 Thread Petri Latvala
GL_ARB_invalidate_subdataDONE (all drivers) GL_ARB_multi_draw_indirect DONE (i965, nvc0, r600, radeonsi, llvmpipe, softpipe) At the bottom is another block with GLES 3.1 requirements, which also contains GL_ARB_f_n_a. -- Petri Latvala

Re: [Mesa-dev] [PATCH v2] mesa: add support for exposing up to GL4.2

2015-04-24 Thread Petri Latvala
On 04/23/2015 07:28 PM, Ilia Mirkin wrote: Add the 4.0/4.1/4.2 extensions lists to compute_version. A coule of extensions aren't in mesa yet, so those are marked with 0 until they become supported. Signed-off-by: Ilia Mirkin coule -> couple. -- Petri

Re: [Mesa-dev] Precision of float and trigonometric functions on i965

2014-12-11 Thread Petri Latvala
s a known issue, right? Also, considering that sin() is implemented as a single Math hardware instruction I imagine there is little that software can do to correct this in any case... According to the hw specs, sin and cos absolute error is <= 0.0008, but only for the range of +/- 100 * pi. --

Re: [Mesa-dev] [PATCH] i965: Fix an off-by-1 error in the draw upload code's size calculation.

2014-10-24 Thread Petri Latvala
x27;t give this perf warning. Natural Selection 2 gives perf warnings that are similar to this case. Haven't tested with this patch, unknown whether it's the same issue there. Maybe Eero can test the patch with NS2? -- Petri Latvala ___ m

Re: [Mesa-dev] [PATCH 9/9] glsl: Add tests for minmax prune

2014-08-18 Thread Petri Latvala
On 08/13/2014 01:59 AM, Dylan Baker wrote: On Tuesday, July 29, 2014 12:36:39 PM Petri Latvala wrote: tests/minmax/create_test_cases.py generates the following tests: multiple_min*.opt_test: Construct a tree of min expressions for all permutations of a var_ref and three constants. They

Re: [Mesa-dev] [PATCH 3/9] glsl: Refactor the python test case generator

2014-08-18 Thread Petri Latvala
On 08/13/2014 01:51 AM, Dylan Baker wrote: On Tuesday, July 29, 2014 12:36:33 PM Petri Latvala wrote: Move the IR sexp builder helpers and test script creation parts of tests/lower_jumps/create_test_cases.py into tests/test_case_generator.py No functional changes. Signed-off-by: Petri Latvala

Re: [Mesa-dev] [PATCH] squash! glsl: Optimize min/max expression trees

2014-08-18 Thread Petri Latvala
On 08/14/2014 11:00 AM, Connor Abbott wrote: Another thing I'd like to see is to change minmax_range to call things "low" and "high" instead of "range[0]" and "range[1]." This helps readability, and the tricks with indirect addressing that having an array lets you do are things we really should

Re: [Mesa-dev] [PATCH] squash! glsl: Optimize min/max expression trees

2014-08-18 Thread Petri Latvala
On 08/14/2014 07:04 AM, Matt Turner wrote: --- I'd squash this in at minimum. The changes are - Whitespace - Removal of unnecessary destructor - Renaming "one" and "two" to "a" and "b" (one->value.u[c0] < two->value.u[c0]...) - continue -> break - assert(!...) -> unreachable - Not d

Re: [Mesa-dev] [PATCH 1/9] glsl: Optimize min/max expression trees

2014-08-18 Thread Petri Latvala
On 08/14/2014 04:33 AM, Ian Romanick wrote: On 07/29/2014 02:36 AM, Petri Latvala wrote: Add an optimization pass that drops min/max expression operands that can be proven to not contribute to the final result. The algorithm is similar to alpha-beta pruning on a minmax search, from the field of

[Mesa-dev] [PATCH 1/9] glsl: Optimize min/max expression trees

2014-07-29 Thread Petri Latvala
000)) operand, which was compiled to a saturate modifier. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76861 Signed-off-by: Petri Latvala --- src/glsl/Makefile.sources | 1 + src/glsl/glsl_parser_extras.cpp | 1 + src/glsl/ir_optimization.h | 1 + src/glsl/opt_minm

[Mesa-dev] [PATCH 9/9] glsl: Add tests for minmax prune

2014-07-29 Thread Petri Latvala
mpare as less, some as greater. Signed-off-by: Petri Latvala --- src/glsl/tests/minmax/.gitignore | 3 + src/glsl/tests/minmax/create_test_cases.py | 151 + 2 files changed, 154 insertions(+) create mode 100644 src/glsl/tests/minmax/.gitignore create

[Mesa-dev] [PATCH 4/9] glsl: Make compare_ir sort expression operands for commutative operations

2014-07-29 Thread Petri Latvala
Sort expression operands when possible so that building expected IR sexps doesn't need to know which ordering will be produced by an optimization pass. Signed-off-by: Petri Latvala --- src/glsl/tests/compare_ir | 4 ++-- src/glsl/tests/sexps.py | 37 +++

[Mesa-dev] [PATCH 3/9] glsl: Refactor the python test case generator

2014-07-29 Thread Petri Latvala
Move the IR sexp builder helpers and test script creation parts of tests/lower_jumps/create_test_cases.py into tests/test_case_generator.py No functional changes. Signed-off-by: Petri Latvala --- src/glsl/tests/lower_jumps/create_test_cases.py | 336 +++- src/glsl/tests

[Mesa-dev] [PATCH 7/9] glsl: Add min and max IR sexp creation functions to test_case_generator.py

2014-07-29 Thread Petri Latvala
Signed-off-by: Petri Latvala --- src/glsl/tests/test_case_generator.py | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/glsl/tests/test_case_generator.py b/src/glsl/tests/test_case_generator.py index 6633702..5f550df 100644 --- a/src/glsl/tests/test_case_generator.py

[Mesa-dev] [PATCH 0/9] Optimize min/max expressions

2014-07-29 Thread Petri Latvala
he 0.0 constant was dropped, which then resulted in shorter IR code but longer shader binary. No changes in piglit results. Patch 9 adds unit tests for the pass. Petri Latvala (9): glsl: Optimize min/max expression trees glsl: Fix directory handling in optimization-test glsl: Refactor the pytho

[Mesa-dev] [PATCH 2/9] glsl: Fix directory handling in optimization-test

2014-07-29 Thread Petri Latvala
../.. instead. Hardcoding that is finicky too, so wrap the directory change and script execution in a subshell instead. In case of errors executing create_test_cases.py, exit with status 1 to make the test run communicate failure properly. Signed-off-by: Petri Latvala --- src/glsl/tests/optimization-test

[Mesa-dev] [PATCH 8/9] glsl: Add support for do_minmax_prune in test_optpass

2014-07-29 Thread Petri Latvala
Signed-off-by: Petri Latvala --- src/glsl/test_optpass.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glsl/test_optpass.cpp b/src/glsl/test_optpass.cpp index e4878bf..ef62752 100644 --- a/src/glsl/test_optpass.cpp +++ b/src/glsl/test_optpass.cpp @@ -131,6 +131,8 @@ do_optimization

[Mesa-dev] [PATCH 5/9] glsl: Generalize assignment and declaration IR sexp creation functions

2014-07-29 Thread Petri Latvala
Already-existing and used declare_temp() and assign_x() functions can then be implemented in terms of the general functions. Signed-off-by: Petri Latvala --- src/glsl/tests/test_case_generator.py | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/glsl

[Mesa-dev] [PATCH 6/9] glsl: Add const_vec4 IR sexp creation function to test_case_generator.py

2014-07-29 Thread Petri Latvala
Signed-off-by: Petri Latvala --- src/glsl/tests/test_case_generator.py | 4 1 file changed, 4 insertions(+) diff --git a/src/glsl/tests/test_case_generator.py b/src/glsl/tests/test_case_generator.py index 5df8420..6633702 100644 --- a/src/glsl/tests/test_case_generator.py +++ b/src/glsl

Re: [Mesa-dev] [PATCH 11/14] glsl: Implement saturate as ir_binop_saturate

2014-06-24 Thread Petri Latvala
On 06/24/2014 08:27 AM, Abdiel Janulgue wrote: Now that we have the ir_binop_saturate implemented as a single instruction, generate the correct simplified expression. s/binop_saturate/unop_saturate/ in subject and commit text. -- Petri Latvala

Re: [Mesa-dev] [PATCH 06/13] mesa: Remove unused functions from perfomance query code.

2014-06-16 Thread Petri Latvala
GLAPIENTRY Oh, bugger. Those functions were used at some point, but their lack of use after refactoring never came up. Reviewed-by: Petri Latvala ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa

Re: [Mesa-dev] [PATCH v3] glsl: parser changes for GL_ARB_explicit_uniform_location

2014-06-12 Thread Petri Latvala
Reviewed-by: Petri Latvala On 06/12/2014 10:46 AM, Tapani Pälli wrote: Patch adds a preprocessor define for the extension and stores explicit location data for uniforms during AST->HIR conversion. It also sets layout token to be available when having the extension in place. v2: change par

Re: [Mesa-dev] [PATCH 10/10] docs: update ARB_explicit_uniform_location status

2014-06-12 Thread Petri Latvala
Reviewed-by: Petri Latvala On 04/09/2014 12:56 PM, Tapani Pälli wrote: Signed-off-by: Tapani Pälli --- docs/GL3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index bf51e3a..245a045 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -148,7

Re: [Mesa-dev] [PATCH v2] Enable GL_ARB_explicit_uniform_location in the drivers.

2014-06-12 Thread Petri Latvala
Reviewed-by: Petri Latvala On 06/09/2014 01:06 PM, Tapani Pälli wrote: v2: enable also for i915 (Ian) Signed-off-by: Tapani Pälli --- src/mesa/drivers/dri/i915/intel_extensions.c | 1 + src/mesa/drivers/dri/i965/intel_extensions.c | 1 + src/mesa/state_tracker/st_extensions.c | 1

Re: [Mesa-dev] [PATCH v2] glsl: parser changes for GL_ARB_explicit_uniform_location

2014-06-11 Thread Petri Latvala
On 06/05/2014 08:08 AM, Tapani Pälli wrote: Patch adds a preprocessor define for the extension and stores explicit location data for uniforms during AST->HIR conversion. It also sets layout token to be available when having the extension in place. v2: change parser check to require GLSL 330 or

Re: [Mesa-dev] [PATCH 7/9] glsl: Make foreach macros usable from C by adding struct keyword.

2014-06-11 Thread Petri Latvala
cerned, `struct' class-key, `class' class-key and `union' class-key create "classes") In a nutshell, for Windows builds, struct and class must match. For testing on Linux, CXX=clang++ CXXFLAGS=-Werror=mismatched-tags. -- Petri Latvala __

Re: [Mesa-dev] [PATCH 19/20] mesa/main: Add missing null check in _mesa_CreatePerfQueryINTEL()

2014-05-15 Thread Petri Latvala
Reviewed-by: Petri Latvala On 05/14/2014 08:56 PM, Juha-Pekka Heikkila wrote: Signed-off-by: Juha-Pekka Heikkila --- src/mesa/main/performance_monitor.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/main/performance_monitor.c b/src/mesa/main/performance_monitor.c index

Re: [Mesa-dev] [PATCH 02/21] glsl: protect locale_t with a mutex

2014-05-06 Thread Petri Latvala
} }; static loc_initializer loc_init; Any global object constructor that might use loc will have to #include strtod.h, therefore loc_init will appear first in that TU, and will initialize first. A real-world example would be std::_Init that initializes std::cout and its pals. -

Re: [Mesa-dev] [PATCH] Add an ir_triop_mid3 expression and lower it to mins and maxs.

2014-04-30 Thread Petri Latvala
On 04/29/2014 09:57 PM, Matt Turner wrote: On Tue, Apr 29, 2014 at 6:01 AM, Petri Latvala wrote: For the record, tested this with the following shader: Cool. Please submit this as a piglit test. Sent to piglit mailing list, with accompanying tests for min3 and max3. Wouldn't

Re: [Mesa-dev] [PATCH] Add an ir_triop_mid3 expression and lower it to mins and maxs.

2014-04-29 Thread Petri Latvala
Just noticed that this obviously conflicts with Ilia Mirkin's patches for lowering of carry/borrow. I'll rebase and resend once those land. -- Petri Latvala ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freed

[Mesa-dev] [PATCH] Add an ir_triop_mid3 expression and lower it to mins and maxs.

2014-04-29 Thread Petri Latvala
. Tested on i965/Haswell. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76861 Signed-off-by: Petri Latvala --- For the record, tested this with the following shader: #extension GL_AMD_shader_trinary_minmax : require uniform float zero; uniform float one; uniform float middle; float

[Mesa-dev] [PATCH 5/6] i965: Enable INTEL_performance_query for Gen5+.

2014-04-23 Thread Petri Latvala
Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/intel_extensions.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 892a048..d6e1494 100644 --- a/src/mesa/drivers

[Mesa-dev] [PATCH 2/6] mesa: Add INTEL_performance_query enums to tests/enum_strings.cpp

2014-04-23 Thread Petri Latvala
Signed-off-by: Petri Latvala Reviewed-by: Ian Romanick --- src/mesa/main/tests/enum_strings.cpp | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/mesa/main/tests/enum_strings.cpp b/src/mesa/main/tests/enum_strings.cpp index 3795700..d16eb36 100644 --- a/src/mesa/main

[Mesa-dev] [PATCH 6/6] docs: update 10.2 release notes

2014-04-23 Thread Petri Latvala
Signed-off-by: Petri Latvala --- docs/relnotes/10.2.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/relnotes/10.2.html b/docs/relnotes/10.2.html index d7d557b..473739c 100644 --- a/docs/relnotes/10.2.html +++ b/docs/relnotes/10.2.html @@ -47,6 +47,7 @@ Note: some of the new

[Mesa-dev] [PATCH 0/6] v3: Implement INTEL_performance_query

2014-04-23 Thread Petri Latvala
just be too paranoid and wary. Summarum, there's more changes for this extension incoming, and that sort of cleanup can be part of it if so desired. I will need someone to push this btw. Petri Latvala (6): Regenerate gl_mangle.h. mesa: Add INTEL_performance_query enums to tests/enum_strings.c

[Mesa-dev] [PATCH 4/6] mesa: Implement INTEL_performance_query.

2014-04-23 Thread Petri Latvala
Using the existing driver hooks made for AMD_performance_monitor, implement INTEL_performance_query functions. v2: Whitespace changes. v3: Whitespace changes, add a _mesa_warning() Signed-off-by: Petri Latvala Reviewed-by: Ian Romanick --- src/mesa/main/performance_monitor.c | 487

[Mesa-dev] [PATCH 3/6] mesa: Add core support for the GL_INTEL_performance_query extension.

2014-04-23 Thread Petri Latvala
expose the functions to GLES2. v4: Whitespace changes, static_dispatch="false" for all functions, fix dispatch_sanity test for GLES2 functions Signed-off-by: Petri Latvala Reviewed-by: Ian Romanick --- src/mapi/glapi/gen/INTEL_performance_query.xml | 93 +++ src/mapi

Re: [Mesa-dev] [PATCH 5/6] mesa: Implement INTEL_performance_query.

2014-04-22 Thread Petri Latvala
On 04/19/2014 12:34 AM, Ian Romanick wrote: On 03/17/2014 01:43 AM, Petri Latvala wrote: + if (queryName) { + strncpy(queryName, group_obj->Name, queryNameLength); + /* No specification given about whether the string needs to be + * zero-terminated. Zero-terminate the str

Re: [Mesa-dev] [PATCH 03/10] mesa: add new enum MAX_UNIFORM_LOCATIONS

2014-04-09 Thread Petri Latvala
uot;, "CONTEXT_INT(Const.MaxUserAssignableUniformLocations), NO_EXTRA" ], [ "NAME_STACK_DEPTH", "CONTEXT_INT(Select.NameStackDepth), NO_EXTRA" ], [ "PACK_LSB_FIRST", "CONTEXT_BOOL(Pack.LsbFirst), NO_EXTRA" ], [ "PACK_SWAP_BYTES&quo

[Mesa-dev] [PATCH] mesa: Add core support for the GL_INTEL_performance_query extension.

2014-04-03 Thread Petri Latvala
expose the functions to GLES2. Signed-off-by: Petri Latvala --- src/mapi/glapi/gen/INTEL_performance_query.xml | 93 src/mapi/glapi/gen/Makefile.am | 1 + src/mapi/glapi/gen/gl_API.xml | 2 + src/mesa/main/config.h | 8

[Mesa-dev] [PATCH 6/6] i965: Enable INTEL_performance_query for Gen5+.

2014-03-17 Thread Petri Latvala
Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/intel_extensions.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 2a68758..5dbd1e6 100644 --- a/src/mesa/drivers

[Mesa-dev] [PATCH 5/6] mesa: Implement INTEL_performance_query.

2014-03-17 Thread Petri Latvala
Using the existing driver hooks made for AMD_performance_monitor, implement INTEL_performance_query functions. v2: Whitespace changes. Signed-off-by: Petri Latvala --- src/mesa/main/performance_monitor.c | 472 1 file changed, 431 insertions(+), 41

[Mesa-dev] [PATCH 3/6] mesa: Add INTEL_performance_query enums to tests/enum_strings.cpp

2014-03-17 Thread Petri Latvala
Signed-off-by: Petri Latvala --- src/mesa/main/tests/enum_strings.cpp | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/mesa/main/tests/enum_strings.cpp b/src/mesa/main/tests/enum_strings.cpp index 3795700..d16eb36 100644 --- a/src/mesa/main/tests/enum_strings.cpp

[Mesa-dev] [PATCH 0/6] v2: Implement INTEL_performance_query

2014-03-17 Thread Petri Latvala
Second revision for patch series that implements the INTEL_performance_query extension. Changes: Import glext.h instead of adding definitions to gl.h, fix whitespace changes caused by folding into the wrong commit. Petri Latvala (6): mesa: update glext.h to version 20140313 Regenerate

[Mesa-dev] [PATCH 4/6] mesa: Add core support for the GL_INTEL_performance_query extension.

2014-03-17 Thread Petri Latvala
get the names, types, and minimum/maximum values of all available counters. Applications create performance queries based on available query types, and begin/end measurement collection. Multiple queries can be measuring simultaneously. v2: Whitespace changes. Signed-off-by: Petri Latvala --- src

[Mesa-dev] [PATCH 1/6] mesa: update glext.h to version 20140313

2014-03-17 Thread Petri Latvala
--- include/GL/glext.h | 82 ++ 1 file changed, 76 insertions(+), 6 deletions(-) diff --git a/include/GL/glext.h b/include/GL/glext.h index 62bae4c..a626580 100644 --- a/include/GL/glext.h +++ b/include/GL/glext.h @@ -6,7 +6,7 @@ extern "C" { #

Re: [Mesa-dev] [PATCH 0/6] Implement INTEL_performance_query

2014-03-12 Thread Petri Latvala
bjects are accessible only through the extension that created them is something that needs to be done, but I'm not sure what would be the best way. Comments and hits welcome. -- Petri Latvala ___ mesa-dev mailing list mesa-dev@lists.freed

Re: [Mesa-dev] [PATCH 6/6] i965: Enable INTEL_performance_query for Gen5+.

2014-03-12 Thread Petri Latvala
On 03/12/2014 03:17 PM, Dragomir Ivanov wrote: What about other drivers supporting `AMD_performance_monitor`? Are there any? Other drivers don't support it. -- Petri Latvala ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

[Mesa-dev] [PATCH 3/6] mesa: Add INTEL_performance_query enums to tests/enum_strings.cpp

2014-03-12 Thread Petri Latvala
Signed-off-by: Petri Latvala --- src/mesa/main/tests/enum_strings.cpp | 18 ++ 1 file changed, 18 insertions(+) diff --git a/src/mesa/main/tests/enum_strings.cpp b/src/mesa/main/tests/enum_strings.cpp index 3795700..d16eb36 100644 --- a/src/mesa/main/tests/enum_strings.cpp

[Mesa-dev] [PATCH 5/6] mesa: Implement INTEL_performance_query.

2014-03-12 Thread Petri Latvala
Using the existing driver hooks made for AMD_performance_monitor, implement INTEL_performance_query functions. Signed-off-by: Petri Latvala --- src/mesa/main/performance_monitor.c | 476 +--- 1 file changed, 439 insertions(+), 37 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 6/6] i965: Enable INTEL_performance_query for Gen5+.

2014-03-12 Thread Petri Latvala
Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/intel_extensions.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index 5094c2b..78bf5b4 100644 --- a/src/mesa/drivers

[Mesa-dev] [PATCH 0/6] Implement INTEL_performance_query

2014-03-12 Thread Petri Latvala
are exposed as "RAW" without per-second maximum). Pseudo-counters for things like "time spent in shader compilation" or "forced recompilation event count". Piglit tests for this extension have been sent to piglit mailing list. All tests pass.

[Mesa-dev] [PATCH 1/6] mesa: Add GL_INTEL_performance_query definitions

2014-03-12 Thread Petri Latvala
Until Khronos adds the definitions to glext.h, add definitions for this extension to gl.h. Signed-off-by: Petri Latvala --- include/GL/gl.h | 45 + 1 file changed, 45 insertions(+) diff --git a/include/GL/gl.h b/include/GL/gl.h index 4e2932d..e2caf73

[Mesa-dev] [PATCH 4/6] mesa: Add core support for the GL_INTEL_performance_query extension.

2014-03-12 Thread Petri Latvala
get the names, types, and minimum/maximum values of all available counters. Applications create performance queries based on available query types, and begin/end measurement collection. Multiple queries can be measuring simultaneously. Signed-off-by: Petri Latvala --- src/mapi/glapi/gen

Re: [Mesa-dev] [PATCH 1/4] mesa/main: add ARB_clear_texture entrypoints

2014-03-06 Thread Petri Latvala
2011 }, Move that line one line up to get the list alphabetically sorted. -- Petri Latvala ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 2/2] i965: Assert array index on access to vec4_visitor's arrays.

2014-02-27 Thread Petri Latvala
v2: vec4_visitor::pack_uniform_registers(): Use correct comparison in the assert, this->uniforms is already adjusted. Compare the actual value used to index uniform_size and uniform_vector_size instead. Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/brw_vec4.cpp

[Mesa-dev] [PATCH 0/2] v5: Fix array overrun with too many uniforms

2014-02-27 Thread Petri Latvala
Fixing https://bugs.freedesktop.org/show_bug.cgi?id=71254 once again. Rebased for current master, plumbing-class changes to patch 1/2. Fixed one of the asserts in patch 2/2. Full piglit run shows no regressions. Petri Latvala (2): i965: Allocate vec4_visitor's uniform_siz

[Mesa-dev] [PATCH 1/2] i965: Allocate vec4_visitor's uniform_size and uniform_vector_size arrays dynamically.

2014-02-27 Thread Petri Latvala
vec4_visitor constructor is NULL v4: Rebase for current master Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71254 Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/brw_vec4.h | 5 +++-- src/mesa/drivers/dri/i965/brw_vec4_gs.c| 5 + src/mesa/dri

Re: [Mesa-dev] [PATCH 2/2] i965: Assert array index on access to vec4_visitor's arrays.

2014-02-27 Thread Petri Latvala
lt json directly, all those assert failures are this one. *quick debugging build later* And all those asserts hit because uniforms == uniform_array_size. Fix is on the way. -- Petri Latvala ___ mesa-dev mailing list mesa-dev@lists.freedesktop.

Re: [Mesa-dev] [PATCH 3/3] glx: add missing null check in SendMakeCurrentRequest

2014-02-11 Thread Petri Latvala
| (priv->minorVersion >= 3)) { xGLXMakeContextCurrentReq *req; GetReq(GLXMakeContextCurrent, req); If priv is NULL, this code still accesses priv->minorVersion. You need if (priv && ((priv->majorVersion > 1) || (priv->minorVersion >= 3))) -- Petri Latval

Re: [Mesa-dev] [PATCH 0/2] v4: Fix array overrun with too many uniforms

2014-02-05 Thread Petri Latvala
On 12/30/2013 11:44 AM, Petri Latvala wrote: Fourth version of patch series. - Fixed vec4_register_coalesce unit test. That test passes NULL for prog_data, which Mesa proper doesn't do. - Renamed uniform_param_count to uniform_array_size. - Used ALIGN() to round up when dividing buffer

[Mesa-dev] [PATCH 0/2] v4: Fix array overrun with too many uniforms

2013-12-30 Thread Petri Latvala
ximum manually. Petri Latvala (2): i965: Allocate vec4_visitor's uniform_size and uniform_vector_size arrays dynamically. i965: Assert array index on access to vec4_visitor's arrays. src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 ++ src/mesa/drivers/dri/i965/brw_vec4.h

[Mesa-dev] [PATCH 2/2] i965: Assert array index on access to vec4_visitor's arrays.

2013-12-30 Thread Petri Latvala
Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 ++ src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 ++ 2 files changed, 8 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index fb57707

[Mesa-dev] [PATCH 1/2] i965: Allocate vec4_visitor's uniform_size and uniform_vector_size arrays dynamically.

2013-12-30 Thread Petri Latvala
vec4_visitor constructor is NULL Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71254 Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/brw_vec4.h | 5 +++-- src/mesa/drivers/dri/i965/brw_vec4_gs.c| 5 + src/mesa/drivers/dri/i965/brw_vec4_vis

Re: [Mesa-dev] [PATCH 1/2] i965: Allocate vec4_visitor's uniform_size and uniform_vector_size arrays dynamically.

2013-12-30 Thread Petri Latvala
On 12/20/2013 08:54 PM, Ian Romanick wrote: This patch breaks the test_vec4_register_coalesce unit test. Did you run 'make check'? I thought I did, but turns out I didn't. Just ran piglit tests. Fix coming up. -- Petri Latvala _

Re: [Mesa-dev] [PATCH 1/2] i965: Allocate vec4_visitor's uniform_size and uniform_vector_size arrays dynamically.

2013-12-30 Thread Petri Latvala
On 12/20/2013 09:26 PM, Kenneth Graunke wrote: On 11/27/2013 05:28 AM, Petri Latvala wrote: v2: Don't add function parameters, pass the required size in prog_data->nr_params. Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/brw_vec4.h | 5 +++-- src/mesa/dri

Re: [Mesa-dev] [PATCH 0/2] v3: Fix array overrun with too many uniforms

2013-12-17 Thread Petri Latvala
On 11/27/2013 03:28 PM, Petri Latvala wrote: Third version of this patch series sent in full Ping? Comments, NAKs, ACKs...? -- Petri Latvala ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo

Re: [Mesa-dev] [PATCH 06/23] i965: Define common register base class shared between both back-ends.

2013-12-02 Thread Petri Latvala
fs_reg constructor. For the record, this->backend_reg::operator=(reg) would have done what you aimed for. Not saying it kosher either way though, calling assignment operator in a constructor is iffy :P. The proper way is selecting the correct base class

Re: [Mesa-dev] Fw: Taking part in MESA development - Dissertation Project

2013-11-28 Thread Petri Latvala
On 11/28/2013 11:15 PM, Timothy Arceri wrote: Hi guys, I received the following submitted as an Issue on my github account. Maybe someone here has a project they can suggest. Is NewbieProjects too "newbie" for this? http://wiki.freedesktop.org/dri/NewbieProjects/ -- Pet

[Mesa-dev] [PATCH 2/2] i965: Assert array index on access to vec4_visitor's arrays.

2013-11-27 Thread Petri Latvala
Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 ++ src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 ++ 2 files changed, 8 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 73f91a0

[Mesa-dev] [PATCH 1/2] i965: Allocate vec4_visitor's uniform_size and uniform_vector_size arrays dynamically.

2013-11-27 Thread Petri Latvala
v2: Don't add function parameters, pass the required size in prog_data->nr_params. Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/brw_vec4.h | 5 +++-- src/mesa/drivers/dri/i965/brw_vec4_gs.c| 5 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 7

[Mesa-dev] [PATCH 0/2] v3: Fix array overrun with too many uniforms

2013-11-27 Thread Petri Latvala
ing somewhere earlier. Extra means something like 3 or 7 too much, not a factor too much. I removed the noncopyable chunk by request too, that will possibly be sent later in a separate patch. Petri Latvala (2): i965: Allocate vec4_visitor's uniform_size and uniform_vector_size

Re: [Mesa-dev] [PATCH 1/2] i965: Allocate vec4_visitor's uniform_size and uniform_vector_size arrays dynamically.

2013-11-25 Thread Petri Latvala
On 11/22/2013 08:05 PM, Francisco Jerez wrote: Petri Latvala writes: [...] @@ -325,8 +326,9 @@ public: */ dst_reg output_reg[BRW_VARYING_SLOT_COUNT]; const char *output_reg_annotation[BRW_VARYING_SLOT_COUNT]; - int uniform_size[MAX_UNIFORMS]; - int uniform_vector_size

[Mesa-dev] [PATCH 2/2] i965: Assert array index on access to vec4_visitor's arrays.

2013-11-22 Thread Petri Latvala
Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 ++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index df38dab..511b080 100644 --- a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 0/2] v2: Fix array overrun with too many uniforms

2013-11-22 Thread Petri Latvala
it is internal. Petri Latvala (2): i965: Allocate vec4_visitor's uniform_size and uniform_vector_size arrays dynamically. i965: Assert array index on access to vec4_visitor's arrays. src/mesa/drivers/dri/i965/brw_vec4.cpp| 5 +++-- src/mesa/drivers/dri/

[Mesa-dev] [PATCH 1/2] i965: Allocate vec4_visitor's uniform_size and uniform_vector_size arrays dynamically.

2013-11-22 Thread Petri Latvala
Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/brw_vec4.cpp| 5 +++-- src/mesa/drivers/dri/i965/brw_vec4.h | 14 +++--- src/mesa/drivers/dri/i965/brw_vec4_gs.c | 2 +- src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp | 12

[Mesa-dev] [PATCH 1/2] Increase array sizes to what they should be.

2013-11-08 Thread Petri Latvala
vec4_visitor's uniform_size and uniform_vector_size arrays contain information about uniforms. Their size should be the number of uniform components (MAX_UNIFORMS * 4) instead of number of uniform vec4s (MAX_UNIFORMS). Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/brw_vec4.

[Mesa-dev] [PATCH 0/2] Fix array overrun on too many uniforms

2013-11-08 Thread Petri Latvala
mpile. Petri Latvala (2): Increase array sizes to what they should be. Check access to vec4_visitor's arrays src/mesa/drivers/dri/i965/brw_vec4.cpp | 3 +++ src/mesa/drivers/dri/i965/brw_vec4.h | 4 ++-- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 ++ src/mesa/d

[Mesa-dev] [PATCH 2/2] Check access to vec4_visitor's arrays

2013-11-08 Thread Petri Latvala
Protect access to vec4_visitor's uniform_size and uniform_vector_size arrays by asserting the index used. Signed-off-by: Petri Latvala --- src/mesa/drivers/dri/i965/brw_vec4.cpp | 3 +++ src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 6 ++ src/mesa/drivers/dri/i965/brw_vec4_v