Re: [Mesa-dev] [PATCH 1/3] mesa: fix GL error checking in TransformFeedbackVaryings

2011-10-26 Thread Kenneth Graunke
== GL_SEPARATE_ATTRIBS +count ctx-Const.MaxTransformFeedbackSeparateAttribs)) { _mesa_error(ctx, GL_INVALID_VALUE, glTransformFeedbackVaryings(count=%d), count); return; Thanks, Marek! For the series: Reviewed-by: Kenneth Graunke kenn...@whitecape.org

Re: [Mesa-dev] [PATCH v2 1/8] mesa: Expose GLSL interpolation qualifiers in gl_fragment_program.

2011-10-26 Thread Kenneth Graunke
-Target == GL_FRAGMENT_PROGRAM_ARB; and not actually bother to pass the extra flag everywhere. Otherwise, looks good. This patch is: Reviewed-by: Kenneth Graunke kenn...@whitecape.org (as is or with the change) this-ht = hash_table_ctor(0

Re: [Mesa-dev] [PATCH v2 2/8] glsl: Distinguish between no interpolation qualifier and 'smooth'

2011-10-26 Thread Kenneth Graunke
. Consider those Reviewed-by: Kenneth Graunke kenn...@whitecape.org I'm getting a little lost reading through the rest of the i965 code, but I'll try get through that today. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org

Re: [Mesa-dev] [PATCH] glsl: translate transform feedback varyings into low-level representation

2011-10-27 Thread Kenneth Graunke
On 10/26/2011 03:28 PM, Marek Olšák wrote: This adds a function that takes an array of varyings from glTranformFeedbackVaryingsEXT and generates gl_transform_feedback_info, which is supposed to be consumed by drivers. Useful for ir_to_mesa and glsl_to_tgsi. With Dan McCabe's patch, I think

[Mesa-dev] [PATCH] glsl: Remove pointless uses of glsl_type::get_base_type().

2011-10-27 Thread Kenneth Graunke
These are effectively doing type-get_base_type()-base_type, which is equivalent to type-base_type. Just use that, as it's simpler. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/ir_print_visitor.cpp |4 +--- src/glsl/ir_reader.cpp|6 ++ 2 files changed, 3

[Mesa-dev] [PATCH] i965: Use the actual hardware g0 register for texel offset setup.

2011-10-27 Thread Kenneth Graunke
. This is just some arbitrary GRF temporary which will get register allocated. So, we ended up setting up the header with garbage. 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

Re: [Mesa-dev] [PATCH 2/5] glsl: Extend s-expression parsing to handle infinity.

2011-10-27 Thread Kenneth Graunke
this patch and just use INFINITY in the built-in files. I'm honestly okay with any of these. For the series: Reviewed-by: Kenneth Graunke kenn...@whitecape.org diff --git a/src/glsl/s_expression.cpp b/src/glsl/s_expression.cpp index e704a3b..4391488 100644 --- a/src/glsl/s_expression.cpp +++ b/src

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

2011-10-28 Thread Kenneth Graunke
ian.d.roman...@intel.com 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] fix compilation of glsl_lexer.ll with msvc

2011-10-29 Thread Kenneth Graunke
On 10/29/2011 01:42 AM, Morgan Armand wrote: strtoull is not supported on msvc (as there is no C99 support). --- src/glsl/glsl_lexer.ll |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/glsl/glsl_lexer.ll b/src/glsl/glsl_lexer.ll index e444536..00065d5

Re: [Mesa-dev] [PATCH 07/20] mesa: Refactor parameter validate for GetUniform, Uniform, and UniformMatrix

2011-10-30 Thread Kenneth Graunke
On 10/28/2011 10:42 AM, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/uniforms.c | 142 +- 1 files changed, 90 insertions(+), 52 deletions(-) diff

Re: [Mesa-dev] [PATCH 06/20] mesa: Move {split, merge}_location_offset to uniforms.h

2011-10-30 Thread Kenneth Graunke
On 10/28/2011 10:42 AM, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com Also prepend _mesa_uniform_ to the names. Signed-off-by: Ian Romanick ian.d.roman...@intel.com ... -static void -merge_location_offset(GLint *location, GLint offset) -{ - *location = (*location

Re: [Mesa-dev] [PATCH] glsl: Fix type mismatch when incrementing or decrementing uint.

2011-11-01 Thread Kenneth Graunke
inc/dec specific about this, and it might be more useful in general... Otherwise, looks like a good fix. Thanks! Reviewed-by: Kenneth Graunke kenn...@whitecape.org (if you decide to go with this instead of taking my suggestion) ___ mesa-dev mailing list

Re: [Mesa-dev] [PATCH 3/4] glsl: Refactor generate_ARB_draw_buffers_variables to use add_builtin_constant

2011-11-01 Thread Kenneth Graunke
-Const.MaxDrawBuffers)); I like this. You can actually drop the int() cast, though: the fourth parameter of add_builtin_constant is an int type, so it'll already convert from uint to int and create the right kind of ir_constant. Either way, this mini-series is: Reviewed-by: Kenneth Graunke kenn

Re: [Mesa-dev] [PATCH 1/2] mesa: Set the Integer field of gl_client_array properly.

2011-11-01 Thread Kenneth Graunke
be interpreted properly by driver back-ends. For the series: Reviewed-by: Kenneth Graunke kenn...@whitecape.org Though, I must admit that I'm very unfamiliar with the VBO code, and not too familiar with the 965 code you changed either. Still, your changes look good

Re: [Mesa-dev] [PATCH] ralloc: Use _vscprintf on MinGW.

2011-11-01 Thread Kenneth Graunke
On 11/01/2011 12:11 AM, José Fonseca wrote: MinGW uses MSVC's runtime DLLs for most of C runtime's functions, and there has same semantics for vsnprintf. Not sure how this worked until now -- maybe one of the internal vsnprintf implementations was taking precedence. No objections here.

Re: [Mesa-dev] [PATCH 1/2] intel: fix potential segfault error

2011-11-01 Thread Kenneth Graunke
|| !intel_image-mt) return; + level = intel_image-base.Base.Level; + face = intel_image-base.Base.Face; mt = intel_image-mt; if (mt-target == GL_TEXTURE_3D || Patch 1/2 is: Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa

Re: [Mesa-dev] Legacy Drivers

2011-11-02 Thread Kenneth Graunke
On 11/01/2011 06:19 PM, Don Cupp wrote: Please forgive if this is the wrong list for these questions or if they have already been asked and answered. I am trying to figure out where the unichrome driver went in the 7.12-devel branch and if it is coming back. Anybody have some clues for me?

Re: [Mesa-dev] intel GPU freeze with master, with apitrace log

2011-11-02 Thread Kenneth Graunke
On 11/02/2011 11:14 AM, tom fogal wrote: Ping? -tom Tom, You'll probably want to open a bug report on this just so it doesn't get lost. Sorry it's been taking so long. I was able to reproduce the hang on SNB by replaying your apitrace file. Nothing jumped out at me from the error state.

Re: [Mesa-dev] [PATCH 1/2] mesa: add missing checks to compute_version

2011-11-06 Thread Kenneth Graunke
On 11/04/2011 05:42 PM, Marek Olšák wrote: --- src/mesa/main/version.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) For this patch: Reviewed-by: Kenneth Graunke kenn...@whitecape.org (sorry, haven't looked at the other one

Re: [Mesa-dev] [PATCH] glsl: Clamp vector indices when lowering to swizzles

2011-11-08 Thread Kenneth Graunke
(since we can't generate an error at this point.) Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 1/2] i965: Add new vtable entries for surface state updating functions.

2011-11-08 Thread Kenneth Graunke
pointer and are only used on Gen4, just add a forward declaration. This is the simplest (if not cleanest) solution. It would be nicer to have a i965-specific vtable, but that's a refactor for another day. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_state.h

[Mesa-dev] [PATCH 2/2] i965: Use new vtable entries for surface state updating functions.

2011-11-08 Thread Kenneth Graunke
Now that we have vtable entries in place, we should use them. This allows us to drop the cut and pasted Gen7 brw_tracked_state atoms as they now do exactly the same thing as their brw_wm_surface_state counterparts. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri

[Mesa-dev] [PATCH] glsl: Remove texture built-ins with 'bias' from 1.30 VS profile.

2011-11-08 Thread Kenneth Graunke
From the GLSL 1.30 spec, section 8.7 Texture Lookup Functions: In all functions below, the bias parameter is optional for fragment shaders. The bias parameter is not accepted in a vertex shader. This was a cut and paste mistake. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src

Re: [Mesa-dev] [PATCH 01/10] i965: Re-disable EXT_texture_float pre-gen5.

2011-11-08 Thread Kenneth Graunke
On 11/04/2011 03:01 PM, Eric Anholt wrote: Texture filtering is not supported on floating-point textures until gen5, which showed up as failures in texwrap in particular. --- src/mesa/drivers/dri/intel/intel_extensions.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-)

Re: [Mesa-dev] [PATCH 05/10] i965: Enable ChooseTexFormat for supported GL_EXT_texture_integer formats.

2011-11-08 Thread Kenneth Graunke
] = GL_TRUE; + } + #ifdef TEXTURE_FLOAT_ENABLED ctx-TextureFormatSupported[MESA_FORMAT_RGBA_FLOAT32] = true; ctx-TextureFormatSupported[MESA_FORMAT_RG_FLOAT32] = true; I think you mean true here. Otherwise, Reviewed-by: Kenneth Graunke kenn...@whitecape.org

