[Mesa-dev] [PATCH 6/8] intel: Replace checks for hiz_mt with intel_has*hiz()

2013-04-09 Thread Kenneth Graunke
From: Chad Versace chad.vers...@linux.intel.com When appropriate, replace each check `hiz_mt != NULL` with either a call to intel_miptree_slice_has_hiz() or intel_renderbuffer_has_hiz(). No behavioral change. This prepares for selectively enabling hiz on individual miptree slices for Haswell.

[Mesa-dev] [PATCH 7/8] i965: Remove brw_context::depthstencil::hiz_mt

2013-04-09 Thread Kenneth Graunke
From: Chad Versace chad.vers...@linux.intel.com After recent refactorings, the field is written but no longer read. Signed-off-by: Chad Versace chad.vers...@linux.intel.com --- src/mesa/drivers/dri/i965/brw_context.h| 1 - src/mesa/drivers/dri/i965/brw_misc_state.c | 2 -- 2 files changed,

[Mesa-dev] [PATCH 8/8] intel/hsw: Enable hiz

2013-04-09 Thread Kenneth Graunke
From: Chad Versace chad.vers...@linux.intel.com Enable hiz by setting intel_context::has_hiz. However, to work around a hardware bug, we selectively enable hiz for only nicely aligned miptree slices. No Piglit regressions on Haswell 0x0d26 rev07 when based atop mesa-master-97e40a5. Improves

Re: [Mesa-dev] [PATCH 1/4] glsl: Fix hypothetical NULL dereference in ast_process_structure_or_interface_block

2013-04-09 Thread Kenneth Graunke
insertions(+), 3 deletions(-) These seem okay to me. All four are: Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/8] i965/blorp: Align rectangle primitive for hiz ops

2013-04-09 Thread Kenneth Graunke
On 04/09/2013 03:51 PM, Kenneth Graunke wrote: From: Chad Versace chad.vers...@linux.intel.com The hardware docs and the simulator require that the rectangle primitive emitted during fast depth clears and hiz resolves must be aligned to 8x4 pixels. Signed-off-by: Chad Versace chad.vers

Re: [Mesa-dev] [PATCH 1/2] i965: NULL check prog on compilation failure.

2013-04-09 Thread Kenneth Graunke
On 04/09/2013 03:55 PM, Eric Anholt wrote: Matt Turner matts...@gmail.com writes: I believe that prog can only be NULL for ARB programs. Neither brw_fs_fp.cpp nor brw_vec4_vp.cpp call fail(), but not NULL checking prog is obviously fragile. (shader != NULL) = (prog != NULL), so if you want

Re: [Mesa-dev] [PATCH 8/8] intel/hsw: Enable hiz

2013-04-10 Thread Kenneth Graunke
On 04/09/2013 10:49 PM, Chad Versace wrote: On 04/09/2013 04:15 PM, Eric Anholt wrote: Kenneth Graunke kenn...@whitecape.org writes: From: Chad Versace chad.vers...@linux.intel.com Enable hiz by setting intel_context::has_hiz. However, to work around a hardware bug, we selectively enable

[Mesa-dev] [PATCH 1/2] intel: Move the max_gtt_map_object_size estimation to intel_context.

2013-04-10 Thread Kenneth Graunke
We need know this in order to decide what tiling mode to use. Cc: Eric Anholt e...@anholt.net Cc: Paul Berry stereotype...@gmail.com Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/intel/intel_context.c | 17 + src/mesa/drivers/dri/intel

[Mesa-dev] [PATCH 2/2] intel: Fall back to X-tiling when larger than estimated aperture size.

2013-04-10 Thread Kenneth Graunke
conflict resolution. Cc: Eric Anholt e...@anholt.net Cc: Paul Berry stereotype...@gmail.com Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/src/mesa/drivers/dri/intel

Re: [Mesa-dev] [PATCH v2 08/19] i965/vs: Make vec4_vs_visitor class derived from vec4_visitor.

2013-04-10 Thread Kenneth Graunke
On 04/09/2013 03:11 PM, Paul Berry wrote: This patch just creates the derived class; later patches will migrate VS-specific functions and data structures from the base class into the derived class. Reviewed-by: Jordan Justen jordan.l.jus...@intel.com Reviewed-by: Eric Anholt e...@anholt.net ---

Re: [Mesa-dev] [PATCH v2 09/19] i965/vs: Make some vec4_visitor functions virtual.

2013-04-10 Thread Kenneth Graunke
On 04/09/2013 03:11 PM, Paul Berry wrote: This patch makes the following vec4_visitor functions virtual, since they will need to be implemented differently for vertex and geometry shaders. Some of the functions are renamed to reflect their generic purpose, rather than their VS-specific

Re: [Mesa-dev] [PATCH v2 00/19] i965/vs: Generalize VS compiler back-end in preparation for GS.

