Re: [Mesa-dev] [PATCH 5/5] glsl: Clarify ir_function::matching_sigature()

2011-08-01 Thread Chris Bandy
On 07/29/2011 08:59 PM, Chad Versace wrote: The function used a variable named 'score', which was an outright lie. A signature matches or it doesn't; there is no fuzzy scoring. Change the return type of parameter_lists_match() to an enum, and let ir_function::matching_sigature() switch on

[Mesa-dev] [Bug 3165] texImage.IsCompressed and texImage.CompressedSize issues

2011-08-01 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=3165 --- Comment #8 from Ian Romanick i...@freedesktop.org 2011-08-01 09:18:59 PDT --- If I'm not mistaken, most of the issues from this bug have been fixed for some time. The one remaining issue was returning the wrong format for

Re: [Mesa-dev] [PATCH 5/5] glsl: Clarify ir_function::matching_sigature()

2011-08-01 Thread Chad Versace
On 08/01/2011 08:05 AM, Chris Bandy wrote: On 07/29/2011 08:59 PM, Chad Versace wrote: The function used a variable named 'score', which was an outright lie. A signature matches or it doesn't; there is no fuzzy scoring. Change the return type of parameter_lists_match() to an enum, and let

[Mesa-dev] [PATCH 1/7] linker: Make linker_error_printf set LinkStatus to false

2011-08-01 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com Remove the other places that set LinkStatus to false since they all immediately follow a call to linker_error_printf. --- src/glsl/linker.cpp |8 ++-- 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/glsl/linker.cpp

[Mesa-dev] [PATCH 2/7] linker: Make linker_{error, warning}_printf generally available

2011-08-01 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com linker_warning_printf is a new function. It's identical to linker_error_printf except that it doesn't set LinkStatus=false and it prepends warning: on messages instead of error: . --- src/glsl/ir_function_detect_recursion.cpp |1 +

[Mesa-dev] [PATCH 3/7] mesa: Ensure that gl_shader_program::InfoLog is never NULL

2011-08-01 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com This prevents assertion failures in ralloc_strcat. The ralloc_free in _mesa_free_shader_program_data can be omitted because freeing the gl_shader_program in _mesa_delete_shader_program will take care of this automatically. A bunch of this code could

[Mesa-dev] [PATCH 4/7] ir_to_mesa: Use Add linker_error_printf instead of fail_link

2011-08-01 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com The functions were almost identical. --- src/mesa/program/ir_to_mesa.cpp | 56 +- 1 files changed, 25 insertions(+), 31 deletions(-) diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp

[Mesa-dev] [PATCH 5/7] ir_to_mesa: Emit warnings instead of errors for IR that can't be lowered

2011-08-01 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com Rely on the driver to do the right thing. This probably means falling back to software. Page 88 of the OpenGL 2.1 spec specifically says: A shader should not fail to compile, and a program object should not fail to link due to lack of

[Mesa-dev] [PATCH 6/7] i915: Fail without crashing if a Mesa IR program uses too many registers

2011-08-01 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com So far this can only happen in GLSL shaders that contain flow-control that could not be lowered. These programs would have failed to run on hardware anyway. --- src/mesa/drivers/dri/i915/i915_fragprog.c | 15 +-- 1 files changed, 13

[Mesa-dev] [PATCH 7/7] i915: Only emit program errors when INTEL_DEBUG=wm

2011-08-01 Thread Ian Romanick
From: Ian Romanick ian.d.roman...@intel.com This makes piglit a lot more happy. --- src/mesa/drivers/dri/i915/i915_program.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c

Re: [Mesa-dev] [Mesa3d-dev] patches for various problems when playing with egl

2011-08-01 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/01/2011 10:40 AM, Ian Romanick wrote: On 07/31/2011 02:51 PM, kristof.ralov...@gmail.com wrote: Please apply! Send patches using git-send-email. People cannot reply with review comments to patches sent as attachments. And don't use