[Mesa-dev] i965 Binding Table rework and VS texturing state setup.

2011-11-08 Thread Kenneth Graunke
Patches 1 and 2 are simple bug fixes. Patches 3-10 significantly rework our binding table setup. They disable prefetching of SURFACE_STATE entries, use a single binding table for all pipeline stages, and most importantly, pave the way for getting textures into the VS binding table. This may

[Mesa-dev] [PATCH 01/13] i965: Add missing CACHE_NEW_WM_PROG dirty bit to WM pull constants.

2011-11-08 Thread Kenneth Graunke
. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 534c127

[Mesa-dev] [PATCH 02/13] i965: Remove BRW_NEW_NR_VS_SURFACES dirty bit from brw_vs_surfaces.

2011-11-08 Thread Kenneth Graunke
, generated)' failed. One such piglit test is vs-uniform-array-mat2-col-rd.shader_test. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_vs_surface_state.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 03/13] i965: Remove outdated comment about CACHE_NEW_SURF_BIND dirty bit.

2011-11-08 Thread Kenneth Graunke
The comment states that brw_update_vs_constant_surface produces a CACHE_NEW_SURF_BIND dirty bit, but it doesn't. In fact, that bit no longer even exists. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_vs_surface_state.c |3 +-- 1 files changed, 1

