Re: [Mesa-dev] [PATCH 6/7] intel: Drop gratuitous flush in PBO blit upload.

2011-09-21 Thread Kenneth Graunke
On 09/21/2011 02:20 PM, Eric Anholt wrote: On Wed, 21 Sep 2011 11:22:25 -0700, Kenneth Graunke kenn...@whitecape.org wrote: On 09/21/2011 10:15 AM, Eric Anholt wrote: Since the blit gets sequenced after other batchbuffer rendering like normal, there's no need to push things out early

Re: [Mesa-dev] [PATCH 3/5] glsl: Convert ir_call to be a statement rather than an rvalue.

2011-09-21 Thread Kenneth Graunke
On 09/21/2011 01:47 PM, Paul Berry wrote: On 20 September 2011 18:28, Kenneth Graunke wrote: [...] diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp index 4264847..bc0b589 100644 --- a/src/glsl/ir_constant_expression.cpp +++ b/src/glsl

Re: [Mesa-dev] [PATCH 2/2] glsl: Implement a lowering pass for gl_ClipDistance.

2011-09-21 Thread Kenneth Graunke
opcodes? */ + GLboolean LowerClipDistance; /** Lower gl_ClipDistance from float[8] to vec4[2]? */ /** * \name Forms of indirect addressing the driver cannot do. Overall, this looks great, Paul. Other than my few small comments: Reviewed-by: Kenneth Graunke kenn...@whitecape.org

[Mesa-dev] [PATCH] glsl: Defer initialization of built-in functions until they're needed.

2011-09-22 Thread Kenneth Graunke
for a signature, we can avoid the overhead entirely in these cases. Makes piglit run roughly 18% faster (255 vs. 312 seconds). Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/ast_function.cpp|1 + src/glsl/ast_to_hir.cpp |1 - src

[Mesa-dev] [PATCH] glsl: Stop tree grafting if a variable is overwritten as an 'out' param.

2011-09-22 Thread Kenneth Graunke
Found by inspection. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/opt_tree_grafting.cpp | 37 ++--- 1 files changed, 26 insertions(+), 11 deletions(-) diff --git a/src/glsl/opt_tree_grafting.cpp b/src/glsl/opt_tree_grafting.cpp index

Re: [Mesa-dev] [PATCH] i965: Set the pre/post-blend color clamp flags.

2011-09-22 Thread Kenneth Graunke
; + blend[b].blend1.clamp_range = BRW_RENDERTARGET_CLAMPRANGE_FORMAT; /* _NEW_COLOR */ if (ctx-Color.AlphaEnabled) { Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http

Re: [Mesa-dev] Intel TexImage cleanup

2011-09-22 Thread Kenneth Graunke
of core converted to MapTextureImage, there are places that call AllocTextureImageBuffer then immediately expect -Data to be present, which we wouldn't be able to provide. This looks good to me, but I'm not at all well versed in this. 1, 2, 6, 7 are Reviewed-by: Kenneth Graunke kenn...@whitecape.org

[Mesa-dev] [PATCH] i965: Fix incorrect maximum PS thread count shift on Ivybridge.

2011-09-24 Thread Kenneth Graunke
. Apparently we were just lucky it worked. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_defines.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h

[Mesa-dev] [PATCH] intel: Remove intel_context::has_xrgb_textures/has_luminance_srgb.

2011-09-24 Thread Kenneth Graunke
the remainder of the if-tree that set them. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/intel/intel_context.c | 37 --- src/mesa/drivers/dri/intel/intel_context.h |2 - 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/src

[Mesa-dev] [PATCH v2 1/2] intel: Remove intel_context::has_xrgb_textures/has_luminance_srgb.

2011-09-24 Thread Kenneth Graunke
the remainder of the if-tree that set them. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/intel/intel_context.c | 39 +-- src/mesa/drivers/dri/intel/intel_context.h |2 - 2 files changed, 13 insertions(+), 28 deletions(-) Sorry, meant

[Mesa-dev] [PATCH 2/2] intel: Introduce a new intel_context::gt field to go along with gen.

2011-09-24 Thread Kenneth Graunke
It seems that GT1/GT2 sorts of variations are here to stay, and more special cases will likely be required in the future. Checking by PCI ID via the IS_xxx_GTx macros is cumbersome; introducing a new 'gt' field analogous to intel-gen will make this easier. Signed-off-by: Kenneth Graunke kenn

Re: [Mesa-dev] [RFC PATCH] automake: add support to src/glsl/

2011-09-26 Thread Kenneth Graunke
On 09/26/2011 08:29 AM, Eric Anholt wrote: I'd like to add other libs (hash table) at the src/ level, too, so a single helper lib that is mesa's shared, non-mtypes-using stuff but not things that are really Mesa like the glsl compiler would be nice. Yeah, we really could use a src/util folder.

Re: [Mesa-dev] [PATCH] mesa: Allow override of GL version with environment variables

2011-09-26 Thread Kenneth Graunke
On 09/26/2011 12:57 PM, Ian Romanick wrote: On 09/26/2011 12:05 PM, Chad Versace wrote: It is necessary to manually set the GL version to 3.0 in order to run Piglit tests using glGetUniform*(). This patch allows one to override the version of an OpenGL, OpenGL ES1, or OpenGL ES2 context by

Re: [Mesa-dev] [PATCH 1/7] mesa: Remove ARB_multitexture extension enable flag

2011-09-26 Thread Kenneth Graunke
to me... 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/7] i965: Use 4 bits to store nr_userclip in brw_clip.h.