2013-04-10 Thread Kenneth Graunke
on git://github.com/stereotype441/mesa.git to point to v2 of the series. You can ignore my comments on patch 8. Other than my small comments on patch 9 (which you're free to take or leave), this series is: Reviewed-by: Kenneth Graunke kenn...@whitecape.org It'd also be nice to see

Re: [Mesa-dev] [PATCH] glsl: Fix (and validate) comment above glsl_type::name.

2013-04-10 Thread Kenneth Graunke
On 04/09/2013 09:01 PM, Paul Berry wrote: The comment above glsl_type::name claimed that it could sometimes be NULL. This was wrong--it is never NULL. Many error handling paths would segfault if it were. Fix the comment and add assertions to validate that it really is never NULL. ---

[Mesa-dev] [PATCH 1/2] intel: Refactor code in intel_miptree_choose_tiling().

2013-04-10 Thread Kenneth Graunke
This reduces the nesting level slightly, and in my opinion, makes it a bit easier to follow. Cc: Paul Berry stereotype...@gmail.com Cc: Chad Versace chad.vers...@linux.intel.com Cc: Eric Anholt e...@anholt.net Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/intel

[Mesa-dev] [PATCH 2/2] intel: Fall back to X-tiling when larger than estimated aperture size.

2013-04-10 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/intel/intel_mipmap_tree.c | 28 -- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c index

[Mesa-dev] [PATCH 1/2] mesa: Add core support for the GL_AMD_performance_monitor extension.

2013-04-11 Thread Kenneth Graunke
not to implement the similar GL_INTEL_performance_queries extension because Intel has not bothered to publish a specification in the OpenGL registry. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mapi/glapi/gen/Makefile.am | 1 + src/mapi/glapi/gen/gl_API.xml| 2 + src/mapi/glapi/gen

[Mesa-dev] [PATCH 2/2] i965: Add support for GL_AMD_performance_monitor on Ironlake.

2013-04-11 Thread Kenneth Graunke
Ironlake's counters are always enabled; userspace can simply send a MI_REPROT_PERF_COUNT packet to take a snapshot of them. This makes it easy to implement. The counters are documented in the source code for the intel-gpu-tools intel_perf_counters utility. Signed-off-by: Kenneth Graunke kenn

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

2013-04-12 Thread Kenneth Graunke
not to implement the similar GL_INTEL_performance_queries extension because Intel has not bothered to publish a specification in the OpenGL registry. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mapi/glapi/gen/AMD_performance_monitor.xml | 87 src/mapi/glapi/gen/Makefile.am

Re: [Mesa-dev] [PATCH 1/2] mesa: Add core support for the GL_AMD_performance_monitor extension.

2013-04-12 Thread Kenneth Graunke
On 04/12/2013 10:55 AM, Eric Anholt wrote: Kenneth Graunke kenn...@whitecape.org writes: This provides an interface for applications (and OpenGL-based tools) to access GPU performance counters. Since the exact performance counters available vary between vendors and hardware generations

Re: [Mesa-dev] [PATCH 2/2] i965: Check reg.nr for BRW_ARF_NULL instead of reg.file.

2013-04-16 Thread Kenneth Graunke
; assert(reg.hstride = 0 reg.hstride Elements(hstride_for_reg)); Both patches are: Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] new i965g pipe driver for Intel GEN6 (and later)

2013-04-16 Thread Kenneth Graunke
On 04/16/2013 09:58 AM, Matt Turner wrote: On Tue, Apr 16, 2013 at 9:45 AM, Chia-I Wu olva...@gmail.com wrote: If there is no objection, I'd like to merge it in a day or two. My only objection is over adding a driver that is explicitly a toy, the confusion it will cause users, and the

Re: [Mesa-dev] [PATCH] intel: Don't dereference a NULL pointer of calloc fails

2013-04-16 Thread Kenneth Graunke
; Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] new i965g pipe driver for Intel GEN6 (and later)

2013-04-16 Thread Kenneth Graunke
On 04/16/2013 10:35 AM, Michael Karcher wrote: Am Dienstag, den 16.04.2013, 10:23 -0700 schrieb Matt Turner: waste. It wasn't uncommon for a user to waste a nontrivial amount of someone's time in #intel-gfx only to discover that they were trying to use the (old) i965g driver that no one

Re: [Mesa-dev] [PATCH] ralloc: don't write to memory in case of alloc fail.

2013-04-16 Thread Kenneth Graunke
+ sizeof(ralloc_header)); + if (unlikely(block == NULL)) + return NULL; ralloc_header *info = (ralloc_header *) block; ralloc_header *parent = ctx != NULL ? get_header(ctx) : NULL; Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa

Re: [Mesa-dev] i915c vs i915g piglit run

2013-04-17 Thread Kenneth Graunke
On 04/17/2013 01:59 PM, Dave Airlie wrote: Hi, I put a 3Ghz Core2 Q35 box i found in the office to good use (so much nicer than a pineview atom). http://people.freedesktop.org/~airlied/piglit/i915c/ is a full run with i915c forced to advertise GL2.0 using the stub occlusion query hack in