[Mesa-dev] [PATCH 04/13] i965: Use 0 for the number of binding table entries in 3DSTATE_(VS|WM).

2011-11-08 Thread Kenneth Graunke
future refactoring easier. So just set 0 for the number of entries rather than trying to compute and track it. Appears to have no impact on Nexuiz and OpenArena on Sandybridge. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_context.h |4 src

[Mesa-dev] [PATCH 05/13] i965: Remove nr_surfaces computation from brw_update_wm_surfaces.

2011-11-08 Thread Kenneth Graunke
This code is fairly fragile, as it depends on the ordering of the entries in the binding table, which will change soon. Also, stop listening on the BRW_NEW_WM_CONSTBUF dirty bit as it's no longer required. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 06/13] i965: Rename gen6_*_constants tracked state atoms to push_constants.

2011-11-08 Thread Kenneth Graunke
the code and save me from constant confusion over the fact that gen6_wm_constants isn't just a newer version of brw_wm_constants. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_state.h|4 ++-- src/mesa/drivers/dri/i965/brw_state_upload.c |8

[Mesa-dev] [PATCH 07/13] i965: Combine the two WM pull constant tracked state atoms.

2011-11-08 Thread Kenneth Graunke
the Gen6+ atoms that handle push constants. Finally, remove the BRW_NEW_WM_CONSTBUF dirty bit entirely now that it's never flagged nor used. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_context.h |2 - src/mesa/drivers/dri/i965/brw_state.h

[Mesa-dev] [PATCH 08/13] i965: Split brw_wm_surfaces state into renderbuffer and texture atoms.

2011-11-08 Thread Kenneth Graunke
. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_state.h|3 +- src/mesa/drivers/dri/i965/brw_state_upload.c |9 +++-- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 38 +++-- 3 files changed, 35 insertions(+), 15

[Mesa-dev] [PATCH 09/13] i965: Use a single binding table for all pipeline stages.

2011-11-08 Thread Kenneth Graunke
in the table. The hardware supports up to 254 binding table entries, and we currently only use 26. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_context.h | 74 + src/mesa/drivers/dri/i965/brw_misc_state.c|8 +- src/mesa

[Mesa-dev] [PATCH 10/13] i965: Clean up code for VS pull constant surface creation.

2011-11-08 Thread Kenneth Graunke
-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_state.h|3 +- src/mesa/drivers/dri/i965/brw_state_upload.c | 20 --- src/mesa/drivers/dri/i965/brw_vs_surface_state.c | 61 +++--- 3 files changed, 20 insertions(+), 64 deletions(-) diff

[Mesa-dev] [PATCH 11/13] i965: Move and rename wm sampler fields to just sampler.

2011-11-08 Thread Kenneth Graunke
::sampler that can be shared without looking strange. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_context.h |9 ++--- src/mesa/drivers/dri/i965/brw_state.h|2 +- src/mesa/drivers/dri/i965/brw_state_upload.c |5

[Mesa-dev] [PATCH 12/13] i965: Upload SAMPLER_STATE pointers for the VS on Ivybridge.

2011-11-08 Thread Kenneth Graunke
See similar code in gen7_wm_state.c. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/gen7_vs_state.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen7_vs_state.c b/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 13/13] i965: Put a proper sampler count in 3DSTATE_VS.

2011-11-08 Thread Kenneth Graunke
See similar code for 3DSTATE_WM. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/gen6_vs_state.c |5 +++-- src/mesa/drivers/dri/i965/gen7_vs_state.c |3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965