2011-09-26 Thread Kenneth Graunke
On 09/25/2011 09:21 AM, Paul Berry wrote: Since the i965 driver supports 8 clipping planes now, we need 4 bits to store the number of user clipping planes, not 3. In theory this isn't strictly necessary, since brw_clip.h is only used on pre-GEN6, and pre-GEN6 only advertises support for 6

Re: [Mesa-dev] [PATCH 1/7] i965: Use 4 bits to store nr_userclip in brw_clip.h.

2011-09-26 Thread Kenneth Graunke
clipping planes, but it seems wise to err on the safe side. Patches 1, 3, 5, 6, and 7 (the easy ones) are Reviewed-by: Kenneth Graunke kenn...@whitecape.org I still need to read 2 and 4. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http

[Mesa-dev] [PATCH] i965: Use SIMD16 math on Ivybridge.

2011-09-26 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_fs_emit.cpp | 14 ++ 1 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp index 8176a76..b35d558

Re: [Mesa-dev] [PATCH] i965: Use SIMD16 math on Ivybridge.

2011-09-26 Thread Kenneth Graunke
On 09/26/2011 06:08 PM, Eric Anholt wrote: On Mon, 26 Sep 2011 16:51:34 -0700, Kenneth Graunke kenn...@whitecape.org wrote: Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_fs_emit.cpp | 14 ++ 1 files changed, 10 insertions(+), 4

[Mesa-dev] [PATCH 1/2] i965/fs: Allow SIMD16 with control flow on Ivybridge.

2011-09-26 Thread Kenneth Graunke
The check was designed to forbid it on old generations (Gen5/Ironlake), not on new ones. It just works on Gen7/Ivybridge. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

Re: [Mesa-dev] [PATCH v2] mesa: Allow override of GL version with environment variable

2011-09-27 Thread Kenneth Graunke
what's normally reported. -Brian Ok. I'll change the description to what you suggested. With the description changed: Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org

Re: [Mesa-dev] [PATCH 2/7] glsl: Fix assertion checking types of constant bitshift expressions.

2011-09-28 Thread Kenneth Graunke
are silly, and this ought to work fine too. Certainly the existing code is broken, your new code is not broken, and ir_validate allows mixed types in the IR. *shrug* Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev

Re: [Mesa-dev] [PATCH 3/7] i965/fs: Add support for bit-shift operations.

2011-09-28 Thread Kenneth Graunke
On 09/27/2011 03:08 PM, Eric Anholt wrote: --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index df43be0..d8ce47b

[Mesa-dev] i965 integer division/modulus v3

2011-09-28 Thread Kenneth Graunke
v.3. This time for sure! I've cleaned up the series quite a bit, squashing some patches and splitting others out to try and make it easier to review and avoid breakage. As such, I've dropped most of the R-b's since this series doesn't necessarily look much like the last one. piglit -t op-mod -t

[Mesa-dev] [PATCH 1/8] ir_to_mesa: Don't assertion fail on integer modulus.

2011-09-28 Thread Kenneth Graunke
Drivers implementing GLSL 1.30 want to do integer modulus, and until we can stop generating code via ir_to_mesa, it's easier to make it silently generate rubbish code. Multiply will do. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/program/ir_to_mesa.cpp |5 - 1

[Mesa-dev] [PATCH 4/8] i965: Set the signed/unsigned type bit in Gen4/5 math messages.

2011-09-28 Thread Kenneth Graunke
It never mattered before since we only did floating point math. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_eu_emit.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers

[Mesa-dev] [PATCH 7/8] i965: Reverse the operands for INT DIV prior to Gen6.

2011-09-28 Thread Kenneth Graunke
Apparently on Gen4 and 5, the denominator comes first. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_fs.cpp| 17 +++-- src/mesa/drivers/dri/i965/brw_vec4_emit.cpp | 17 +++-- 2 files changed, 30 insertions(+), 4

[Mesa-dev] [PATCH 8/8] i965: Stop lowering integer division to multiply and reciprocal.