Re: [Mesa-dev] [PATCH 1/2] i965: Don't flush the batch at the end of blorp.

2013-04-17 Thread Kenneth Graunke
(+), 18 deletions(-) Patch 1 is: Reviewed-by: Kenneth Graunke kenn...@whitecape.org I haven't had a chance to look at patch 2 yet. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 09/11] intel: Add support for blitting 6 byte-per-pixel formats.

2013-04-17 Thread Kenneth Graunke
On 04/16/2013 05:21 PM, Eric Anholt wrote: The next commit introduces what is apparently our first one, which tripped over this in glReadPixels. --- src/mesa/drivers/dri/intel/intel_blit.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) Commit message here

[Mesa-dev] [PATCH 2/6] glsl: Initialize ctx-ShaderCompilerOptions in standalone scaffolding.

2013-04-17 Thread Kenneth Graunke
This code is copied from _mesa_init_shader_state(). Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/standalone_scaffolding.cpp | 12 1 file changed, 12 insertions(+) diff --git a/src/glsl/standalone_scaffolding.cpp b/src/glsl/standalone_scaffolding.cpp index

[Mesa-dev] [PATCH 1/6] glsl: Copy _mesa_shader_type_to_index() to standalone scaffolding.

2013-04-17 Thread Kenneth Graunke
We can't include shaderobj.h from the standalone utilities, so we unfortunately have to copy this function. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/standalone_scaffolding.h | 17 + 1 file changed, 17 insertions(+) diff --git a/src/glsl

[Mesa-dev] [PATCH 4/6] mesa: Move the mvp_with_dp4 flag to ShaderCompilerOptions.

2013-04-17 Thread Kenneth Graunke
Shader stage only, as it's currently only used for fixed-function vertex programs. That will change soon, and I wanted to preserve the existing behavior. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/r200/r200_context.c | 2 +- src/mesa/drivers/dri/radeon

[Mesa-dev] [PATCH 3/6] glsl: Pass struct shader_compiler_options into do_common_optimization.

2013-04-17 Thread Kenneth Graunke
worked on. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/glsl_parser_extras.cpp| 4 +++- src/glsl/ir_optimization.h | 3 ++- src/glsl/linker.cpp| 2 +- src/glsl/main.cpp | 4 +++- src/mesa/drivers/dri

[Mesa-dev] [PATCH 5/6] i965/vs: Set the PreferDP4 shader compiler option.

2013-04-17 Thread Kenneth Graunke
the scalar backend can't use DP4 and does have MAD support. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index

[Mesa-dev] [PATCH 6/6] glsl: Add a pass to flip matrix/vector multiplies to use dot products.

2013-04-17 Thread Kenneth Graunke
another boolean flag for this purpose. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/Makefile.sources | 1 + src/glsl/glsl_parser_extras.cpp | 4 ++ src/glsl/ir_optimization.h | 1 + src/glsl/opt_flip_matrices.cpp | 122

Re: [Mesa-dev] i915c vs i915g piglit run

2013-04-19 Thread Kenneth Graunke
On 04/19/2013 11:07 AM, Marek Olšák wrote: It depends on what you need the sw fallback for. Stippling and smoothing is accelerated. Maybe emulating fragment shaders with too many instructions? Marek Yeah - it needs to correctly fall back to software for shaders that exceed instruction

Re: [Mesa-dev] [PATCH 2/2] mesa: Add performance debug for meta code.

2013-04-20 Thread Kenneth Graunke
insertions(+), 3 deletions(-) Looks nice to me, but I'm guessing this only shows up through ARB_debug_output? It'd be nice to get this via printf when an environment variable is set. For both: Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev

[Mesa-dev] [PATCH] i965: Fix a mistake in the comments for software counters.

2013-04-20 Thread Kenneth Graunke
The code doesn't set brw-query.obj to NULL, it sets query-bo to NULL. --- src/mesa/drivers/dri/i965/brw_queryobj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_queryobj.c b/src/mesa/drivers/dri/i965/brw_queryobj.c index 194725c..81e975a

Re: [Mesa-dev] [PATCH] i965/fs: Don't save value returned by emit() if it's not used.

2013-04-21 Thread Kenneth Graunke
On 04/20/2013 07:21 PM, Matt Turner wrote: Probably a copy-n-paste mistake. --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) Reviewed-by: Kenneth Graunke kenn...@whitecape.org

Re: [Mesa-dev] [PATCH] i965: Apply CMP NULL {Switch} work-around to other Gen7s.

2013-04-21 Thread Kenneth Graunke
-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 03/17] glsl: parse in/out types for interface blocks

2013-04-21 Thread Kenneth Graunke
-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 06/17] glsl parser: handle interface block member qualifier