Re: [Mesa-dev] Mixing C C++

2011-11-08 Thread Kenneth Graunke
On 11/08/2011 12:30 PM, Jose Fonseca wrote: [snip] Second, it would really help to clearly distinguish headers that are meant to be used exclusive by C++ with a different suffix (e.g., .hpp). And leave .h for headers that are meant for joint C/C++ consuption. Take e.g., ../glsl/program.h,

Re: [Mesa-dev] [PATCH 06/10] i965/fs: Add support for user-defined out variables.

2011-11-08 Thread Kenneth Graunke
On 11/04/2011 03:01 PM, Eric Anholt wrote: Before, I was tracking the ir_variable * found for gl_FragColor or gl_FragData[]. Instead, when visiting those variables, set up an array of per-render-target fs_regs to copy the output data from. This cleans up the color emit path, while making

[Mesa-dev] [PATCH 06.1] i965: Make brw_type_for_base_type return the element type for arrays.

2011-11-08 Thread Kenneth Graunke
a bunch of type overrides throughout the code. Signed-off-by: Eric Anholt e...@anholt.net Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_shader.cpp |1 + 1 files changed, 1 insertions(+), 0 deletions(-) (Feel free to change my Signed-off

[Mesa-dev] [PATCH 06.3] i965/fs: Add support for user-defined out variables.

2011-11-08 Thread Kenneth Graunke
of multiple user-defined out variables easier. Signed-off-by: Eric Anholt e...@anholt.net Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_fs.h |8 ++-- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 69 ++ 2 files changed, 42

[Mesa-dev] [PATCH 06.03 v2] i965/fs: Add support for user-defined out variables.

2011-11-08 Thread Kenneth Graunke
of multiple user-defined out variables easier. Signed-off-by: Eric Anholt e...@anholt.net Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_fs.h |8 ++-- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 66 ++ 2 files changed, 39

Re: [Mesa-dev] [PATCH 07/10] i965: Claim to support rendering to integer FBOs.

2011-11-08 Thread Kenneth Graunke
: The key piece of missing knowledge is that intel_renderbuffer::DataType is only used for spans rendering. Assuming that's really the case, this patch is: Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev

Re: [Mesa-dev] GL_EXT_texture_integer on i965

2011-11-08 Thread Kenneth Graunke
at the spec: For the series: Reviewed-by: Kenneth Graunke kenn...@whitecape.org I replied with suggestions to a few of the patches, which I hope are helpful, but I wouldn't object to the series going in as-is either. ___ mesa-dev mailing list mesa-dev

Re: [Mesa-dev] [PATCH 0/4] Move resource checking to the linker

2011-11-08 Thread Kenneth Graunke
implementation limits. This patch series pulls that code out of ir_to_mesa (and st_glsl_to_tgsi) into the linker. Looks like a great cleanup, Ian. I'm glad to see this sort of stuff move out of the backends and into the shared compiler infrastructure. Reviewed-by: Kenneth Graunke kenn

Re: [Mesa-dev] [PATCH 4/4] mesa: Implement glGetFragDataLocation

2011-11-08 Thread Kenneth Graunke
On 11/04/2011 04:41 PM, Ian Romanick wrote: From: Ian Romanick ian.d.roman...@intel.com Fixes piglit's getfragdatalocation test. Signed-off-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/main/shader_query.cpp | 56

[Mesa-dev] [PATCH] i965: Don't try to normalize cubemap coordinates for textureSize.

2011-11-09 Thread Kenneth Graunke
Although textureSize is represented as an ir_texture with op == ir_txs, it doesn't have a coordinate, so normalizing it doesn't make sense. Fixes crashes in oglconform glsl-bif-tex-size basic.samplerCube.* tests. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- .../drivers/dri/i965

Re: [Mesa-dev] [PATCH 09/13] i965: Use a single binding table for all pipeline stages.

2011-11-09 Thread Kenneth Graunke
On 11/09/2011 10:34 AM, Eric Anholt wrote: On Tue, 8 Nov 2011 14:32:08 -0800, Kenneth Graunkekenn...@whitecape.org wrote: Although the hardware supports separate binding tables for each pipeline stage, we don't see much advantage over a single shared table. Consider the contents of the

Re: [Mesa-dev] [PATCH 4/4] mesa: Implement glGetFragDataLocation

2011-11-09 Thread Kenneth Graunke
On 11/09/2011 02:20 PM, Ian Romanick wrote: You mean, drop the 'var-location FRAG_RESULT_DATA0' from the if-statement below? That is probably true. It was a copy-and-paste from GetAttributeLocation. The check *is* necessary there because there is no 'strncmp(gl_, name)' in that function.

[Mesa-dev] [PATCH] i965: Make Gen6+ renderbuffer surface updates not depend on NEW_COLOR.

2011-11-09 Thread Kenneth Graunke
NEW_COLOR is only needed on Gen4-5 as brw_update_renderbuffer_surfaces only uses ctx-Color when intel-gen 6. This should reduce unnecessary state updates. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_state.h|1 + src/mesa/drivers/dri

Re: [Mesa-dev] [PATCH] glsl: Remove texture built-ins with 'bias' from 1.30 VS profile.

2011-11-09 Thread Kenneth Graunke
On 11/09/2011 08:36 AM, Paul Berry wrote: I can't help but notice that in the above section, the comment says textureProjOffset, but the function declarations say textureProj. Is this a bug? The GLSL spec clearly calls these functions textureProjOffset. 130.frag seems to have a similar

[Mesa-dev] [PATCH 1/2] glsl: Fix misnamed textureProjOffset prototypes in built-in profiles.

2011-11-09 Thread Kenneth Graunke
Due to a cut and paste error, these were accidentally misnamed textureProj() rather than textureProjOffset(). Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/builtins/profiles/130.frag | 84 +- src/glsl/builtins/profiles/130.vert | 40

[Mesa-dev] [PATCH 2/2] glsl: Remove textureGradOffset built-ins taking samplerCube parameters.

2011-11-09 Thread Kenneth Graunke
These simply don't exist in the 1.30 specification---none of the Offset variants allow samplerCube. This must have been a cut and paste error from textureGrad, which /does/ allow cubemaps. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/builtins/profiles/130.frag

[Mesa-dev] [PATCH] i965: Don't try to normalize cubemap coordinates for textureSize.

2011-11-11 Thread Kenneth Graunke
Although textureSize is represented as an ir_texture with op == ir_txs, it doesn't have a coordinate, so normalizing it doesn't make sense. Fixes crashes in oglconform glsl-bif-tex-size basic.samplerCube.* tests. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- .../drivers/dri/i965

[Mesa-dev] Lazy GLSL built-in importing bug fix

2011-11-11 Thread Kenneth Graunke
While looking at some oglconform failures the other day, I noticed some of their shaders were trying to use % on a float and failing to compile. It turned out to be a nasty bug in my lazy built-in importing code. The shader was calling abs() on an int, but we selected abs(float) instead of

[Mesa-dev] [PATCH 1/3] glsl: Add a new matching_signature() variant that returns exact/inexact.

2011-11-11 Thread Kenneth Graunke
expensive. Since matching_signature already internally knows whether a match was exact or not, we can just return it to get that information for free. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/ir.h|7 +++ src/glsl/ir_function.cpp | 11 +++ 2 files

[Mesa-dev] [PATCH 3/3] glsl: Always search for an exact function signature match.

2011-11-11 Thread Kenneth Graunke
-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/ast_function.cpp | 92 ++-- 1 files changed, 63 insertions(+), 29 deletions(-) diff --git a/src/glsl/ast_function.cpp b/src/glsl/ast_function.cpp index 08fdd64..880109e 100644 --- a/src/glsl

[Mesa-dev] [PATCH 2/3] glsl: Split code to generate an ir_call out from match_function_by_name.

2011-11-11 Thread Kenneth Graunke
call conversions. Trying to do both in one function is just too unwieldy. Time to split. This patch purely moves the code to generate an ir_call into a separate function and reindents it. Otherwise, the code is identical. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl

Re: [Mesa-dev] [PATCH 1/4] mesa: Include R/RG integer textures in _mesa_is_integer_format.

2011-11-11 Thread Kenneth Graunke
On 11/11/2011 10:57 AM, Eric Anholt wrote: Fixes some spurious GL errors in the upcoming gl-3.0-required-sized-formats piglit test. For patch 1, 2, and 4: Reviewed-by: Kenneth Graunke kenn...@whitecape.org Brian's idea for patch 3 sounds reasonable to me, but I don't know what other changes

Re: [Mesa-dev] [PATCH] glcpp: Add GL_ARB_draw_instanced #define.

2011-11-11 Thread Kenneth Graunke
) + add_builtin_define(parser, GL_ARB_draw_instanced, 1); + if (extensions-AMD_conservative_depth) { add_builtin_define(parser, GL_AMD_conservative_depth, 1); add_builtin_define(parser, GL_ARB_conservative_depth, 1); Thanks for catching this! Reviewed-by: Kenneth

Re: [Mesa-dev] [PATCH 1/3] glsl: Add a new matching_signature() variant that returns exact/inexact.

2011-11-14 Thread Kenneth Graunke
On 11/14/2011 10:20 AM, Paul Berry wrote: On 11 November 2011 02:56, Kenneth Graunke kenn...@whitecape.org mailto:kenn...@whitecape.org wrote: When matching function signatures across multiple linked shaders, we often want to see if the current shader has _any_ match, but also know

[Mesa-dev] [PATCH] glsl: Add missing textureSize(samplerCubeShadow, int) variant.

2011-11-14 Thread Kenneth Graunke
Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/builtins/tools/texture_builtins.py |1 + 1 files changed, 1 insertions(+), 0 deletions(-) I really don't know how I keep missing these. :( diff --git a/src/glsl/builtins/tools/texture_builtins.py b/src/glsl/builtins/tools

[Mesa-dev] [PATCH 1/3] i965: Fix inconsistent indentation in brw_gs_emit.c.

2011-11-14 Thread Kenneth Graunke
--- src/mesa/drivers/dri/i965/brw_gs_emit.c | 66 +++--- 1 files changed, 33 insertions(+), 33 deletions(-) Some of these were 3/4 spacing (first level 3, second 4), and others were 8+3 (first tab, 3 spaces after that). Confused my editor quite a bit. diff --git

[Mesa-dev] [PATCH 2/3] i965: Remove unused gen6+ code from brw_gs_emit.c.

2011-11-14 Thread Kenneth Graunke
This code is for decomposing certain primitive types pre-Gen6; the VF already does that on Gen6. So, this code isn't good for anything. Plus, we'll want to use actual Gen6 geometry shader programs soon, so we may as well just delete this red herring. Signed-off-by: Kenneth Graunke kenn

[Mesa-dev] [PATCH 3/3] i965: Remove a few unused fields from struct brw_vs_compile.

2011-11-14 Thread Kenneth Graunke
We'll be able to kill more of these once the old VS backend is gone. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_vs.h |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) I could also kill r0 by changing brw_vs_emit to just use brw_vec8_grf(0,0

Re: [Mesa-dev] [PATCH] mesa: Only update sampler uniforms that are used by the shader stage

2011-11-14 Thread Kenneth Graunke
testing that badly. Still, this looks like a good patch that will probably help other cases. Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa

Re: [Mesa-dev] [PATCH 2/3] i965: Remove unused gen6+ code from brw_gs_emit.c.

2011-11-14 Thread Kenneth Graunke
On 11/14/2011 05:31 PM, Kenneth Graunke wrote: This code is for decomposing certain primitive types pre-Gen6; the VF already does that on Gen6. So, this code isn't good for anything. Plus, we'll want to use actual Gen6 geometry shader programs soon, so we may as well just delete this red

Re: [Mesa-dev] [PATCH 01/15] i965: Add a table of the surface format information from the PRM.

2011-11-16 Thread Kenneth Graunke
, BRW_SURFACEFORMAT_R16G16B16_USCALED) +}; +#undef x +#undef Y + uint32_t brw_format_for_mesa_format(gl_format mesa_format) { Thanks Eric, this looks great! I checked it pretty carefully, so you get a Reviewed-by: Kenneth Graunke kenn...@whitecape.org with a high degree of confidence