2011-09-28 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Eric Anholt e...@anholt.net --- src/mesa/drivers/dri/i965/brw_shader.cpp |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp

Re: [Mesa-dev] [PATCH 03/15] mesa: Move _mesa_GetAttribLocationARB to shader_query.cpp

2011-09-29 Thread Kenneth Graunke
On 09/29/2011 10:51 AM, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com This allows querying the linked shader itself rather than the Mesa IR. This is the first step towards removing gl_program::Attributes. Signed-off-by: Ian Romanick ian.d.roman...@intel.com NAK.

Re: [Mesa-dev] [PATCH 06/15] mesa: Add hash_table_replace

2011-09-29 Thread Kenneth Graunke
On 09/29/2011 10:51 AM, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/program/hash_table.c | 25 + src/mesa/program/hash_table.h | 15 +++ 2 files changed, 40

Re: [Mesa-dev] [PATCH 08/15] mesa: Add gl_shader_program::AttributeBindings

2011-09-29 Thread Kenneth Graunke
On 09/29/2011 10:51 AM, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com This currently mirrors the state tracking gl_shader_program::Attributes, but I'm working towards eliminating that. Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/mtypes.h

Re: [Mesa-dev] [PATCH 11/15] mesa: Make _mesa_GetActiveAttribARB use the attributes in the shader IR

2011-09-29 Thread Kenneth Graunke
size would be irrelevant. Looks good to me. Reviewed-by: Kenneth Graunke kenn...@whitecape.org - if (type) - *type = attribs-Parameters[index].DataType; + if (type) + *type = var-type-gl_type; + + return; + } + + i++; + } + + /* If the loop did

Re: [Mesa-dev] [PATCH 14/15] mesa: Determine GL_ACTIVE_ATTRIBUTE_MAX_LENGTH by walking the GLSL IR.

2011-09-29 Thread Kenneth Graunke
a terminating NUL byte. */ just to explain the +1 (which the old function didn't include). Otherwise, Reviewed-by: Kenneth Graunke kenn...@whitecape.org +size_t +_mesa_longest_attribute_name_length(struct gl_shader_program *shProg) +{ + if (!shProg-LinkStatus + || shProg-_LinkedShaders

Re: [Mesa-dev] [PATCH 16/16] i965: Add support for GL_EXT_texture_array and GL_MESA_texture_array.

2011-09-29 Thread Kenneth Graunke
On 09/29/2011 03:40 PM, Eric Anholt wrote: From: Kenneth Graunke kenn...@whitecape.org I didn't do it, honest! :) I may have touched it at one point but 99%+ of this came from your original patch. git probably just kept my name when rebasing things. You probably want to --reset-author

Re: [Mesa-dev] [PATCH 2/2] i965 Gen6: Implement gl_ClipVertex.

2011-09-30 Thread Kenneth Graunke
On 09/27/2011 11:05 AM, Paul Berry wrote: This patch implements proper support for gl_ClipVertex by causing the new VS backend to populate the clip distance VUE slots using VERT_RESULT_CLIP_VERTEX when appropriate, and by using the untransformed clip planes in ctx-Transform.EyeUserPlane rather

Re: [Mesa-dev] A few fixes for the preprocessor for GLSL 1.30

2011-09-30 Thread Kenneth Graunke
investigated all of these failures and am here attaching a patch series for review that fixes 5 of them. In the testing I've done, I don't see any changes from this patch series other than the desired piglit fixes. But, of course, I'd be happy for any review. For the series: Reviewed-by: Kenneth Graunke

[Mesa-dev] [PATCH] i965: Enable faster workaround-free math on Ivybridge.

2011-09-30 Thread Kenneth Graunke
. The documentation also still claims that source modifiers and conditional modifiers aren't supported, but empirical evidence and study of the simulator both show that they work just fine. Goodbye workarounds. Math just works now. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri

Re: [Mesa-dev] [PATCH 00/13] Clean up shader attribute handling v2

2011-09-30 Thread Kenneth Graunke
from v1. For the series: Reviewed-by: Kenneth Graunke kenn...@whitecape.org Thanks, Ian. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/5] mesa: use loop in pop_texture_group() to restore 4 combiner terms

2011-09-30 Thread Kenneth Graunke
insertions(+), 24 deletions(-) For patches 1-3: Reviewed-by: Kenneth Graunke kenn...@whitecape.org For patch 5: Acked-by: Kenneth Graunke kenn...@whitecape.org I'm not familiar enough with the code to review patch 4. ___ mesa-dev mailing list mesa-dev

Re: [Mesa-dev] [PATCH] glsl: Consider __ in identifers as reserved in GLSL 1.30+.