2013-04-21 Thread Kenneth Graunke
On 04/19/2013 12:35 PM, Jordan Justen wrote: An interface block member may specify the type: in { in vec4 in_var_with_qualifier; }; When specified with the member, it must match the same type as interface block type. It can also omit the qualifier: uniform { vec4

Re: [Mesa-dev] [PATCH 08/17] glsl parser: allow in out for interface block members

2013-04-21 Thread Kenneth Graunke
On 04/19/2013 12:35 PM, Jordan Justen wrote: Previously uniform blocks allowed for the 'uniform' keyword to be used with members of a uniform blocks. With interface blocks 'in' can be used on 'in' interface block members and 'out' can be used on 'out' interface block members. The

Re: [Mesa-dev] [PATCH 09/17] glsl_symbol_table: add interface block namespaces

2013-04-21 Thread Kenneth Graunke
On 04/19/2013 12:35 PM, Jordan Justen wrote: For interface blocks, there are three separate namespaces for uniform, input and output blocks. http://knowyourmeme.com/photos/2109 There are? Similarly, for your next patch: Uniform/interface blocks are a separate namespace from types. They are?

Re: [Mesa-dev] [PATCH 11/17] glsl ast_to_hir: reject row/column_major for in/out interface blocks

2013-04-21 Thread Kenneth Graunke
On 04/19/2013 12:35 PM, Jordan Justen wrote: Signed-off-by: Jordan Justen jordan.l.jus...@intel.com --- src/glsl/ast_to_hir.cpp |6 +- 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Kenneth Graunke kenn...@whitecape.org

[Mesa-dev] License header tidying

2013-04-21 Thread Kenneth Graunke
I was reviewing some patches and saw more new files that said IN NO EVENT SHALL BRIAN PAUL BE LIABLE but were...not authored by Brian. People keep doing that by accident, and a lot of those files have been altered by other people by now anyway. This series does the sed job to replace BRIAN PAUL

[Mesa-dev] [PATCH 2/6] mesa: Change BRIAN PAUL OR IBM to THE AUTHORS in license text.

2013-04-21 Thread Kenneth Graunke
See previous commit for the rationale. These weren't caught by the automatic conversion due to the OR IBM addition. Cc: Brian Paul bri...@vmware.com --- src/mesa/main/arrayobj.c | 2 +- src/mesa/main/arrayobj.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[Mesa-dev] [PATCH 5/6] mesa: Restore 78-column wrapping of license text in C++-style comments.

2013-04-21 Thread Kenneth Graunke
The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s

[Mesa-dev] [PATCH 6/6] mesa: Fix up some final license word wrapping issues by hand.

2013-04-21 Thread Kenneth Graunke
Cc: Brian Paul bri...@vmware.com --- docs/license.html | 7 --- src/mapi/glapi/gen/mesadef.py | 7 --- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/license.html b/docs/license.html index d872cad..80bb604 100644 --- a/docs/license.html +++

Re: [Mesa-dev] [PATCH 2/2] i965: Add support for GL_AMD_performance_monitor on Ironlake.

2013-04-22 Thread Kenneth Graunke
On 04/12/2013 11:21 AM, Eric Anholt wrote: Kenneth Graunke kenn...@whitecape.org writes: Ironlake's counters are always enabled; userspace can simply send a MI_REPROT_PERF_COUNT packet to take a snapshot of them. This makes it easy to implement. The counters are documented in the source code

Re: [Mesa-dev] [PATCH 2/2] i965: Add support for GL_AMD_performance_monitor on Ironlake.

2013-04-22 Thread Kenneth Graunke
On 04/12/2013 01:16 PM, Eric Anholt wrote: Kenneth Graunke kenn...@whitecape.org writes: Ironlake's counters are always enabled; userspace can simply send a MI_REPROT_PERF_COUNT packet to take a snapshot of them. This makes it easy to implement. The counters are documented in the source code

Re: [Mesa-dev] [PATCH resend] mesa: Add core support for the GL_AMD_performance_monitor extension.

2013-04-22 Thread Kenneth Graunke
On 04/13/2013 11:07 AM, Christoph Bumiller wrote: On 12.04.2013 21:14, Kenneth Graunke wrote: This provides an interface for applications (and OpenGL-based tools) to access GPU performance counters. Since the exact performance counters available vary between vendors and hardware generations

[Mesa-dev] [PATCH 1/4] mesa: Fix unpack function for ETC2_SRGB8_PUNCHTHROUGH_ALPHA1.

2013-04-23 Thread Kenneth Graunke
We accidentally set MESA_FORMAT_ETC2_RGB8_PUNCHTHROUGH_ALPHA1 twice, rather than setting the RGB8 and SRGB8 formats. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/main/format_unpack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main

[Mesa-dev] [PATCH 2/4] mesa: Add an unpack function for ARGB2101010_UINT.

2013-04-23 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/main/format_unpack.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index feba386..94dd106 100644 --- a/src/mesa/main/format_unpack.c +++ b/src

[Mesa-dev] [PATCH 3/4] mesa: Add unpack functions for R/RG/RGB [U]INT8/16/32 formats.

2013-04-23 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/main/format_unpack.c | 253 ++ 1 file changed, 253 insertions(+) diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index 94dd106..279bad8 100644 --- a/src/mesa/main

[Mesa-dev] [PATCH 4/4] mesa: Add unpack functions for A/I/L/LA [U]INT8/16/32 formats.

2013-04-23 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/main/format_unpack.c | 327 ++ 1 file changed, 327 insertions(+) diff --git a/src/mesa/main/format_unpack.c b/src/mesa/main/format_unpack.c index 279bad8..b1cf7be 100644 --- a/src/mesa/main

Re: [Mesa-dev] [PATCH] mesa: memset get_unpack_rgba_function's format table to 0.

2013-04-23 Thread Kenneth Graunke
On 04/22/2013 09:17 PM, Ian Romanick wrote: On 04/23/2013 02:39 AM, Kenneth Graunke wrote: Otherwise, the table could be full of uninitialized garbage. That means the NULL check at the bottom might not happen, so we wouldn't get the _mesa_problem, and we'd then return garbage. format_pack.c

Re: [Mesa-dev] [PATCH] mesa: Allow custom text to be inserted in version string at buildtime

2013-04-23 Thread Kenneth Graunke
--- src/mesa/Android.libmesa_dricore.mk | 4 src/mesa/main/version.c | 3 +++ 2 files changed, 7 insertions(+) Seems useful. I can do this in the kernel, so why not Mesa? Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa

Re: [Mesa-dev] [PATCH 2/2] i965: Remove strange comments about math functions.

2013-04-23 Thread Kenneth Graunke
10 #define BRW_MATH_FUNCTION_INT_DIV_QUOTIENT_AND_REMAINDER 11 Nope, they never have. Both patches are: Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http

Re: [Mesa-dev] swrast MapTextureImage fetches

2013-04-23 Thread Kenneth Graunke
-mapping of my tree. Patches 1-6 are: Reviewed-by: Kenneth Graunke kenn...@whitecape.org I'll try and look at the rest of them soon... ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] linux: Don't emit a .note.ABI-tag section anymore (#26663)

2013-04-23 Thread Kenneth Graunke
requires 2.6.39. If this is just for compatibility with old kernels (especially pre-2.6), it should go. Acked-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman

Re: [Mesa-dev] [PATCH 2/2] mesa: use new _mesa_inside_dlist_begin_end() function

2013-04-23 Thread Kenneth Graunke
On 04/23/2013 12:23 PM, Brian Paul wrote: --- src/mesa/main/context.h | 11 +++ src/mesa/main/dlist.c |4 ++-- src/mesa/vbo/vbo_save_api.c |3 +-- 3 files changed, 14 insertions(+), 4 deletions(-) Definitely nicer! Both are: Reviewed-by: Kenneth Graunke kenn

Re: [Mesa-dev] [PATCH] i965: Avoid recompiles for fragment clamping on non-clamping APIs.

2013-04-23 Thread Kenneth Graunke
On 04/19/2013 10:54 AM, Eric Anholt wrote: Removes 75/78 state-dependent recompiles in GLB2.7 (the remaining 3 are due to FBO-rendering size predictions). AFAICT ClampColor is not deprecated in OpenGL Core. It doesn't exist in ES, though. If you change it to _mesa_is_desktop_gl(ctx), you

Re: [Mesa-dev] [PATCH] i965: Avoid recompiles for fragment clamping on non-clamping APIs.

2013-04-23 Thread Kenneth Graunke
On 04/23/2013 09:15 PM, Jordan Justen wrote: On Tue, Apr 23, 2013 at 5:41 PM, Kenneth Graunke kenn...@whitecape.org wrote: On 04/19/2013 10:54 AM, Eric Anholt wrote: Removes 75/78 state-dependent recompiles in GLB2.7 (the remaining 3 are due to FBO-rendering size predictions). AFAICT

Re: [Mesa-dev] [PATCH 1/2] i965/fs: Print out the estimated cycle count in INTEL_DEBUG=wm

2013-04-23 Thread Kenneth Graunke
(fs_inst *next_block_header) } } + if (unlikely(INTEL_DEBUG DEBUG_WM) post_reg_alloc) { + printf(fs%d estimated execution time: %d cycles\n, + v-dispatch_width, time); + } + assert(instructions_to_schedule == 0); } This patch is: Reviewed-by: Kenneth