Re: [Mesa-dev] [PATCH 07/15] i965: Mark texture formats as supported using the surface formats table.

2011-11-16 Thread Kenneth Graunke
On 11/15/2011 05:55 PM, Eric Anholt wrote: This is currently duplicated with intel_context.c's setup of the formats table, and sets true for exactly the same set of formats on gen6. --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 13 - 1 files changed, 12 insertions(+),

Re: [Mesa-dev] i965 texture formats rework

2011-11-16 Thread Kenneth Graunke
On 11/15/2011 05:55 PM, Eric Anholt wrote: There are a couple of core mesa fixes tucked in this series. I like this! Great work. For the series: Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev

Re: [Mesa-dev] [PATCH 07/15] i965: Mark texture formats as supported using the surface formats table.

2011-11-16 Thread Kenneth Graunke
On 11/16/2011 12:52 AM, Kenneth Graunke wrote: On 11/15/2011 05:55 PM, Eric Anholt wrote: This is currently duplicated with intel_context.c's setup of the formats table, and sets true for exactly the same set of formats on gen6. --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 13

Re: [Mesa-dev] [PATCH 2/6] mesa: set the gl_FragDepth layout in the GLSL linker

2011-11-18 Thread Kenneth Graunke
is Reviewed-by: Ian Romanick ian.d.roman...@intel.com Agreed. 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 4/6] gallium: remove PIPE_CAP_GLSL and enable GLSL unconditionally

2011-11-18 Thread Kenneth Graunke
On 11/18/2011 11:27 AM, Marek Olšák wrote: Only i965g does not enable GLSL, but that driver has been unmaintained and bitrotting for quite a while anyway. It doesn't even do GLSL? I'm pretty shocked, I figured it at least did that. Is it even worth keeping around in the tree? Seems like it's

Re: [Mesa-dev] [PATCH 1/6] glsl: finish up ARB_conservative_depth

2011-11-18 Thread Kenneth Graunke
On 11/18/2011 11:27 AM, Marek Olšák wrote: diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index e8ac9fb..c63615c 100644 --- a/src/glsl/ir_clone.cpp +++ b/src/glsl/ir_clone.cpp @@ -51,6 +51,7 @@ ir_variable::clone(void *mem_ctx, struct hash_table *ht) const

Re: [Mesa-dev] [PATCH 1/6] glsl: finish up ARB_conservative_depth

2011-11-18 Thread Kenneth Graunke
On 11/18/2011 01:23 PM, Marek Olšák wrote: On Fri, Nov 18, 2011 at 10:14 PM, Kenneth Graunke kenn...@whitecape.org wrote: On 11/18/2011 11:27 AM, Marek Olšák wrote: diff --git a/src/glsl/ir_clone.cpp b/src/glsl/ir_clone.cpp index e8ac9fb..c63615c 100644 --- a/src/glsl/ir_clone.cpp +++ b