2011-10-03 Thread Kenneth Graunke
was already processed earlier (though it hasn't been emitted That text is present in 1.10 and ES as well, so you should probably just drop the version check. With that change, Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev

[Mesa-dev] [PATCH 3/3] api: Allow GL_CLIP_PLANE0+6 and GL_CLIP_PLANE0+7.

2011-10-04 Thread Kenneth Graunke
Fixes the ES1 conformance 'userclip' test, which broke when we increased MAX_CLIP_PLANES to 8. Core Mesa already validates incoming values against MAX_CLIP_PLANES; we just need the ES wrapper to pass everything through. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/main

Re: [Mesa-dev] [PATCH] glsl: Consider __ in identifers as reserved in GLSL 1.30+.

2011-10-04 Thread Kenneth Graunke
On 10/04/2011 05:36 PM, Eric Anholt wrote: On Tue, 04 Oct 2011 12:11:54 -0700, Ian Romanick i...@freedesktop.org wrote: On 10/04/2011 10:39 AM, Eric Anholt wrote: On Mon, 03 Oct 2011 17:02:29 -0700, Kenneth Graunkekenn...@whitecape.org wrote: On 10/03/2011 04:51 PM, Eric Anholt wrote: ---

Re: [Mesa-dev] [PATCH 2/3] i965/fs: Fix comparisions with uint negation.

2011-10-05 Thread Kenneth Graunke
On 10/03/2011 03:41 PM, Eric Anholt wrote: The condmod instruction ends up generating garbage condition codes, because apparently the comparison happens on the accumulator value (33 bits for UD), not the truncated value that would be written. Fixes fs-op-neg-* I am uneasy about these two

Re: [Mesa-dev] [PATCH 1/3] glsl: Add support for constant expression evaluation on round(), roundEven().

2011-10-05 Thread Kenneth Graunke
On 10/04/2011 01:23 PM, Eric Anholt wrote: On Tue, 4 Oct 2011 04:42:55 +0200, Henri Verbeet hverb...@gmail.com wrote: On 4 October 2011 00:41, Eric Anholt e...@anholt.net wrote: They're both implemented the same in GLSL IR (since round() has undefined behavior for n + 0.5). The specification

Re: [Mesa-dev] [PATCH 0/9] Elminate redudnant Mesa IR references

2011-10-05 Thread Kenneth Graunke
in gl_shader_program::_LinkedShaders has a reference to the same Mesa IR. The first three patches eliminate the extra references, and the remaining six implement some refactors and clean-ups enabled by the first three. Looks good to me, Ian, though I admit skimming through some of it. Reviewed-by: Kenneth

[Mesa-dev] [PATCH] i965: Replace incorrect use of GLboolean with enum brw_compression.

2011-10-07 Thread Kenneth Graunke
; clang then gave warnings about switching on a boolean and ultimately duplicated case errors. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_defines.h |8 +--- src/mesa/drivers/dri/i965/brw_eu.c |4 +++- src/mesa/drivers/dri/i965/brw_eu.h

Re: [Mesa-dev] [PATCH] mesa: do not define NDEBUG to make sure assert work

2011-10-08 Thread Kenneth Graunke
On 10/08/2011 02:08 AM, Yuanhan Liu wrote: If you include mtypes.h, which would define macro NDEBUG, before including compiler.h, you would find that the assert macro will no longer work; it just make it slient by replacing it with ((void) (0)); Signed-off-by: Yuanhan Liu

Re: [Mesa-dev] [PATCH 1/2] hash_table: Make string_to_uint_map make a copy of the name

2011-10-10 Thread Kenneth Graunke
=41499 Cc: Stéphane Marchesin stephane.marche...@gmail.com Cc: Luzipher luziphermcl...@yahoo.ie Cc: Michał Lipski tall...@o2.pl --- src/mesa/program/hash_table.h | 18 +- 1 files changed, 17 insertions(+), 1 deletions(-) For both patches: Reviewed-by: Kenneth Graunke kenn

[Mesa-dev] i965 Data Port fixes and clean-ups

2011-10-10 Thread Kenneth Graunke
Patch 1 fixes the variable indexing Piglit tests on Ivybridge. I was hoping it would also fix bug 41318 (rendering issues in GLBenchmark/PRO) as well, but alas. Still, seems worthwhile; the old code was clearly wrong. Patch 2 may be somewhat controversial, and implements a change in behavior on

[Mesa-dev] [PATCH 01/10] i965: Use Ivybridge's Legacy Data Port for reads/writes.

2011-10-10 Thread Kenneth Graunke
were attempting to use the render cache with message 9, which was Memory Barrier. Not quite the desired effect. +205 piglits. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_defines.h |5 + src/mesa

[Mesa-dev] [PATCH 03/10] i965: Rename BRW_MESSAGE_TARGET_* to BRW_SFID_* and document them.

2011-10-10 Thread Kenneth Graunke
the documentation, and rename them to SFID to signify that these are Shared Function IDs that one can read about in the GPU overview, rather than arbitrary bitfields. While we're add it, make them an enum. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 04/10] i965: Document the brw_instruction Message Descriptor structures.

2011-10-10 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_structs.h | 29 +++-- 1 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index e1947d5

[Mesa-dev] [PATCH 02/10] i965: Use the Render Cache for all data port reads on Sandybridge.

2011-10-10 Thread Kenneth Graunke
later cleanups labeled it properly as Sampler Cache. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_eu_emit.c |9 + 1 files changed, 1 insertions(+), 8 deletions(-) Eric seemed to think that using

[Mesa-dev] [PATCH 05/10] i965: Remove EOT parameter from brw_SAMPLE and brw_set_sampler_message.

2011-10-10 Thread Kenneth Graunke
set EOT to 0. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_eu.h|1 - src/mesa/drivers/dri/i965/brw_eu_emit.c | 14 +- src/mesa/drivers/dri/i965/brw_fs_emit.cpp |1 - src/mesa/drivers/dri/i965/brw_wm_emit.c |2 -- 4

[Mesa-dev] [PATCH 06/10] i965: Factor out code for setting Message Descriptors.

2011-10-10 Thread Kenneth Graunke
a lot of the per-generation complexity (like the SFID being in destreg__conditionalmod) in one spot. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_eu_emit.c | 195 --- 1 files changed, 73 insertions(+), 122 deletions(-) diff

[Mesa-dev] [PATCH 09/10] i965: Document most of the brw_instruction message structs.

2011-10-10 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_structs.h | 118 +-- 1 files changed, 79 insertions(+), 39 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_structs.h b/src/mesa/drivers/dri/i965/brw_structs.h index

Re: [Mesa-dev] gl_NormalMatrix issue on Intel driver

2011-10-11 Thread Kenneth Graunke
On 10/11/2011 01:21 PM, tom fogal wrote: Ian Romanick i...@freedesktop.org writes: Yikes! A *lot* has changed in the fragment shader back-end for i965 since 7.10.2. Have you at least tried 7.10.3? 7.11? I have not. To be honest, I am pretty daunted by trying a new X driver. I don't

Re: [Mesa-dev] [PATCH 01/10] i965: Use Ivybridge's Legacy Data Port for reads/writes.

2011-10-12 Thread Kenneth Graunke
On 10/11/2011 09:13 PM, Eric Anholt wrote: On Mon, 10 Oct 2011 16:31:44 -0700, Kenneth Graunke kenn...@whitecape.org wrote: Using the constant cache for reads isn't going to work for scratch reads (variably-indexed arrays or register spills), as these aren't constant at all. Also

Re: [Mesa-dev] [PATCH 2/2] i965: Fix piglit glsl-1.30/texel-offset-limits.

2011-10-15 Thread Kenneth Graunke
On 10/15/2011 01:57 PM, Eric Anholt wrote: --- src/mesa/drivers/dri/i965/brw_context.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index dc91852..ec9dc35 100644 ---

Re: [Mesa-dev] [PATCH 1/2] mesa: Make the program texel offsets limits available with GLSL 1.30.

2011-10-15 Thread Kenneth Graunke
= 130) { + total++; + enabled++; + } + break; case EXTRA_END: break; default: /* *e is a offset into the extension struct */ This patch looks good to me. Reviewed-by: Kenneth Graunke kenn...@whitecape.org