Re: [Mesa-dev] [PATCH 2/2] glsl: Teach basic block analysis about break/continue/discard.

2013-04-23 Thread Kenneth Graunke
); - } else if (ir-as_return() || ir-as_call()) { + } else if (ir-as_jump() || ir-as_call()) { callback(leader, ir, data); leader = NULL; } else if ((ir_function = ir-as_function())) { That was a lot easier than I feared! Nice work. Both patches are: Reviewed-by: Kenneth

Re: [Mesa-dev] [PATCH] i965/fs: Allow LRPs with uniform registers.

2013-04-26 Thread Kenneth Graunke
. fs_reg::is_valid_3src? Either way, this is Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/2] i965/vs: Add a function to fix-up uniform arguments for 3-src insts.

2013-04-26 Thread Kenneth Graunke
lowering code and use the BFE and BFI2 instructions directly. --- These patches should go before my ARB_gpu_shader5 series, and allow me to drop [PATCH 07/16] glsl: Add bitfieldInsert-to-bfm/bitops lowering pass. [PATCH 08/16] glsl: Add BFE-to-bitops lowering pass. Both are: Reviewed-by: Kenneth

Re: [Mesa-dev] [PATCH] i965: Stop passing num_samples to intel_miptree_alloc_hiz().

2013-04-26 Thread Kenneth Graunke
files changed, 6 insertions(+), 8 deletions(-) Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] i965: Disable Z16 on contexts that don't require it.