Re: [Mesa-dev] [PATCH 7/7] i915: Only emit program errors when INTEL_DEBUG=wm

2011-08-01 Thread Eric Anholt
On Mon, 1 Aug 2011 10:20:23 -0700, Ian Romanick i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com This makes piglit a lot more happy. I'd include DEBUG_FALLBACK, too. That's what's about to happen when someone uses the program, and when people are hitting swrast we

Re: [Mesa-dev] [PATCH 6/6] ir_to_mesa: Try to avoid emitting a MOV_SAT to saturate an expression tree.

2011-08-01 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/29/2011 12:48 PM, Eric Anholt wrote: Fixes a regression in codegen quality for ff_fragment_shader conversion to GLSL -- glean texCombine produces 7.5% fewer Mesa IR instructions. --- src/mesa/program/ir_to_mesa.cpp | 28

[Mesa-dev] S2TC - yet another attempt to solve the S3TC issue

2011-08-01 Thread Rudolf Polzer
Hi, I developed, together with Maik Merten, a replacement for S3TC with the following properties: - does not use any interesting algorithms (no color ramps, each 4x4 block is just a 2 colors palette - basically, this is Color Cell Compression from August 1986) - is perfectly decodable by any

[Mesa-dev] Status of the GLSL-TGSI translator, part 2

2011-08-01 Thread Bryan Cain
Since Mesa 7.11 is released now, I figure it's time to discuss merging the glsl-to-tgsi branch to master again. The translator is more mature than last time. There are no regressions that I know of on any driver. The code generation has improved so that it's the same as or better than

Re: [Mesa-dev] [PATCH 6/7] i915: Fail without crashing if a Mesa IR program uses too many registers

2011-08-01 Thread Eric Anholt
On Mon, 1 Aug 2011 10:20:22 -0700, Ian Romanick i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com So far this can only happen in GLSL shaders that contain flow-control that could not be lowered. These programs would have failed to run on hardware anyway. This looks

Re: [Mesa-dev] [PATCH] i965/gen5+: Fix incorrect miptree layout for non-power-of-two cubemaps.

2011-08-01 Thread Kenneth Graunke
On 07/31/2011 07:25 PM, Eric Anholt wrote: On Sat, 30 Jul 2011 21:35:52 -0700, Kenneth Graunke kenn...@whitecape.org wrote: For power-of-two sizes, h0 == mt-height0 since it's already a multiple of two. However, for NPOT, they're different; h1 should be computed based on the original size.

Re: [Mesa-dev] [PATCH] i965/gen5+: Fix incorrect miptree layout for non-power-of-two cubemaps.

2011-08-01 Thread Eric Anholt
On Mon, 01 Aug 2011 13:15:45 -0700, Kenneth Graunke kenn...@whitecape.org wrote: On 07/31/2011 07:25 PM, Eric Anholt wrote: On Sat, 30 Jul 2011 21:35:52 -0700, Kenneth Graunke kenn...@whitecape.org wrote: For power-of-two sizes, h0 == mt-height0 since it's already a multiple of two.

[Mesa-dev] [PATCH 1/4] Revert glsl: Skip processing the first function's body in do_dead_functions().

2011-08-01 Thread Paul Berry
opt_dead_functions contained a shortcut to skip processing the first function's body, based on the assumption that IR functions are topologically sorted, with callees always coming before their callers (therefore the first function cannot contain any calls). This assumption turns out not to be

[Mesa-dev] [PATCH 2/4] glsl: Emit function signatures at toplevel, even for built-ins.

2011-08-01 Thread Paul Berry
The ast-to-hir conversion needs to emit function signatures in two circumstances: when a function declaration (or definition) is encountered, and when a built-in function is encountered. To avoid emitting a function signature in an illegal place (such as inside a function), emit_function()

[Mesa-dev] [PATCH 3/4] glsl: Constant-fold built-in functions before outputting IR