[Mesa-dev] [PATCH] mesa: Remove unnecessary and incorrect TexEnv parameter validation.

2011-10-18 Thread Kenneth Graunke
validation code directly compares the GLfixed input parameter with a floating point constant, prior to converting fixed-point to floating point. Fixes an issue in the OpenGL ES 1.1 conformance suite. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/main/APIspec.xml |6

[Mesa-dev] [PATCH] i965: Enable faster workaround-free math on Ivybridge.

2011-10-18 Thread Kenneth Graunke
. The documentation also still claims that source modifiers and conditional modifiers aren't supported, but empirical evidence and study of the simulator both show that they work just fine. Goodbye workarounds. Math just works now. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri

Re: [Mesa-dev] Fixed function fragment shader to GLSL

2011-10-18 Thread Kenneth Graunke
On 10/18/2011 11:39 AM, Jakob Bornecrantz wrote: - Original Message - Here's this patch series again, part of the kill-Mesa-IR goal we have for next release. It's been no regressions for me for a while, I was just trying to track down a 2% performance regression on gen6. It turns

Re: [Mesa-dev] [PATCH 0/6] More shader API internal house cleaning

2011-10-18 Thread Kenneth Graunke
anyway...so I'm fine with it. Reviewed-by: Kenneth Graunke kenn...@whitecape.org I'm not planning on reviewing patch 6 since Bryan already did and I figure it's pretty similar to 5 anyway. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http

[Mesa-dev] [PATCH 1/2] i965: Set MaxIfDepth to UINT_MAX on Gen6+ and 16 on prior generations.

2011-10-18 Thread Kenneth Graunke
right away because we usually throw away ir_to_mesa's code in favor of the native VS and FS backends...but this still creates a lot of unnecessary work. Signed-off-by: Kenneth Graunke kenn...@whitecape.org Cc: Bryan Cain bryanca...@gmail.com Cc: Ian Romanick i...@freedesktop.org --- src/mesa/drivers

[Mesa-dev] [PATCH 2/2] glsl: Short-circuit lower_if_to_cond_assign when MaxIfDepth is UINT_MAX.

2011-10-18 Thread Kenneth Graunke
Setting MaxIfDepth to UINT_MAX effectively means don't lower anything. Explicitly checking for this common case allows us to avoid walking the IR, computing nesting levels, and so on. Signed-off-by: Kenneth Graunke kenn...@whitecape.org Cc: Bryan Cain bryanca...@gmail.com Cc: Ian Romanick i

[Mesa-dev] [PATCH 1/3] i965: Fix incorrect dirty bit in gen6_prepare_wm_push_constants.

2011-10-18 Thread Kenneth Graunke
We definitely want CACHE_NEW_WM_PROG, not CACHE_NEW_VS_PROG. NOTE: This is a candidate for the 7.11 branch. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/gen6_wm_state.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa

[Mesa-dev] [PATCH 2/3] i965: Use AUB_TRACE_WM_CONSTANTS in gen7_prepare_wm_push_constants.

2011-10-18 Thread Kenneth Graunke
This makes it match gen6_prepare_wm_push_constants. For some reason, it had been using AUB_TRACE_NO_TYPE. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/gen7_wm_state.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers

[Mesa-dev] [PATCH 3/3] i965: Remove copy and pasted gen7_wm_constants state atom.

2011-10-18 Thread Kenneth Graunke
Now that this is identical to gen6_wm_constants, just use that instead. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_state_upload.c |2 +- src/mesa/drivers/dri/i965/gen7_wm_state.c| 55 -- 2 files changed, 1 insertions

[Mesa-dev] [PATCH] i965: Apply post-sync non-zero workaround to homebrew workaround.

2011-10-21 Thread Kenneth Graunke
. NOTE: This is candidate for the 7.11 branch. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40324 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41096 Signed-off-by: Kenneth Graunke kenn...@whitecape.org Cc: Eric Anholt e...@anholt.net --- src/mesa/drivers/dri/i965/gen6_vs_state.c

Re: [Mesa-dev] [PATCH 2/2] linker: Eliminate more dead code after demoting shader inputs and outputs

2011-10-21 Thread Kenneth Graunke
...@vmware.com For this patch (2/2): 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] Fix gcc version checks for _mesa_bitcount

2011-10-21 Thread Kenneth Graunke
: This is a candidate for the stable branches. Signed-off-by: Alan Coopersmith alan.coopersm...@oracle.com For both patches: Reviewed-by: Kenneth Graunke kenn...@whitecape.org Thanks, Alan. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http

Re: [Mesa-dev] [PATCH 1/2] glsl: Add uniform_locations_assigned parameter to do_dead_code opt pass

2011-10-21 Thread Kenneth Graunke
bryanca...@gmail.com Cc: Vinson Lee v...@vmware.com Cc: José Fonseca jfons...@vmware.com Cc: Kenneth Graunke kenn...@whitecape.org I had wondered why we couldn't just check var-mode == ir_var_uniform var-location == -1, but Ian mentioned that (at least after his upcoming patches) it wasn't set yet

Re: [Mesa-dev] [PATCH] intel: Kill intel_mipmap_level::nr_images

2011-10-22 Thread Kenneth Graunke
On 10/21/2011 08:45 PM, Chad Versace wrote: For all texture targets except GL_TEXTURE_CUBE_MAP, the 'nr_images' and 'depth' fields of intel_mipmap_level were identical. In the exceptional case, nr_images == 6 and depth == 1. It is simple to determine if a texture is a cube or not, so the

Re: [Mesa-dev] [PATCH 2/2] glsl: Add support for constant expression evaluation on round(), roundEven().

2011-10-22 Thread Kenneth Graunke
rounding mode safety. Fixes glsl-1.30/compiler/built-in-functions/round* For the series: 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] glsl: Add gl_MaxVaryingComponents in GLSL 1.30.

2011-10-23 Thread Kenneth Graunke
, state-Const.MaxClipPlanes); + add_builtin_constant(instructions, symtab, gl_MaxVaryingComponents, + state-Const.MaxVaryingFloats); } Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa

Re: [Mesa-dev] [PATCH] glsl: Generate an error for array-of-array declarations