2013-04-26 Thread Kenneth Graunke
the cracks. Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/3] intel: Report FBO incompleteness causes through GL_ARB_debug_output.

2013-04-26 Thread Kenneth Graunke
authors - Glad to see ARB_color_buffer_float dropped too! All three are: Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] i965/fs: Don't try to use bogus interpolation modes pre-Gen6.

2013-04-27 Thread Kenneth Graunke
anything on this hardware -- + * there is no multisampling. + */ + barycoord_mode = BRW_WM_PERSPECTIVE_PIXEL_BARYCENTRIC; } return emit(FS_OPCODE_LINTERP, attr, this-delta_x[barycoord_mode], Awesome. Thanks so much for finding this! Reviewed-by: Kenneth

Re: [Mesa-dev] [PATCH V2 9.1] i965/vs: Fix Gen4/5 VUE map inconsistency with gl_ClipVertex

2013-04-27 Thread Kenneth Graunke
don't suspect these are introduced by this patch. Since this is for the stable branch, please verify that there are no piglit regressions. I kind of hope we might get another r-b too. Here, have another r-b :) Reviewed-by: Kenneth Graunke kenn...@whitecape.org Looks reasonable to me

Re: [Mesa-dev] [PATCH 01/12] glsl: Add ir_binop_vector_extract

2013-04-27 Thread Kenneth Graunke
: { + const int c = op[1]-value.i[0]; Shouldn't we bounds check 'c' here? Otherwise you could walk off the end of the array and crash. Undefined behavior is fine (pick some random element), but crashing is bad. Otherwise patch 1 looks good... Reviewed-by: Kenneth Graunke kenn

Re: [Mesa-dev] [PATCH 04/12] glsl: Lower ir_binop_vector_extract to swizzle

2013-04-28 Thread Kenneth Graunke
On 04/08/2013 03:24 PM, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com Lower ir_binop_vector_extract with a constant index to a swizzle. This is exactly like ir_dereference_array of a vector with a constant index. Signed-off-by: Ian Romanick ian.d.roman...@intel.com ---

Re: [Mesa-dev] [PATCH 03/12] glsl: Refactor part of convert_vec_index_to_cond_assign

2013-04-28 Thread Kenneth Graunke
On 04/08/2013 03:24 PM, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com Use a first function that extract the vector being indexed and the index from the deref. Call the second function that does the real work. Coming patches will add a new ir_expression for variable indexing

Re: [Mesa-dev] [PATCH 07/17] swrast: Replace ImageOffsets with an ImageSlices pointer.

2013-04-28 Thread Kenneth Graunke
. Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/intel/intel_tex_validate.c | 37 src/mesa/drivers/dri/radeon/radeon_texture.c| 13 ++--- src/mesa/main/texcompress.c |2 +- src/mesa/main/texcompress.h

Re: [Mesa-dev] swrast MapTextureImage fetches

2013-04-28 Thread Kenneth Graunke
-mapping of my tree. Fantastic work as always - this cleaned up a lot of stuff across the board! I reviewed everything as well as I could - the changes to nouveau and radeon looked okay, but I'm obviously not the best qualified to review those. For the series: Reviewed-by: Kenneth Graunke kenn

Re: [Mesa-dev] [PATCH 1/2] mesa: Make a Mesa core function for sRGB render encoding handling.

2013-04-28 Thread Kenneth Graunke
? +gl_format +_mesa_get_render_format(struct gl_context *ctx, gl_format format) +{ + if (ctx-Color.sRGBEnabled) + return format; + else + return _mesa_get_srgb_format_linear(format); +} This is much more succinct and likely to not break. Reviewed-by: Kenneth Graunke kenn

Re: [Mesa-dev] [PATCH 2/2] i965: Implement color clears using a simple shader in blorp.

2013-04-28 Thread Kenneth Graunke
= gen6_blorp_emit_binding_table(brw, params, wm_surf_offset_renderbuffer, Nitpicking aside, this looks good. Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http

[Mesa-dev] [PATCH] i965: Move is_math/is_tex/is_control_flow() to backend_instruction.

2013-04-28 Thread Kenneth Graunke
anyway, it should be fine. This also makes is_control_flow() available in the VS. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_fs.cpp | 45 src/mesa/drivers/dri/i965/brw_fs.h | 3 --- src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH 2/2] i965/vs: Add instruction scheduling.

2013-04-28 Thread Kenneth Graunke
On 04/23/2013 04:56 PM, Eric Anholt wrote: While this doesn't have the detail that the FS scheduler does, and is ignorant of dependency control, it's still good for a 0.60% +/- 0.15% performance improvement on GLBenchmark 2.7 (n=45/47, outliers removed) ---

Re: [Mesa-dev] [PATCH 2/2] i965/vs: Add instruction scheduling.

2013-04-29 Thread Kenneth Graunke
On 04/29/2013 06:20 PM, Eric Anholt wrote: Kenneth Graunke kenn...@whitecape.org writes: On 04/23/2013 04:56 PM, Eric Anholt wrote: While this doesn't have the detail that the FS scheduler does, and is ignorant of dependency control, it's still good for a 0.60% +/- 0.15% performance

Re: [Mesa-dev] [PATCH] intel: Be more conservative in disabling tiling to save memory.

2013-04-29 Thread Kenneth Graunke
On 04/29/2013 10:24 AM, Eric Anholt wrote: Daniel Vetter dan...@ffwll.ch writes: On Thu, Apr 25, 2013 at 03:41:01PM -0700, Eric Anholt wrote: Improves GLB2.7 trex performance 1.01985% +/- 0.721366% on my IVB (n=10) and by 3.38771% +/- 0.584241% (n=15) on my HSW, due to a 32x32 ARGB

[Mesa-dev] [PATCH] glsl: Ignore redundant prototypes after a function's been defined.

2013-04-30 Thread Kenneth Graunke
Romanick i...@freedesktop.org Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/ast_to_hir.cpp | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 2638411..e595110 100644 --- a/src/glsl/ast_to_hir.cpp

Re: [Mesa-dev] [PATCH 2/2] i965/vs: Fix textureGrad() with shadow samplers on Haswell.

2013-05-01 Thread Kenneth Graunke
On 02/25/2013 11:55 AM, Eric Anholt wrote: Kenneth Graunke kenn...@whitecape.org writes: The shadow comparitor needs to be loaded into the Z component of the last DWord. Fixes es3conform's shadow_execution_vert and oglconform's shadow-grad advanced.textureGrad.1D tests on Haswell. NOTE

Re: [Mesa-dev] [PATCH 1/2] i965: Lower textureGrad() for samplerCubeShadow.

2013-05-01 Thread Kenneth Graunke
On 02/25/2013 11:51 AM, Eric Anholt wrote: Kenneth Graunke kenn...@whitecape.org writes: GLSL provides gradients for the 'r' coordinate (face ID), while our hardware apparently ignores them. Sadly, this means that sample_d and sample_d_c appear to be unsuitable for OpenGL, and need

Re: [Mesa-dev] [PATCH] GLSL: Implementation of the GL_ARB_shading_language_420pack extension

2013-05-01 Thread Kenneth Graunke
On 04/21/2013 04:08 PM, Todd Previte wrote: Initial work on the implementation of GL_ARB_shading_language_420pack. The patch adds the functionality from this extension which allows for C-style array initialization for GLSL. The extension enable bits and extension definition are also included in

Re: [Mesa-dev] [PATCH 13/17] glsl linker: remove interface block instance names

2013-05-01 Thread Kenneth Graunke
-by: Kenneth Graunke kenn...@whitecape.org diff --git a/src/glsl/Makefile.sources b/src/glsl/Makefile.sources index c294aa4..86ae43e 100644 --- a/src/glsl/Makefile.sources +++ b/src/glsl/Makefile.sources @@ -62,6 +62,7 @@ LIBGLSL_FILES = \ $(GLSL_SRCDIR)/lower_mat_op_to_vec.cpp

Re: [Mesa-dev] [PATCH] i965: Fix GPU hangs when a blorp batch is the first thing to execute.

2013-05-01 Thread Kenneth Graunke
1 file changed, 36 insertions(+) Wow. Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 2/3] glsl: add AMD_vertex_shader_layer support

2013-05-01 Thread Kenneth Graunke
On 05/01/2013 09:25 PM, Jordan Justen wrote: On Wed, May 1, 2013 at 9:13 PM, Matt Turner matts...@gmail.com wrote: On Wed, May 1, 2013 at 8:41 PM, Jordan Justen jljus...@gmail.com wrote: On Tue, Apr 30, 2013 at 10:01 AM, Jordan Justen jljus...@gmail.com wrote: On Tue, Apr 30, 2013 at 9:57 AM,

Re: [Mesa-dev] [PATCH 1/6] i965: Move blorp resolve setup into brw_blorp_blit_miptrees().

2013-05-02 Thread Kenneth Graunke
On 04/30/2013 12:56 PM, Eric Anholt wrote: There was some comment about trying to avoid marking resolves in updownsample, but if the downsample is never actually rendered to, then the required resolve tracked in the downsample will never be executed, so who cares? ---

Re: [Mesa-dev] [PATCH 5/6] mesa: Make Mesa core set up wrapped texture renderbuffer state.

2013-05-02 Thread Kenneth Graunke
awkward having the core Mesa code rely on driver hooks setting up the renderbuffer wrapper. For the series (assuming this nouveau thing gets fixed): Reviewed-by: Kenneth Graunke kenn...@whitecape.org - rb-Width = ti-Width; - rb-Height = ti-Height; nouveau_surface_ref

Re: [Mesa-dev] [PATCH 08/17] glsl: fix the value of gl_MaxFragmentUniformVectors

2013-05-02 Thread Kenneth Graunke
(gl_DepthRangeParameters)); For some reason, I thought state-Const.MaxFragmentUniformComponents got initialized to different values based on whether ctx-API was GLES or not. But it doesn't, and that wouldn't even work in the case of ARB_ES?_compatibility. So, looks good to me. Reviewed-by: Kenneth Graunke

Re: [Mesa-dev] [PATCH 02/17] mesa: move max texture image unit constants to gl_program_constants

2013-05-02 Thread Kenneth Graunke
-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] i965: Fix GPU hangs when a blorp batch is the first thing to execute.

2013-05-02 Thread Kenneth Graunke
On 05/02/2013 02:13 AM, Chris Wilson wrote: On Wed, May 01, 2013 at 04:28:08PM -0700, Eric Anholt wrote: The GPU apparently goes looking for constants even though there are no shader stages enabled, and gets stuck because we haven't told it there are no constants to collect. If any other user

Re: [Mesa-dev] [PATCH] i965: Fix GPU hangs when a blorp batch is the first thing to execute.

2013-05-02 Thread Kenneth Graunke
On 05/02/2013 01:08 PM, Paul Berry wrote: On 2 May 2013 12:54, Chris Wilson ch...@chris-wilson.co.uk mailto:ch...@chris-wilson.co.uk wrote: On Thu, May 02, 2013 at 09:07:08AM -0700, Eric Anholt wrote: Chris Wilson ch...@chris-wilson.co.uk mailto:ch...@chris-wilson.co.uk writes:

Re: [Mesa-dev] [PATCH 1/7] i965/vs: Do round-robin register allocation on gen6+ like we do in the FS.