Re: [Mesa-dev] [PATCH 10/41] intel: Refactor intel_miptree_copy_teximage()

2011-11-18 Thread Kenneth Graunke
On 11/17/2011 07:58 PM, Chad Versace wrote: Extract the body of the inner loop into a new function, intel_miptree_copy_slice(). This is in preparation for adding support for separate stencil and HiZ to intel_miptree_copy_teximage(). When copying a slice of a depthstencil miptree that uses

Re: [Mesa-dev] [PATCH 11/41] intel: Kill intel_mipmap_level::nr_images [v2]

2011-11-18 Thread Kenneth Graunke
On 11/18/2011 01:52 PM, Chad Versace wrote: [snip] @@ -335,23 +338,18 @@ intel_miptree_get_image_offset(struct intel_mipmap_tree *mt, GLuint level, GLuint face, GLuint depth, GLuint *x, GLuint *y) { - switch (mt-target) { -

Re: [Mesa-dev] [PATCH 12/41] intel: Track the miptree layer wrapped by a renderbuffer

2011-11-18 Thread Kenneth Graunke
On 11/17/2011 07:58 PM, Chad Versace wrote: Add two fields to intel_renderbuffer: mt_level mt_layer Multiple renderbuffers may simultaneously wrap a single texture and each provide a different view into that texture. [Consider glFramebufferTextureLayer()]. The new fields indicate

Re: [Mesa-dev] [PATCH 10/41] intel: Refactor intel_miptree_copy_teximage()

2011-11-18 Thread Kenneth Graunke
On 11/18/2011 04:04 PM, Chad Versace wrote: On 11/18/2011 03:42 PM, Kenneth Graunke wrote: On 11/17/2011 07:58 PM, Chad Versace wrote: Extract the body of the inner loop into a new function, intel_miptree_copy_slice(). This is in preparation for adding support for separate stencil and HiZ

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

2011-11-18 Thread Kenneth Graunke
(). It was a little refactor of the for-loop's upper bound. v3: - [kwg] In intel_miptree_get_image_offset(), replace bizarre `face 0` condition with the more sensible `mt-target == GL_TEXTURE_CUBE_MAP`. Great. Thanks Chad. Reviewed-by: Kenneth Graunke kenn...@whitecape.org

Re: [Mesa-dev] [PATCH] intel: Track the miptree layer wrapped by a renderbuffer [v2]

2011-11-18 Thread Kenneth Graunke
== GL_TEXTURE_CUBE_MAP`. CC: Kenneth Graunke kenn...@whitecape.org Reviewed-by: Eric Anholt e...@anholt.net Signed-off-by: Chad Versace chad.vers...@linux.intel.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa

Re: [Mesa-dev] [PATCH 1/3] mesa: define, use _mesa_is_cube_face() in several places

2011-11-18 Thread Kenneth Graunke
(-) 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 1/3] mesa: rename the AMD_conservative_depth extension flag to ARB

2011-11-19 Thread Kenneth Graunke
: Reviewed-by: Kenneth Graunke kenn...@whitecape.org Thanks for fixing this, Marek! ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH] glsl: disable resource checking in the linker until it's done right

2011-11-20 Thread Kenneth Graunke
On 11/20/2011 01:15 PM, Marek Olšák wrote: --- src/glsl/linker.cpp | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 3527088..8089255 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@

Re: [Mesa-dev] mesademos build system: would one be enough?

2011-11-21 Thread Kenneth Graunke
On 11/21/2011 09:40 AM, Eric Anholt wrote: On Mon, 21 Nov 2011 03:17:03 -0800 (PST), Jose Fonseca jfons...@vmware.com wrote: Johannes Obermayr's recent patch series remind me of one thing I've been planning to ask here for quite some time: Would anybody oppose dropping automake build system

Re: [Mesa-dev] [PATCH] linker: Remove erroneous multiply by 4 in uniform usage calculation

2011-11-21 Thread Kenneth Graunke
uniform components as were actually used. Yes, this looks correct. Also seems to fix crashes in Civilization 4. Reviewed-and-tested-by: Kenneth Graunke kenn...@whitecape.org Thanks, Ian. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http

Re: [Mesa-dev] [PATCH] Allow glTexImage2D with a depth component cube map

2011-11-22 Thread Kenneth Graunke
On 11/22/2011 03:34 PM, Anuj Phogat wrote: On Tue 22 Nov 2011 12:21:09 PM PST, Kenneth Graunke wrote: On 11/22/2011 11:42 AM, Anuj Phogat wrote: [snip] I agree. This is simpler to read and _mesa_is_cube_map_face() can be reused in mesa. Posting an updated patch with your suggestions

Re: [Mesa-dev] [PATCH 2/2] mesa: add hard limits for the number of varyings and uniforms for the linker

2011-11-22 Thread Kenneth Graunke
On 11/22/2011 07:27 PM, Marek Olšák wrote: On Tue, Nov 22, 2011 at 11:11 PM, Ian Romanick i...@freedesktop.org wrote: All of this discussion is largely moot. The failure that you're so angry about was caused by a bug in the check, not by the check itself. That bug has already been fixed

[Mesa-dev] [PATCH] i965: Set SURFACE_STATE vertical alignment bit on Ivybridge.

2011-11-22 Thread Kenneth Graunke
and GL_EXT_packed_depth_stencil arguments. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/gen7_wm_surface_state.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen7_wm_surface_state.c b/src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH 2/2] mesa: add hard limits for the number of varyings and uniforms for the linker

2011-11-23 Thread Kenneth Graunke
On 11/23/2011 05:42 AM, Marek Olšák wrote: On Wed, Nov 23, 2011 at 6:59 AM, Kenneth Graunke kenn...@whitecape.org wrote: On 11/22/2011 07:27 PM, Marek Olšák wrote: On Tue, Nov 22, 2011 at 11:11 PM, Ian Romanick i...@freedesktop.org wrote: All of this discussion is largely moot. The failure

Re: [Mesa-dev] [PATCH] mesa: fix indexing error in unpack_Z32_FLOAT_X24S8()

2011-11-23 Thread Kenneth Graunke
] = dst[i][1] = - dst[i][2] = s[i]; + dst[i][2] = s[i * 2]; dst[i][3] = 1.0F; } } Reviewed-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: add hard limits for the number of varyings and uniforms for the linker

2011-11-24 Thread Kenneth Graunke
On 11/24/2011 04:47 AM, Marek Olšák wrote: On Wed, Nov 23, 2011 at 7:25 PM, Ian Romanick i...@freedesktop.org wrote: Let me paraphrase this a little bit in a way that I think concisely captures the intention: We need to work really hard to make things work on older hardware. I don't

Re: [Mesa-dev] [PATCH] mesa: check for null ptr in _mesa_is_bufferobj()

2011-11-24 Thread Kenneth Graunke
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

[Mesa-dev] [PATCH] i965: Make gen6_resolve_implied_move a no-op for MRF sources.

2011-11-28 Thread Kenneth Graunke
Attempting to move an MRF to a MRF is not only pointless, it will fail because MRFs are read-only, resulting in garbage in your register. If we already set up a MRF source, there's nothing to resolve anyway. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965

Re: [Mesa-dev] [PATCH] mesa: Fix glCompressedTexImage when dstRowStride != srcRowStride.

2011-11-30 Thread Kenneth Graunke
, + imageSize, data, + texObj, texImage); } Looks good to me. Kudos for finding this! Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http

Re: [Mesa-dev] [PATCH 04/10] i965: Don't convert if/else to conditional adds on Gen6.

2011-12-05 Thread Kenneth Graunke
On 12/05/2011 09:40 AM, Paul Berry wrote: Normally when outputting instructions in SPF (single program flow) mode, we convert IF and ELSE instructions to conditional ADD instructions applied to the IP register, since this lets us avoid having to emit an ENDIF instruction (and, in Gen4, lets us

Re: [Mesa-dev] [PATCH] Fix samplerCubeShadow support in shader compiler

2011-12-06 Thread Kenneth Graunke
(swiz z (var_ref P)), Reviewed-by: Kenneth Graunke kenn...@whitecape.org By the way, you probably will want to run: git config --global user.email anuj.pho...@gmail.com I'll plan on committing this tomorrow unless anyone objects. ___ mesa-dev mailing list

[Mesa-dev] [PATCH] i965: Drop support for the GL_MESA_ycbcr_texture extension.

2011-12-06 Thread Kenneth Graunke
in the driver. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_wm.c |6 - src/mesa/drivers/dri/i965/brw_wm.h |2 - src/mesa/drivers/dri/i965/brw_wm_fp.c| 111 ++--- src/mesa/drivers/dri/i965

  1   2   3   4   5   6   7   8   9   10   >