2011-10-24 Thread Kenneth Graunke
On 10/24/2011 12:29 PM, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com Other parts of the code already caught things like 'float x[4][2]'. However, nothing caught 'float [4] x[2]'. Fixes piglit test array-multidimensional-new-syntax.vert. Signed-off-by: Ian Romanick

Re: [Mesa-dev] [PATCH] glsl: Rename remaining internal builtins from gl_MESA* to gl_*MESA.

2011-10-24 Thread Kenneth Graunke
On 10/24/2011 01:44 PM, Eric Anholt wrote: This matches the usual convention for extension builtin variables. I like the color of your bike shed. Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev

[Mesa-dev] [PATCH 1/4] i965: Remove single threaded INTEL_DEBUG mode.

2011-10-24 Thread Kenneth Graunke
it as it isn't that useful anyway. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_clip_state.c |3 --- src/mesa/drivers/dri/i965/brw_context.c|5 - src/mesa/drivers/dri/i965/brw_sf_state.c |3 --- src/mesa/drivers/dri/intel/intel_context.c |2

[Mesa-dev] [PATCH 2/4] i965: Rename (vs|wm)_max_threads to max_(vs|wm)_threads for consistency.

2011-10-24 Thread Kenneth Graunke
The inconsistency between vs_max_threads and max_vs_entries was rather annoying. I could never seem to remember which one was reversed, which made it harder to find quickly. Max __ Threads seems more natural. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 3/4] i965: Add new brw_context::max_gs_threads constant.

2011-10-24 Thread Kenneth Graunke
These are correct to the best of my knowledge, gleaned from a variety of internal sources. Sadly, the Sandybridge PRM has incorrect limits. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_context.c |7 +++ src/mesa/drivers/dri/i965/brw_context.h

[Mesa-dev] [PATCH 4/4] i965: Add more #defines for Gen6+ 3DSTATE_GS fields.

2011-10-24 Thread Kenneth Graunke
These should be useful for doing transform feedback on Sandybridge. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_defines.h |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa

Re: [Mesa-dev] [PATCH 4/4] ir_to_mesa: Use uniform_field_visitor to add all struct fields to parameter list

2011-10-24 Thread Kenneth Graunke
Romanick ian.d.roman...@intel.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41980 Cc: Brian Paul bri...@vmware.com Cc: Bryan Cain bryanca...@gmail.com Cc: Vinson Lee v...@vmware.com Cc: José Fonseca jfons...@vmware.com Cc: Kenneth Graunke kenn...@whitecape.org --- src/mesa

Re: [Mesa-dev] [PATCH 3/4] linker: Add uniform_field_visitor class to process leaf fields of a uniform

2011-10-24 Thread Kenneth Graunke
On 10/24/2011 02:16 PM, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/glsl/Makefile |1 + src/glsl/link_uniforms.cpp | 116 src/glsl/linker.h

[Mesa-dev] [PATCH] ralloc: Add new [v]asprintf_rewrite_tail functions.

2011-10-24 Thread Kenneth Graunke
to appending. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/ralloc.c | 27 +--- src/glsl/ralloc.h | 57 + 2 files changed, 80 insertions(+), 4 deletions(-) diff --git a/src/glsl/ralloc.c b/src/glsl

[Mesa-dev] [PATCH 3/4 v2] linker: Add uniform_field_visitor class to process leaf fields of a uniform

2011-10-24 Thread Kenneth Graunke
From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/Makefile |1 + src/glsl/link_uniforms.cpp | 85 src/glsl/linker.h

Re: [Mesa-dev] [PATCH 1/3] mesa: Fold gallium's texture border stripping into a core Mesa option.

2011-10-25 Thread Kenneth Graunke
On 10/24/2011 04:15 PM, Eric Anholt wrote: We wanted to reuse this in the Intel driver. As the Fedora Hot Dog theme chooser applet(*) says: YES or HELL YES! For the series: Reviewed-by: Kenneth Graunke kenn...@whitecape.org (*) http://fedoraproject.org/wiki/Features/Hot_Dog

Re: [Mesa-dev] [PATCH 1/2] mesa: Add glsl_type::get_scalar_type() function.

2011-10-25 Thread Kenneth Graunke
On 10/25/2011 04:47 PM, Paul Berry wrote: This function is similar to get_base_type(), but when called on arrays, it returns the scalar type composing the array. For example, glsl_type(vec4[]) = float_type. --- src/glsl/glsl_types.cpp | 23 +++ src/glsl/glsl_types.h

Re: [Mesa-dev] [PATCH 2/2] i965: Fix flat integral varyings.