2013-05-02 Thread Kenneth Graunke
) + ra_set_allocate_round_robin(brw-vs.regs); ralloc_free(brw-vs.classes); brw-vs.classes = ralloc_array(brw, int, class_count + 1); Thanks for doing this! For the series: Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev

Re: [Mesa-dev] [PATCH] i965: Enable fast clears on non-8x4-aligned sizes.

2013-05-02 Thread Kenneth Graunke
depth_clear_value; switch (mt-format) { case MESA_FORMAT_Z32_FLOAT_X24S8: Would be worth regression testing on Gen6. Really glad to see this working. Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev

Re: [Mesa-dev] [PATCH] glsl: Flip around if statements with empty then blocks.

2013-05-03 Thread Kenneth Graunke
in affected programs: 16550 - 16422 (-0.77%) --- src/glsl/opt_if_simplification.cpp | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) What a strange occurrance :) Obvious improvement though. Reviewed-by: Kenneth Graunke kenn...@whitecape.org

Re: [Mesa-dev] [PATCH 04/12] sso: implement ActiveShaderProgram GetProgramPipelineiv

2013-05-04 Thread Kenneth Graunke
On 05/03/2013 10:44 AM, Gregory Hainaut wrote: V2: * Rename object * Formatting improvement --- src/mesa/main/pipelineobj.c | 77 +++ 1 file changed, 77 insertions(+) diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c index

Re: [Mesa-dev] [PATCH 04/12] sso: implement ActiveShaderProgram GetProgramPipelineiv

2013-05-04 Thread Kenneth Graunke
On 05/04/2013 02:32 PM, gregory hainaut wrote: On Sat, 04 May 2013 12:37:05 -0700 Kenneth Graunke kenn...@whitecape.org wrote: On 05/03/2013 10:44 AM, Gregory Hainaut wrote: V2: * Rename object * Formatting improvement --- src/mesa/main/pipelineobj.c | 77

<    3   4   5   6   7   8   9   10   11   12   >