[Mesa-dev] [PATCH V3 29/30] i965: Enable ARB_texture_view on Gen7+

2014-04-02 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz Reviewed-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/drivers/dri/i965/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965/intel_extensions.c b/src/mesa/drivers/dri/i965/intel_extensions.c index

[Mesa-dev] [PATCH V3 27/30] i965: Account for MinLayer/MinLevel in blorp CTSI path

2014-04-02 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp b/src/mesa/drivers/dri/i965/brw_blorp_blit.cpp index 9e80935..300ff5c 100644

[Mesa-dev] [PATCH V3 26/30] i965: Account for view parameters in fast depth clears

2014-04-02 Thread Chris Forbes
V2: - No need for layer_multiplier; multisampled depth surfaces are IMS. - Remove unused num_layers. Signed-off-by: Chris Forbes chr...@ijw.co.nz Reviewed-by: Ian Romanick ian.d.roman...@intel.com --- src/mesa/drivers/dri/i965/brw_clear.c | 6 +++--- 1 file changed, 3 insertions(+), 3

Re: [Mesa-dev] [PATCH] mesa: fix check for dummy renderbuffer in _mesa_FramebufferRenderbufferEXT()

2014-04-03 Thread Chris Forbes
This was marked as somewhere we're deviating from the spec in order to follow what nVIDIA does. Is there no longer a reason to? On Thu, Apr 3, 2014 at 7:30 PM, Samuel Iglesias Gonsalvez sigles...@igalia.com wrote: According to the spec: renderbuffertarget must be RENDERBUFFER and

Re: [Mesa-dev] [PATCH V3 06/30] i965: Pretend we don't support BRW_SURFACEFORMAT_R16G16B16_FLOAT for textures.

2014-04-06 Thread Chris Forbes
Yes, that will work -- will do. On Mon, Apr 7, 2014 at 5:29 PM, Kenneth Graunke kenn...@whitecape.org wrote: On 04/02/2014 01:05 AM, Chris Forbes wrote: None of the other 3-component 16bpc formats are directly supported, so they get promoted to XRGB equivalents. *Not* promoting RGB16F the same

Re: [Mesa-dev] [PATCH V3 01/30] mesa: Prefer non-swizzled formats for most sized internalformats

2014-04-06 Thread Chris Forbes
I'll move this patch after 7/30 to avoid things being temporarily broken. On Thu, Apr 3, 2014 at 3:34 AM, Brian Paul bri...@vmware.com wrote: On 04/02/2014 02:04 AM, Chris Forbes wrote: These formats can be cast to others (with different component types or sizes) via ARB_texture_view

[Mesa-dev] [PATCH] docs: Expand ARB_gpu_shader5 to describe status of individual features

2014-04-08 Thread Chris Forbes
This extension is a huge grab-bag of stuff that's in DX11. Break it apart to make it clear what still needs to be done. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- docs/GL3.txt | 11 +++ 1 file changed, 11 insertions(+) diff --git a/docs/GL3.txt b/docs/GL3.txt index bf51e3a

Re: [Mesa-dev] [PATCH V3 00/30] ARB_texture_view for i965

2014-04-08 Thread Chris Forbes
Ian, Would we put that format in a view class by itself? -- Chris On Wed, Apr 9, 2014 at 7:49 AM, Ian Romanick i...@freedesktop.org wrote: On 04/08/2014 02:13 AM, Kenneth Graunke wrote: On 04/02/2014 01:04 AM, Chris Forbes wrote: This series adds ARB_texture_view support for i965 Gen7/7.5

Re: [Mesa-dev] [PATCH] docs: Expand ARB_gpu_shader5 to describe status of individual features

2014-04-09 Thread Chris Forbes
On Wed, Apr 9, 2014 at 7:23 AM, Ian Romanick i...@freedesktop.org wrote: I believe UBO array indices are also dynamically uniform. I was surprised to find this when building the list too, but I believe it's unrestricted. The GLSL 4.0 spec, 4.3.7 p43 (bottom of) says: Any integral

Re: [Mesa-dev] [PATCH 3/4] mesa: use _mesa_get_srgb_format_linear() in sRGB texstore functions

2014-04-10 Thread Chris Forbes
I was about to get to this, really! :P This patch is: Reviewed-by: Chris Forbes chr...@ijw.co.nz On Fri, Apr 11, 2014 at 1:04 PM, Brian Paul bri...@vmware.com wrote: Instead of switch statements. --- src/mesa/main/texstore.c | 30 +- 1 file changed, 5

Re: [Mesa-dev] [PATCH] docs: Expand ARB_gpu_shader5 to describe status of individual features

2014-04-11 Thread Chris Forbes
OK, that simplifies things. Will fix. On Sat, Apr 12, 2014 at 4:04 AM, Ian Romanick i...@freedesktop.org wrote: On 04/09/2014 01:11 AM, Chris Forbes wrote: On Wed, Apr 9, 2014 at 7:23 AM, Ian Romanick i...@freedesktop.org wrote: I believe UBO array indices are also dynamically uniform. I

[Mesa-dev] [PATCH] glsl: Validate aux storage qualifier combination with other qualifiers.

2014-04-11 Thread Chris Forbes
We've been allowing `centroid` and `sample` in all kinds of weird places where they're not valid. Insist that `sample` is combined with `in` or `out`; and that `centroid` is combined with `in`, `out`, or the deprecated `varying`. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl

Re: [Mesa-dev] [PATCH] glsl: Validate aux storage qualifier combination with other qualifiers.

2014-04-11 Thread Chris Forbes
This is a lame place to put this validation. Will respin something more sensible. On Sat, Apr 12, 2014 at 12:35 PM, Chris Forbes chr...@ijw.co.nz wrote: We've been allowing `centroid` and `sample` in all kinds of weird places where they're not valid. Insist that `sample` is combined

[Mesa-dev] [PATCH V2] glsl: Validate aux storage qualifier combination with other qualifiers.

2014-04-11 Thread Chris Forbes
an extra case for uniform blocks members and struct members, though, since they don't go through the normal path. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ast_to_hir.cpp | 20 1 file changed, 20 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl

Re: [Mesa-dev] [PATCH V2] glsl: Validate aux storage qualifier combination with other qualifiers.

2014-04-11 Thread Chris Forbes
This does a little more than the error message says - won't it prevent using sample/centroid on, say, vertex shader inputs/fragment shader outputs? If so, then it seems like you could drop a pile of other code: /* From section 4.3.4 of the GLSL 1.30 spec: *It is an error to

[Mesa-dev] [PATCH] glsl: Allow explicit binding on atomics again

2014-04-12 Thread Chris Forbes
As of 943b2d52bf5, layout(binding) on an atomic would fail the assertion here. Signed-off-by: Chris Forbes chr...@ijw.co.nz Cc: Ian Romanick ian.d.roman...@intel.com --- src/glsl/link_uniform_initializers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/glsl

[Mesa-dev] [PATCH 2/2] mesa: Consider gl_VertexID and gl_InstanceID active attribs

2014-04-12 Thread Chris Forbes
Fixes piglit's spec/gl-3.2/get-active-attrib-returns-all-inputs. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/shader_query.cpp | 9 + 1 file changed, 9 insertions(+) diff --git a/src/mesa/main/shader_query.cpp b/src/mesa/main/shader_query.cpp index c6e7342..2be84f2

[Mesa-dev] [PATCH 1/2] mesa: Extract is_active_attrib() in shaderapi

2014-04-12 Thread Chris Forbes
The rules are about to get a bit more complex to account for gl_InstanceID and gl_VertexID, which are system values. Extracting this first avoids introducing duplication. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/shader_query.cpp | 26 ++ 1 file

[Mesa-dev] [PATCH] i965: Add comment to explain the weird-looking shadow compares.

2014-04-12 Thread Chris Forbes
This always looks crazy when I stumble across it, until I remember what the hardware is doing. Describing it ought to short-circuit that process next time :) Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/intel_state.c | 17 ++--- 1 file changed, 14

Re: [Mesa-dev] [PATCH] i965: Add comment to explain the weird-looking shadow compares.

2014-04-12 Thread Chris Forbes
Eek -- yes, I'll fix that! On Sun, Apr 13, 2014 at 8:04 AM, Kenneth Graunke kenn...@whitecape.org wrote: On 04/12/2014 03:34 AM, Chris Forbes wrote: This always looks crazy when I stumble across it, until I remember what the hardware is doing. Describing it ought to short-circuit that process

[Mesa-dev] [PATCH 1/2] mesa: Track max enabled tex image unit

2014-04-12 Thread Chris Forbes
This gives us a better bound for some hot loops in the drivers than MAX_COMBINED_TEXTURE_IMAGE_UNITS, which is ridiculously large on modern hardware, and only getting worse as more shader stages are added. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/mtypes.h | 3 +++ src

[Mesa-dev] [PATCH 2/2] i965: Use ctx-Texture._MaxEnabledTexImageUnit for upper bound

2014-04-12 Thread Chris Forbes
Avoid looping over 32/48/96 (!!) tex image units every draw, most of which we don't care about. Improves performance on everyone's favorite not-a-benchmark by 2.9% on Haswell. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_draw.c | 3 ++- src/mesa/drivers/dri

[Mesa-dev] [PATCH 2/2] glsl: Fix redeclaration rules for gl_FragDepth too.

2014-04-12 Thread Chris Forbes
the first redeclaration was before the first use. (These are the same rules as for gl_FragCoord, since the spec language is identical.) Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ast_to_hir.cpp | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/glsl

[Mesa-dev] [PATCH 1/2] glsl: Fix redeclaration rules for gl_FragCoord.

2014-04-12 Thread Chris Forbes
/fragment_coord_conventions/layout-qualifiers-conflicting-case-2 Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ast_to_hir.cpp | 20 1 file changed, 20 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 9b9d511..d1eb3e2 100644 --- a/src/glsl

[Mesa-dev] [PATCH] meta: Clip src/dest rects in BlitFramebuffer.

2014-04-14 Thread Chris Forbes
will be discarded anyway. Fixes piglit's fbo-blit-stretch test on drivers which use the meta path. (i965: should fix Broadwell, but also fixes Sandybridge/Ivybridge/Haswell since this test falls off the blorp path now due to format conversion) Signed-off-by: Chris Forbes chr...@ijw.co.nz Bugzilla

Re: [Mesa-dev] [PATCH] meta: Clip src/dest rects in BlitFramebuffer.

2014-04-14 Thread Chris Forbes
(in hardware though) with correct source coordinates for scaled blits. See st_BlitFramebuffer. Marek On Mon, Apr 14, 2014 at 10:20 AM, Chris Forbes chr...@ijw.co.nz wrote: Nothing was bothering to clip the blit. If the src rect was partially outside the framebuffer, we'd end up picking up more copies

Re: [Mesa-dev] [Mesa-stable] [PATCH 3/3] i965: Fix component mask and varying_to_slot mapping for gl_ViewportIndex

2014-04-14 Thread Chris Forbes
Are the streamout values allowed to be restricted to the ranges of the vertex header fields, or do they have to reflect exactly what the shader wrote? (I ran into a similar issue with ARB_fragment_layer_viewport, and while nothing has been done about it, the consensus was that the FS had to see

[Mesa-dev] [PATCH V2] meta: Clip src/dest rects in BlitFramebuffer, using the scissor

2014-04-15 Thread Chris Forbes
Fixes piglit's fbo-blit-stretch test on drivers which use the meta path. (i965: should fix Broadwell, but also fixes Sandybridge/Ivybridge/Haswell since this test falls off the blorp path now due to format conversion) Signed-off-by: Chris Forbes chr...@ijw.co.nz Bugzilla: https

[Mesa-dev] [PATCH] meta: Clip src/dest rects in BlitFramebuffer, using the scissor

2014-04-15 Thread Chris Forbes
problems. (Thanks Marek) V3: Rebase on Eric's CTSI meta changes; re-add _mesa_update_state in the CTSI path so that _mesa_clip_blit sees the correct bounds. Signed-off-by: Chris Forbes chr...@ijw.co.nz Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77414 Cc: Eric Anholt e...@anholt.net

Re: [Mesa-dev] [Mesa-stable] [PATCH 3/3] i965: Fix component mask and varying_to_slot mapping for gl_ViewportIndex

2014-04-17 Thread Chris Forbes
is: Reviewed-by: Chris Forbes chr...@ijw.co.nz ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] [PATCH 1/2] glsl: Fix redeclaration rules for gl_FragCoord.

2014-04-17 Thread Chris Forbes
both series. On Thu, Apr 17, 2014 at 6:29 PM, Kenneth Graunke kenn...@whitecape.org wrote: On 04/12/2014 10:30 PM, Chris Forbes wrote: The ARB_fragment_coord_conventions spec, section 4.3.x (Input Layout Qualifiers) says: All redeclarations of gl_FragCoord in all fragment shaders

[Mesa-dev] [PATCH] glsl: Only allow `invariant` on shader in/out between stages.

2014-04-20 Thread Chris Forbes
, and also as a redeclaration of an existing variable or block member. Fixes the four new piglits: specc/glsl-1.50/compiler/invariant-qualifier-*.geom Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ast_to_hir.cpp | 34 +++--- 1 file changed, 11 insertions

Re: [Mesa-dev] [PATCH] glsl: Only allow `invariant` on shader in/out between stages.

2014-04-21 Thread Chris Forbes
The FINISHME comment is a relic from another time, before shader inputs and function inputs were split. Removed. Marked for 10.0/10.1 and pushed with Ian's r-b from IRC On Mon, Apr 21, 2014 at 4:06 PM, Chris Forbes chr...@ijw.co.nz wrote: Previously this was special-cased for VS and FS

[Mesa-dev] [PATCH 6/6] docs: Update `precise` qualifier status in GL3.txt

2014-04-26 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- docs/GL3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index b8557bf..d9d8c03 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -101,7 +101,7 @@ GL 4.0: GL_ARB_draw_buffers_blend

[Mesa-dev] [PATCH 2/6] glsl: add support for `precise` in type_qualifier

2014-04-26 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ast.h | 1 + src/glsl/ast_to_hir.cpp | 12 src/glsl/glsl_lexer.ll | 3 +++ src/glsl/glsl_parser.yy | 39 +++ src/glsl/ir.h | 1 + 5 files changed, 48 insertions(+), 8

[Mesa-dev] [PATCH 4/6] glsl: Disallow `precise` redeclarations of vars from outer scopes

2014-04-26 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ast_to_hir.cpp | 9 + 1 file changed, 9 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index e7e862b..e71a287 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl/ast_to_hir.cpp @@ -3108,6 +3108,15

[Mesa-dev] [PATCH 1/6] glsl: Clean up apply_implicit_conversion

2014-04-27 Thread Chris Forbes
-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ast_to_hir.cpp | 57 + 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index 0411bef..39ad418 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl

Re: [Mesa-dev] [PATCH 1/2] glsl: Fix redeclaration rules for gl_FragCoord.

2014-05-01 Thread Chris Forbes
OK, sounds good to me. On Fri, May 2, 2014 at 5:55 AM, Anuj Phogat anuj.pho...@gmail.com wrote: On Thu, Apr 17, 2014 at 1:05 AM, Chris Forbes chr...@ijw.co.nz wrote: Correct, this doesn't try to tackle the link-time cases at all. After sending these out, Anuj told me that he had similar

Re: [Mesa-dev] [PATCH 5/6] glsl: Allow int - uint implicit conversions on function parameters

2014-05-04 Thread Chris Forbes
This doesn't actually work -- call_link_visitor::find_matching_signature passes a NULL state pointer in here. On Sun, Apr 27, 2014 at 9:44 PM, Chris Forbes chr...@ijw.co.nz wrote: Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/glsl_types.cpp | 16 +--- 1 file changed

[Mesa-dev] [PATCH V2 4/9] glsl: Pass parse state to can_implicitly_convert_to()

2014-05-04 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ast_function.cpp | 4 ++-- src/glsl/glsl_types.cpp | 3 ++- src/glsl/glsl_types.h | 3 ++- src/glsl/ir_function.cpp | 4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/glsl/ast_function.cpp b/src/glsl

[Mesa-dev] [PATCH V2 5/9] glsl: Allow int - uint implicit conversions on function parameters

2014-05-04 Thread Chris Forbes
V2: Fix crashes during linking, where the parse state is NULL. In this case, all required checks have already been done, so we assume the extension is enabled. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/glsl_types.cpp | 19 --- 1 file changed, 16 insertions(+), 3

[Mesa-dev] [PATCH V2 3/9] glsl: Pass parse state to parameter_lists_match()

2014-05-04 Thread Chris Forbes
The available implicit conversions depend on the GLSL version we're compiling. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ir_function.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/glsl/ir_function.cpp b/src/glsl/ir_function.cpp index 40cf589

[Mesa-dev] [PATCH V2 8/9] glsl: Implement overload resolution for ARB_gpu_shader5

2014-05-04 Thread Chris Forbes
the conversion in B is better than the corresponding conversion in A. If a single function definition is considered a better match than every other matching function definition, it will be used. Otherwise, a semantic error occurs and the shader will fail to compile. Signed-off-by: Chris

[Mesa-dev] [PATCH V2 1/9] glsl: Clean up apply_implicit_conversion

2014-05-04 Thread Chris Forbes
the vector width mangling. It turns out this is necessary for the conversions done (and then thrown away) when determining the return type of arithmetic operators. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ast_to_hir.cpp | 58 ++--- 1 file

[Mesa-dev] [PATCH V2 2/9] glsl: Add support for int - uint implicit conversions

2014-05-04 Thread Chris Forbes
This is required for ARB_gpu_shader5. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ast_to_hir.cpp | 8 1 file changed, 8 insertions(+) diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp index b695132..f6c7409 100644 --- a/src/glsl/ast_to_hir.cpp +++ b/src/glsl

[Mesa-dev] [PATCH V2 6/9] glsl: Build a list of inexact function matches

2014-05-04 Thread Chris Forbes
This will facilitate GLSL 4.0 / ARB_gpu_shader5's enhanced overload resolution rules, and also possibly better error reporting for ambiguous function calls. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ir_function.cpp | 43 --- 1 file changed

[Mesa-dev] [PATCH V2 0/9] ARB_gpu_shader5 implicit conversions and overloading

2014-05-04 Thread Chris Forbes
This series adds support for implicit conversions and overload resolution from ARB_gpu_shader5 / GLSL 4.0. The first 5 patches (and half of the 9th) were previously sent out on their own, but had some serious issues I had overlooked, as I hadn't done a full piglit run. Notable changes in this

[Mesa-dev] [PATCH V2 7/9] glsl: Add support for comparing function parameter conversions

2014-05-04 Thread Chris Forbes
of the rules above apply to a particular pair of conversions, neither conversion is considered better than the other. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ir_function.cpp | 74 ++-- 1 file changed, 71 insertions(+), 3 deletions

Re: [Mesa-dev] [PATCH V2 9/9] docs: Update GL3.txt

2014-05-04 Thread Chris Forbes
have? For features without driver changes, that would be DONE (all drivers). Marek On Sun, May 4, 2014 at 10:24 AM, Chris Forbes chr...@ijw.co.nz wrote: Signed-off-by: Chris Forbes chr...@ijw.co.nz --- docs/GL3.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

Re: [Mesa-dev] [Mesa-stable] [PATCH] i965: Enable GL_ARB_texture_view on Broadwell.

2014-05-06 Thread Chris Forbes
This patch is: Reviewed-by: Chris Forbes chr...@ijw.co.nz Spotted some other bugs (in using a view as a depth/stencil attachment) while reading around this, which I'll take care of. On Wed, May 7, 2014 at 12:03 PM, Kenneth Graunke kenn...@whitecape.org wrote: This is a port of commit

[Mesa-dev] [PATCH 1/4] i965/Gen7: Set up layer constraints properly for renderbuffers

2014-05-07 Thread Chris Forbes
rendering did not honor the mt_layer setting, so would not properly handle MinLayer being set on a view. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/mesa

[Mesa-dev] [PATCH 4/4] i965/Gen8: Set up layer constraints properly for depth buffers

2014-05-07 Thread Chris Forbes
for arrays. I'm not able to test this one since I can't get a Broadwell yet, but it's the same set of fixes as for Gen7. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/gen8_depth_state.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src

[Mesa-dev] [PATCH 0/4] Fixes for layered/msaa/view interactions

2014-05-07 Thread Chris Forbes
Here's a bunch of fixes for issues I noticed in color renderbuffer and depthbuffer setup while reviewing Ken's patch to enable views on Gen8. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

[Mesa-dev] [PATCH 2/4] i965/Gen8: Set up layer constraints properly for renderbuffers

2014-05-07 Thread Chris Forbes
Fixing the same issues the previous commit does for Gen7. Note that I can't test this one, since I don't have a Broadwell. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/gen8_surface_state.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff

[Mesa-dev] [PATCH 3/4] i965/Gen7: Set up layer constraints properly for depth buffers

2014-05-07 Thread Chris Forbes
to irb-layer_count, so we could render off the end of the texture. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/gen7_misc_state.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen7_misc_state.c b/src

Re: [Mesa-dev] [Mesa-stable] [PATCH 2/2] i965: Fix depth (array slices) computation for 1D_ARRAY render targets.

2014-05-08 Thread Chris Forbes
This won't work correctly with 1D array views which constrain NumLayers. On Thu, May 8, 2014 at 9:35 AM, Kenneth Graunke kenn...@whitecape.org wrote: 1D array targets store the number of slices in the Height field. Fixes Piglit's spec/!OpenGL 3.2/layered-rendering/clear-color-all-types

[Mesa-dev] [PATCH] glsl: Rename linker's is_varying_var

2014-05-08 Thread Chris Forbes
Both the ast-IR and linker have functions with this name, but different behavior. Rename the linker's version to var_counts_against_varying_limit to be closer to what it is actually used for. Suggested by Ian a while back. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- Note that there's

Re: [Mesa-dev] [PATCH] i965: Don't _swrast_BlitFramebuffer when doing CopyTexSubImage.

2014-05-12 Thread Chris Forbes
Reviewed-by: Chris Forbes chr...@ijw.co.nz On Tue, May 13, 2014 at 4:36 AM, Eric Anholt e...@anholt.net wrote: Kenneth Graunke kenn...@whitecape.org writes: The point of copytexsubimage_using_blit_framebuffer is to use a hardware accelerated BlitFramebuffer path. If that fails, we shouldn't

Re: [Mesa-dev] [PATCH] i965/gen8: Set depth extent field

2014-05-13 Thread Chris Forbes
Reviewed-by: Chris Forbes chr...@ijw.co.nz On Wed, May 14, 2014 at 6:19 AM, Jordan Justen jordan.l.jus...@intel.com wrote: The depth extent field is used to limit the allowed slice range that can be rendered to. With the previous setting, only slice 0 could be rendered. This fixes piglit

Re: [Mesa-dev] [PATCH 06/17] i965/fs: Move payload register info from brw_wm_compile to fs_visitor.

2014-05-16 Thread Chris Forbes
There are a handful of references to the defunct nr_payload_regs left in the comments of brw_fs_reg_allocate.cpp (although that code doesn't actually reference the variables you've moved) ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

Re: [Mesa-dev] [PATCH 01/17] i965/fs: Move perf_debug about register spilling to a more obvious spot.

2014-05-16 Thread Chris Forbes
Series is: Reviewed-by: Chris Forbes chr...@ijw.co.nz On Fri, May 16, 2014 at 6:19 PM, Kenneth Graunke kenn...@whitecape.org wrote: The if (!allocated_without_spills) block is an obvious spot for this performance warning message. In the Vec4 backend, scratch is also used for indirect access

Re: [Mesa-dev] [Mesa-stable] [PATCH 4/4] meta: Avoid _swrast_BlitFramebuffer in the meta CopyTexSubImage code.

2014-05-19 Thread Chris Forbes
Series is: Reviewed-by: Chris Forbes chr...@ijw.co.nz On Mon, May 19, 2014 at 6:12 PM, Kenneth Graunke kenn...@whitecape.org wrote: This is a replacement for bd44ac8b5ca08016bb064b37edaec95eccfdbcd5 that should actually work. Fixes Piglit's copyteximage-border on swrast, as well as one

Re: [Mesa-dev] [Mesa-stable] [PATCH 2/2] meta: Write color values in to 'out' variables for all the draw buffers

2014-05-19 Thread Chris Forbes
On Tue, May 20, 2014 at 8:20 AM, Anuj Phogat anuj.pho...@gmail.com wrote: @@ -247,7 +247,8 @@ _mesa_meta_setup_blit_shader(struct gl_context *ctx, struct blit_shader *shader = choose_blit_shader(target, table); const char *vs_input, *vs_output, *fs_input, *fs_output; const char

Re: [Mesa-dev] [Mesa-stable] [PATCH 2/2] meta: Write color values in to 'out' variables for all the draw buffers

2014-05-19 Thread Chris Forbes
. This all seems like a huge amount of extra machinery to avoid using gl_FragColor and having the backend just take care of it, though. What do we actually gain from this? On Tue, May 20, 2014 at 10:22 AM, Anuj Phogat anuj.pho...@gmail.com wrote: On Mon, May 19, 2014 at 3:12 PM, Chris Forbes chr

[Mesa-dev] ARB_sso layout() + other qualifiers

2014-05-19 Thread Chris Forbes
Hi Ian, When I was writing the `precise` support I found some error cases in the GLSL parser where we reject combinations of layout() with invariant / interpolation / etc qualifiers. This seems to be consistent with the GLSL 1.50 grammar (or, at least, admits all the examples that were given in

Re: [Mesa-dev] [PATCH] i965/fs: Set correct number of regs_written for MCS fetches.

2014-05-27 Thread Chris Forbes
Reviewed-by: Chris Forbes chr...@ijw.co.nz On Wed, May 28, 2014 at 10:27 AM, Matt Turner matts...@gmail.com wrote: regs_written is in units of virtual GRFs. --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa

Re: [Mesa-dev] [PATCH 01/19] i965/fs: Add and use an fs_inst copy constructor.

2014-05-27 Thread Chris Forbes
Patches 1-8 inclusive are Reviewed-by: Chris Forbes chr...@ijw.co.nz On Wed, May 28, 2014 at 1:47 PM, Matt Turner matts...@gmail.com wrote: Will get more complicated when fs_reg src becomes a pointer. --- src/mesa/drivers/dri/i965/brw_fs.cpp | 5 + src/mesa/drivers/dri/i965/brw_fs.h

Re: [Mesa-dev] [PATCH 12/19] i965/fs: Apply cube map array fixup and restore the payload.

2014-05-28 Thread Chris Forbes
It looks like the special handling of sources[0] in lowering LOAD_PAYLOAD would break this -- or does it never see this? On Wed, May 28, 2014 at 1:47 PM, Matt Turner matts...@gmail.com wrote: So that we don't have partial writes to a large VGRF. Will be cleaned up by register coalescing. ---

Re: [Mesa-dev] [PATCH 12/19] i965/fs: Apply cube map array fixup and restore the payload.

2014-05-28 Thread Chris Forbes
Oh, ignore that -- I had misread your lowering code. On Thu, May 29, 2014 at 9:40 AM, Chris Forbes chr...@ijw.co.nz wrote: It looks like the special handling of sources[0] in lowering LOAD_PAYLOAD would break this -- or does it never see this? On Wed, May 28, 2014 at 1:47 PM, Matt Turner

Re: [Mesa-dev] [Mesa-stable] [PATCH] i965: Don't emit SURFACE_STATEs for gather workarounds on Broadwell.

2014-05-29 Thread Chris Forbes
Did this test run include forcing ARB_gpu_shader5 on? On Thu, May 29, 2014 at 7:06 PM, Kenneth Graunke kenn...@whitecape.org wrote: As far as I can tell, Broadwell doesn't need any of the SURFACE_STATE workarounds for textureGather() bugs, so there's no need to emit a second set of identical

Re: [Mesa-dev] [Mesa-stable] [PATCH] i965: Don't emit SURFACE_STATEs for gather workarounds on Broadwell.

2014-05-29 Thread Chris Forbes
Reviewed-by: Chris Forbes chr...@ijw.co.nz On Thu, May 29, 2014 at 7:32 PM, Chris Forbes chr...@ijw.co.nz wrote: Did this test run include forcing ARB_gpu_shader5 on? On Thu, May 29, 2014 at 7:06 PM, Kenneth Graunke kenn...@whitecape.org wrote: As far as I can tell, Broadwell doesn't need

[Mesa-dev] [PATCH 02/11] mesa: Make CompressedTexSubImage errors more consistent

2014-06-02 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/teximage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 845ba80..5058b39 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c

[Mesa-dev] [RFC PATCH 00/11] Add support for ARB_compressed_texture_pixel_storage

2014-06-02 Thread Chris Forbes
This series adds support for ARB_compressed_texture_pixel_storage from GL4.2. This provides a convenient way to update a subrectangle of a compressed texture from client memory or a pixel buffer object, without having to rearrange the client copy. (Well, as convenient as GL pixel store state

[Mesa-dev] [PATCH 01/11] mesa: Trim down PixelStorei implementation

2014-06-02 Thread Chris Forbes
Move _mesa_error call for INVALID_VALUE to one place. Remove checks for previous value matching -- this was important when we were flushing vertices before the update, but that hasn't happened for a long time now. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/pixelstore.c | 175

[Mesa-dev] [PATCH 03/11] mesa: Add extension enable for ARB_compressed_texture_pixel_storage

2014-06-02 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index c2ff7e3..6b51425 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -86,6 +86,7

[Mesa-dev] [PATCH 09/11] mesa: Compute proper strides for compressed texture pixel storage.

2014-06-02 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/texstore.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index b5b7254..cb81f3f 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main

[Mesa-dev] [PATCH 07/11] mesa: Emit errors for inconsistent compressed pixel store state

2014-06-02 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/texgetimage.c | 10 +- src/mesa/main/teximage.c| 45 + src/mesa/main/teximage.h| 6 ++ 3 files changed, 60 insertions(+), 1 deletion(-) diff --git a/src/mesa/main

[Mesa-dev] [PATCH 10/11] mesa: Add pixel storage support for GetCompressedTexImage

2014-06-02 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/texgetimage.c | 73 + 1 file changed, 40 insertions(+), 33 deletions(-) diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index c22fb9b..8c0d3a1 100644 --- a/src/mesa

[Mesa-dev] [PATCH 06/11] mesa: Add new pixel pack/unpack state for ARB_compressed_texture_pixel_storage

2014-06-02 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/get_hash_params.py | 10 +++ src/mesa/main/mtypes.h | 4 +++ src/mesa/main/pixelstore.c | 64 3 files changed, 78 insertions(+) diff --git a/src/mesa/main

[Mesa-dev] [PATCH 08/11] mesa: Extract computation of compressed pixel store params

2014-06-02 Thread Chris Forbes
This logic is reusable across CompressedTex*Image* and GetCompressedTexImage; the strides calculated will also be needed in the PBO validation functions to ensure that the referenced range of bytes is valid. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/texstore.c | 47

[Mesa-dev] [PATCH 04/11] glapi: Add XML infrastructure for ARB_compressed_texture_pixel_storage

2014-06-02 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- .../gen/ARB_compressed_texture_pixel_storage.xml| 21 + src/mapi/glapi/gen/Makefile.am | 1 + src/mapi/glapi/gen/gl_API.xml | 4 +++- 3 files changed, 25 insertions(+), 1 deletion

[Mesa-dev] [PATCH 11/11] docs: Mark off ARB_compressed_texture_pixel_storage

2014-06-02 Thread Chris Forbes
.. and add to release notes for 10.3 Signed-off-by: Chris Forbes chr...@ijw.co.nz --- docs/GL3.txt| 2 +- docs/relnotes/10.3.html | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index c360f2c..9f86a39 100644 --- a/docs/GL3.txt +++ b

[Mesa-dev] [PATCH 05/11] tests: Add new enum strings for ARB_compressed_texture_pixel_storage

2014-06-02 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/tests/enum_strings.cpp | 8 1 file changed, 8 insertions(+) diff --git a/src/mesa/main/tests/enum_strings.cpp b/src/mesa/main/tests/enum_strings.cpp index d16eb36..66ff4ec 100644 --- a/src/mesa/main/tests/enum_strings.cpp

Re: [Mesa-dev] ARB_sso layout() + other qualifiers

2014-06-02 Thread Chris Forbes
On Tue, Jun 3, 2014 at 11:17 AM, Ian Romanick i...@freedesktop.org wrote: Do you mean supported or enabled (in the shader)? ARB_shading_language_420pack is supported by every driver that supports GLSL 1.30. I mean enabled in the shader, sorry. ___

Re: [Mesa-dev] [PATCH V2 8/9] glsl: Implement overload resolution for ARB_gpu_shader5

2014-06-03 Thread Chris Forbes
, May 4, 2014 at 1:24 AM, Chris Forbes chr...@ijw.co.nz wrote: The ARB_gpu_shader5 spec says: A function definition A is considered a better match than function definition B if: * for at least one function argument, the conversion for that argument in A is better than the corresponding

[Mesa-dev] [PATCH] i965/fs: Allow array dereference of HW_REG.

2014-06-04 Thread Chris Forbes
When dereferencing an element of gl_SampleMaskIn[], the source register here will be a HW_REG rather than a VGRF because the payload slot is now exposed directly. Fixes an assertion failure in the Piglit test: tests/spec/arb_gpu_shader5/execution/samplemaskin-basic Signed-off-by: Chris

Re: [Mesa-dev] Request for information on Radeon

2014-06-08 Thread Chris Forbes
The GSoC project does not include any gallium plumbing, or your backends. It might be possible to take Fabian's frontend code and start building your pieces against it, but there might be some changes which would force you to do rework. -- Chris On Mon, Jun 9, 2014 at 10:12 AM, Ilia Mirkin

Re: [Mesa-dev] [PATCH] i965/fs: Allow CSE on math opcodes on Gen6+.

2014-06-08 Thread Chris Forbes
Reviewed-by: Chris Forbes chr...@ijw.co.nz On Mon, Jun 9, 2014 at 8:57 AM, Kenneth Graunke kenn...@whitecape.org wrote: On Sunday, June 08, 2014 09:56:55 AM Matt Turner wrote: Reviewed-by: Matt Turner matts...@gmail.com At the office you mentioned something about this getting stuck

Re: [Mesa-dev] [PATCH 04/22] i965/fs: Add generator support for fetching texture dimensions

2014-06-09 Thread Chris Forbes
How is this different from the existing SHADER_OPCODE_TXS? On Mon, Jun 9, 2014 at 7:45 PM, Topi Pohjolainen topi.pohjolai...@intel.com wrote: Signed-off-by: Topi Pohjolainen topi.pohjolai...@intel.com --- src/mesa/drivers/dri/i965/brw_defines.h| 2 ++

Re: [Mesa-dev] [PATCH 04/22] i965/fs: Add generator support for fetching texture dimensions

2014-06-09 Thread Chris Forbes
: On Mon, Jun 09, 2014 at 07:56:46PM +1200, Chris Forbes wrote: How is this different from the existing SHADER_OPCODE_TXS? Hold on, I'll need to go and check. There was a definite reason, I remember the original having a restriction of some kind. But anyway, this is an oversight of mine

Re: [Mesa-dev] [PATCH 11/22] i965/gen7: Configure msaa stencil buffers as single sampled

2014-06-09 Thread Chris Forbes
@@ -465,8 +471,8 @@ gen7_update_renderbuffer_surface(struct brw_context *brw, bool is_array = false; int depth = MAX2(irb-layer_count, 1); const uint8_t mocs = GEN7_MOCS_L3; - - int min_array_element = irb-mt_layer / MAX2(mt-num_samples, 1); + const int min_array_element =

Re: [Mesa-dev] [PATCH 12/22] i965/gen6: Configure msaa stencil buffers as single sampled

2014-06-09 Thread Chris Forbes
Same concern as in patch 11. On Mon, Jun 9, 2014 at 7:45 PM, Topi Pohjolainen topi.pohjolai...@intel.com wrote: Signed-off-by: Topi Pohjolainen topi.pohjolai...@intel.com --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 16 +--- 1 file changed, 13 insertions(+), 3

[Mesa-dev] [PATCH] glsl: Validate aux storage qualifier combination with other qualifiers.

2014-06-09 Thread Chris Forbes
an extra case for uniform blocks members and struct members, though, since they don't go through the normal path. V3: Improve error message wording; eliminate redundant error generation for inputs in VS or outputs in FS. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/ast_to_hir.cpp | 76

Re: [Mesa-dev] [PATCH] meta: save and restore swizzle for _GenerateMipmap

2014-06-09 Thread Chris Forbes
It would be good to have a piglit test which demonstrates the need for this. Reviewed-by: Chris Forbes chr...@ijw.co.nz On Tue, Jun 10, 2014 at 2:48 AM, Robert Bragg rob...@sixbynine.org wrote: This makes sure to use a no-op swizzle while iteratively rendering each level of a mipmap otherwise

Re: [Mesa-dev] [PATCH] glsl/cs: Fix local_size_y and local_size_z

2014-06-09 Thread Chris Forbes
Reviewed-by: Chris Forbes chr...@ijw.co.nz On Tue, Jun 10, 2014 at 11:51 AM, Jordan Justen jordan.l.jus...@intel.com wrote: flags.q.local_size has 3 bits. One each for x, y and z. Fixes piglit's: * spec/ARB_compute_shader/linker/mismatched_local_work_sizes * spec/ARB_compute_shader/compiler

Re: [Mesa-dev] [PATCH] i965: Set the fast clear color value for texture surfaces

2014-06-10 Thread Chris Forbes
Reviewed-by: Chris Forbes chr...@ijw.co.nz On Wed, Jun 11, 2014 at 6:51 AM, Ian Romanick i...@freedesktop.org wrote: On 06/09/2014 09:43 AM, Neil Roberts wrote: When a multisampled texture is used for sampling the fast clear color value needs to be programmed into the surface state

Re: [Mesa-dev] Request for information on Radeon

2014-06-10 Thread Chris Forbes
For the first two points, a partial implementation is already done here: https://github.com/fabe3k/mesa/commits/tessellation This predates the addition of ARB_separate_shader_objects, which has some interactions. There are probably also plenty of rough edges, but it should give you enough to get

Re: [Mesa-dev] [PATCH 2/2] i965: Emit smarter code for b2i of a comparison

2014-06-10 Thread Chris Forbes
s/b2i/b2f/ in the commit message On Wed, Jun 11, 2014 at 2:13 PM, Ian Romanick i...@freedesktop.org wrote: From: Ian Romanick ian.d.roman...@intel.com Previously we would emit the comparison, emit an AND to mask off extra bits from the comparison result, then convert the result to float.

Re: [Mesa-dev] [PATCH 01/18] glsl: Add parsing support for multi-stream output in geometry shaders.

2014-06-11 Thread Chris Forbes
On Wed, Jun 11, 2014 at 7:49 PM, Iago Toral Quiroga ito...@igalia.com wrote: @@ -509,6 +509,8 @@ struct ast_type_qualifier { /** \name Layout qualifiers for GL_ARB_gpu_shader5 */ /** \{ */ unsigned invocations:1; + unsigned streamId:1; /* Has streamId

Re: [Mesa-dev] [PATCH 05/18] glsl: Fail to link if inter-stage input/outputs are not assigned to stream 0

2014-06-11 Thread Chris Forbes
This would appear to prohibit the use of multiple streams in separable programs entirely. I don't think that's the right thing. On Wed, Jun 11, 2014 at 7:49 PM, Iago Toral Quiroga ito...@igalia.com wrote: Outputs that are linked to inputs in the next stage must be output to stream 0,

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