2011-10-25 Thread Kenneth Graunke
On 10/25/2011 04:47 PM, Paul Berry wrote: Previously, the vertex and fragment shader back-ends assumed that all varyings were floats. In GLSL 1.30 this is no longer true--they can also be of integral types provided that they have an interpolation qualifier of flat. This required two

[Mesa-dev] [PATCH] i965: Use GL_RED for DEPTH_TEXTURE_MODE in ES 3.0 for unsized formats.

2013-01-23 Thread Kenneth Graunke
Khronos has apparently decided that depth textures with sized formats (allowed with ARB_internalformat_query or ES 3.0) should be treated as GL_RED, while unsized formats (an existing feature) should be treated as GL_INTENSITY for compatibility with ES 2.0. Ian is proposing changes to

Re: [Mesa-dev] [PATCH 5/8] i965: reuse _mesa_sizeof_type for index buffer types.

2013-01-24 Thread Kenneth Graunke
On 01/23/2013 11:17 AM, Eric Anholt wrote: The core Mesa code has just one more case than this (GL_BITMAP), so I don't see any cause to special-case it. It also doesn't have the packed format support, but I guess that isn't relevant for index buffers (only vertex data). Might be worth a

Re: [Mesa-dev] [PATCH 8/8] i965: Pass in the glarray to get_surface_type.

2013-01-24 Thread Kenneth Graunke
). And wow, this patch makes the code so much easier to follow. Nice cleanups and a modest performance improvement to boot! For the series: Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_draw_upload.c | 51 --- 1 file changed

Re: [Mesa-dev] [PATCH 19/32] glsl: Handle instance array declarations

2013-01-24 Thread Kenneth Graunke
On 01/23/2013 07:53 PM, Paul Berry wrote: On 22 January 2013 00:52, Ian Romanick i...@freedesktop.org mailto:i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com mailto:ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com

Re: [Mesa-dev] [PATCH 00/32] UBOs for OpenGL ES 3.0

2013-01-24 Thread Kenneth Graunke
Patches 1-9, 11-22, and 32 are: Reviewed-by: Kenneth Graunke kenn...@whitecape.org I haven't read the others yet. No objections, just...haven't gotten to them. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org

Re: [Mesa-dev] [PATCH] intel: Fix glCopyTexSubImage on buffers whose width = 32kbytes

2013-01-24 Thread Kenneth Graunke
) { perf_debug(no support for array textures\n); 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 24/32] glsl: Make the align function available elsewhere in the linker

2013-01-24 Thread Kenneth Graunke
On 01/22/2013 12:52 AM, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/glsl/glsl_types.cpp | 12 +++- src/glsl/glsl_types.h| 6 ++ src/glsl/link_uniforms.cpp | 14

Re: [Mesa-dev] [PATCH] intel: Use a CPU map of the batch on LLC-sharing architectures.

2013-01-24 Thread Kenneth Graunke
performance by 1.1 +/- 0.1% (n=76). Improves cairo-gl performance by 1.9% +/- 1.4% (n=57). No statistically significant difference in GLB2.1 on SNB (n=37). Improves cairo-gl performance by 2.1% +/- 0.1% (n=278). Looks good to me. Have you tested this on a non-LLC machine? Reviewed-by: Kenneth

Re: [Mesa-dev] [PATCH 24/32] glsl: Make the align function available elsewhere in the linker

2013-01-25 Thread Kenneth Graunke
On 01/25/2013 05:43 AM, Ian Romanick wrote: On 01/24/2013 08:40 PM, Kenneth Graunke wrote: On 01/22/2013 12:52 AM, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/glsl/glsl_types.cpp | 12

Re: [Mesa-dev] [PATCH] intel: Use a CPU map of the batch on LLC-sharing architectures.

2013-01-25 Thread Kenneth Graunke
On 01/25/2013 09:31 AM, Eric Anholt wrote: Kenneth Graunke kenn...@whitecape.org writes: On 01/20/2013 02:59 PM, Eric Anholt wrote: Before, we were keeping a CPU-only buffer to accumulate the batchbuffer in, which was an improvement over mapping the batch through the GTT directly (since any

[Mesa-dev] [PATCH] intel: Un-hardcode lengths from blitter commands.

2013-01-25 Thread Kenneth Graunke
The packet length may change at some point in the future. Specifying it explicitly (rather than hardcoding it in the command #define) allows us to change it much more easily in the future. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/intel/intel_blit.c | 8

Re: [Mesa-dev] [PATCH] i965: Compile the driver with -march=core2.

2013-01-25 Thread Kenneth Graunke
On 01/25/2013 03:13 PM, Roland Scheidegger wrote: I'm quite sure there are g965 boards around which indeed support Pentium 4 (and P4-based Celerons) (but yes I guess cmov and at least sse2 are safe - not that the p4 had a usable cmov implementation as it was incredibly slow IIRC but it should at

<    1   2   3   4   5   6   7   8   9   10   >