2011-08-01 Thread Paul Berry
Rearranged the logic for converting the ast for a function call to hir, so that we constant fold before emitting any IR. Previously we would emit some IR, and then only later detect whether we could constant fold. The unnecessary IR would usually get cleaned up by a later optimization step,

[Mesa-dev] [PATCH 4/4] glsl: Check array size is const before asserting that no IR was generated.

2011-08-01 Thread Paul Berry
process_array_type() contains an assertion to verify that no IR instructions are generated while processing the expression that specifies the size of the array. This assertion needs to happen _after_ checking whether the expression is constant. Otherwise we may crash on an illegal shader rather

[Mesa-dev] [PATCH 0/5] glsl: Add switch statement support to the GLSL compiler.

2011-08-01 Thread Dan McCabe
This patch set adds support for switch statements to the GLSL compiler. We modify the grammar for the compiler with productions for switch statements and case labels, while adding supporting supporting productions not already present. New AST classes are defined to support those productions.

[Mesa-dev] [PATCH 1/5] glsl: Create AST data structures for switch statement and case label

2011-08-01 Thread Dan McCabe
Data structures for switch statement and case label are created that parallel the structure of other AST data. --- src/glsl/ast.h | 24 1 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/glsl/ast.h b/src/glsl/ast.h index 878f48b..2ee0b11 100644 ---

[Mesa-dev] [PATCH 2/5] glsl: Add productions to GLSL grammar for switch statement

2011-08-01 Thread Dan McCabe
The grammar is modified to support switch statements. Rather than follow the grammar in the appendix, which allows case labels to be placed ANYWHERE as a regular statement, we follow the development of the grammar as described in the body of the GLSL spec. In this variation, the switch statement

[Mesa-dev] [PATCH 3/5] glsl: Create AST structs corresponding to new productions in grammar

2011-08-01 Thread Dan McCabe
Previously we added productions for: switch_body case_label_list case_statement case_statement_list Now add AST structs corresponding to those productions. --- src/glsl/ast.h | 59 1 files changed, 59

Re: [Mesa-dev] [PATCH 1/4] Revert glsl: Skip processing the first function's body in do_dead_functions().

2011-08-01 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/01/2011 04:07 PM, Paul Berry wrote: opt_dead_functions contained a shortcut to skip processing the first function's body, based on the assumption that IR functions are topologically sorted, with callees always coming before their callers

Re: [Mesa-dev] [PATCH 2/4] glsl: Emit function signatures at toplevel, even for built-ins.

2011-08-01 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/01/2011 04:07 PM, Paul Berry wrote: The ast-to-hir conversion needs to emit function signatures in two circumstances: when a function declaration (or definition) is encountered, and when a built-in function is encountered. To avoid

Re: [Mesa-dev] [PATCH 6/7] i915: Fail without crashing if a Mesa IR program uses too many registers

2011-08-01 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/01/2011 11:39 AM, Eric Anholt wrote: On Mon, 1 Aug 2011 10:20:22 -0700, Ian Romanick i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com So far this can only happen in GLSL shaders that contain flow-control that could

Re: [Mesa-dev] [PATCH 1/4] Revert glsl: Skip processing the first function's body in do_dead_functions().

2011-08-01 Thread Paul Berry
On 1 August 2011 17:35, Ian Romanick i...@freedesktop.org wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 08/01/2011 04:07 PM, Paul Berry wrote: opt_dead_functions contained a shortcut to skip processing the first function's body, based on the assumption that IR functions are

Re: [Mesa-dev] Mesa (master): Fix PPC detection on darwin

2011-08-01 Thread Michel Dänzer
On Son, 2011-07-31 at 09:47 -0700, Jeremy Huddleston wrote: Module: Mesa Branch: master Commit: e737a99a6fbafe3ba4b5175eea25d1598dbeb9d8 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e737a99a6fbafe3ba4b5175eea25d1598dbeb9d8 Author: Jeremy Huddleston jerem...@apple.com Date: