[Mesa-dev] [RFC PATCH 03/10] i965/fs: Gen4/5: Fix inconsistency in the VUE map.

2013-08-03 Thread Chris Forbes
The SF never gets to see the clip distances. If we didn't ignore them here, we got confused about the correct offsets for any varyings laid out after them. (user-defined varyings would break, but gl_FrontColor etc worked properly). Signed-off-by: Chris Forbes --- src/mesa/drivers/dri

[Mesa-dev] [RFC PATCH 02/10] i965/Gen4-5: allocate VUE slots for clipdistance if user clipping is enabled

2013-08-03 Thread Chris Forbes
Also adjust the SF URB read offset to account for there being two additional slots of stuff it doesn't care about. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_sf.h | 2 +- src/mesa/drivers/dri/i965/brw_vs.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --

[Mesa-dev] [RFC PATCH 05/10] i965/clip: Enable interpolation of clip distances

2013-08-03 Thread Chris Forbes
Previously we had disabled interpolation of the clip distances as a special case, since they were unused. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_clip_util.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965

[Mesa-dev] [RFC PATCH 04/10] i965/vs: Do legacy clip lowering earlier

2013-08-03 Thread Chris Forbes
We need to produce clip flags for the vertex header on Gen4/5, so clip plane lowering has to be done before we try to emit the flags/psiz attribute. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_vec4.h | 2 +- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 33

[Mesa-dev] [RFC PATCH 07/10] i965/clip: Track offset into the vertex for clipdistance

2013-08-03 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_clip.h | 3 +++ src/mesa/drivers/dri/i965/brw_clip_tri.c | 9 + 2 files changed, 12 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_clip.h b/src/mesa/drivers/dri/i965/brw_clip.h index 671d3a9..f26d75d 100644

[Mesa-dev] [RFC PATCH 06/10] i965/Gen4-5: Set clip flags from clip distances

2013-08-03 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index f80777b..c0b5ccd

[Mesa-dev] [RFC PATCH 08/10] i956/clip: push dp4 into load_clip_distance

2013-08-03 Thread Chris Forbes
Soon the dp4 is only going to be used for fixed clip planes. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_clip_tri.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_clip_tri.c b/src/mesa/drivers/dri

[Mesa-dev] [RFC PATCH 09/10] i965/clip: Use clip distances for all user clipping

2013-08-03 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_clip_tri.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_clip_tri.c b/src/mesa/drivers/dri/i965/brw_clip_tri.c index bd3ffb3..4d2eb0a 100644 --- a/src/mesa/drivers/dri/i965

[Mesa-dev] [RFC PATCH 10/10] i965/clip: remove spurious clipvertex param

2013-08-03 Thread Chris Forbes
Nothing in the clipper uses gl_ClipVertex any more, so we don't care where it is. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_clip_tri.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_clip_tri.c b/src

[Mesa-dev] [RFC PATCH 11/10] i965/clip: Support clip distances for line clipping

2013-08-04 Thread Chris Forbes
This does the same thing as we do for triangle clipping -- select the appropriate source (either dot(hpos,fixed plane) or a clipdistance slot). Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_clip_line.c | 66 ++- 1 file changed, 47 insertions(+), 19

Re: [Mesa-dev] [RFC PATCH 03/10] i965/fs: Gen4/5: Fix inconsistency in the VUE map.

2013-08-04 Thread Chris Forbes
Turns out this patch is rubbish, and only "fixes" the layout for the interpolation tests at the cost of breaking a bunch of other stuff. -- Chris ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-

Re: [Mesa-dev] [RFC PATCH 06/10] i965/Gen4-5: Set clip flags from clip distances

2013-08-05 Thread Chris Forbes
You're right, that's completely bogus, and I meant to read the flags instead. Thanks :) On Tue, Aug 6, 2013 at 9:09 AM, Paul Berry wrote: > On 3 August 2013 19:59, Chris Forbes wrote: >> >> Signed-off-by: Chris Forbes >> --- >> src/mesa/drive

Re: [Mesa-dev] [RFC PATCH 09/10] i965/clip: Use clip distances for all user clipping

2013-08-05 Thread Chris Forbes
This is what I started with, but brw_ENDIF destroys the flags. On Tue, Aug 6, 2013 at 9:40 AM, Paul Berry wrote: > On 3 August 2013 19:59, Chris Forbes wrote: >> >> Signed-off-by: Chris Forbes >> --- >> src/mesa/drivers/dri/i965/brw_clip_tri.c | 7 +-- >&

Re: [Mesa-dev] [RFC PATCH 09/10] i965/clip: Use clip distances for all user clipping

2013-08-05 Thread Chris Forbes
Actually, that justification sounds like nonsense after thinking about it a bit more -- we're in SPF mode. On Tue, Aug 6, 2013 at 9:47 AM, Chris Forbes wrote: > This is what I started with, but brw_ENDIF destroys the flags. > > On Tue, Aug 6, 2013 at 9:40 AM, Paul Berry wrote:

Re: [Mesa-dev] [RFC PATCH 02/10] i965/Gen4-5: allocate VUE slots for clipdistance if user clipping is enabled

2013-08-05 Thread Chris Forbes
In my current code most of this has gone away -- I just force VARYING_SLOT_CLIP_DIST* to be valid if we're doing user clipping, and they fall wherever they naturally would in the VUE map. On Tue, Aug 6, 2013 at 9:19 AM, Paul Berry wrote: > On 3 August 2013 19:59, Chris Forbes wrote: &g

[Mesa-dev] [PATCH V2 00/12] i965: gl_ClipDistance support for Gen4/5.

2013-08-09 Thread Chris Forbes
This series adds support for GLSL-1.30 clip distances on Gen4/5, and extends max clip planes to match the 1.30 requirement on Cantiga and later. Passes 2000/2004 glsl-1.30 piglits on Ironlake. The missing 4 tests here are bugs in handling unusual `switch` control flow, and affect all gens. Passes

[Mesa-dev] [PATCH V2 01/12] i965/Gen4-5: ensure VUE slots for clipdistance are valid if user clipping is enabled.

2013-08-09 Thread Chris Forbes
V2: We don't particularly care where they fall in the VUE map, as long as they are allocated somewhere, and occupy two contiguous slots. Don't fiddle with the SF layout at all -- there's no need. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_vs.c | 5 + 1

[Mesa-dev] [PATCH V2 02/12] i965/vs: Do legacy clip lowering earlier

2013-08-09 Thread Chris Forbes
We need to produce clip flags for the vertex header on Gen4/5, so clip plane lowering has to be done before we try to emit the flags/psiz attribute. Signed-off-by: Chris Forbes Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_vec4.h | 2 +- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH V2 03/12] i965/clip: Enable interpolation of clip distances

2013-08-09 Thread Chris Forbes
Previously we had disabled interpolation of the clip distances as a special case, since they were unused. Signed-off-by: Chris Forbes Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_clip_util.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mesa

[Mesa-dev] [PATCH V2 04/12] i965: add new VS_OPCODE_UNPACK_FLAGS_SIMD4X2

2013-08-09 Thread Chris Forbes
Splits the bottom 8 bits of f0.0 for further wrangling in a SIMD4x2 program. The 4 bits corresponding to the channels in each program flow are copied to the LSBs of dst.x visible to each flow. This is useful for working with clipping flags in the VS. Signed-off-by: Chris Forbes --- src/mesa

[Mesa-dev] [PATCH V2 05/12] i965/Gen4-5: Set clip flags from clip distances

2013-08-09 Thread Chris Forbes
compiles anyway. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 25 ++--- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index f80777b.

[Mesa-dev] [PATCH V2 06/12] i965/clip: Track offset into the vertex for clipdistance

2013-08-09 Thread Chris Forbes
Signed-off-by: Chris Forbes Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_clip.h | 3 +++ src/mesa/drivers/dri/i965/brw_clip_tri.c | 9 + 2 files changed, 12 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_clip.h b/src/mesa/drivers/dri/i965/brw_clip.h index

[Mesa-dev] [PATCH V2 07/12] i956/clip: push dp4 into load_clip_distance

2013-08-09 Thread Chris Forbes
Soon the dp4 is only going to be used for fixed clip planes. V2: Remove old inaccurate comment about the behavior of this function; add a better explanation above. Signed-off-by: Chris Forbes Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_clip_tri.c | 39

[Mesa-dev] [PATCH V2 08/12] i965/clip: Use clip distances for all user clipping

2013-08-09 Thread Chris Forbes
V2: Adjust explanation of load_clip_distance() Signed-off-by: Chris Forbes Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_clip_tri.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_clip_tri.c b/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH V2 09/12] i965/clip: remove spurious clipvertex param

2013-08-09 Thread Chris Forbes
Nothing in the clipper uses gl_ClipVertex any more, so we don't care where it is. V2: Don't bother fishing out the clipvertex offset either. Signed-off-by: Chris Forbes Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_clip_tri.c | 15 --- 1 file changed, 4

[Mesa-dev] [PATCH V2 10/12] i965/clip: Support clip distances for line clipping

2013-08-09 Thread Chris Forbes
This does the same thing as we do for triangle clipping -- select the appropriate source (either dot(hpos,fixed plane) or a clipdistance slot). Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_clip_line.c | 66 ++- 1 file changed, 47 insertions(+), 19

[Mesa-dev] [PATCH V2 11/12] i965: get rid of clip plane compaction

2013-08-09 Thread Chris Forbes
--- src/mesa/drivers/dri/i965/brw_clip.c | 3 +- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 40 +- src/mesa/drivers/dri/i965/brw_vs.c | 14 ++--- src/mesa/drivers/dri/i965/brw_vs.h | 9 -- 4 files changed, 11 insertions(+),

[Mesa-dev] [PATCH V2 12/12] i965: allow 8 user clip planes on CTG+

2013-08-09 Thread Chris Forbes
s breakage. Signed-off-by: Chris Forbes Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_clip.h | 6 +- src/mesa/drivers/dri/i965/brw_clip_state.c | 8 +++- src/mesa/drivers/dri/i965/brw_clip_tri.c | 4 ++-- src/mesa/drivers/dri/i965/brw_clip_util.c | 7 ++- src/me

Re: [Mesa-dev] [PATCH 01/30] glsl: Refactor handling of gl_ClipDistance/gl_ClipVertex linkage rules for GS.

2013-08-20 Thread Chris Forbes
Ken, I think the big win from using pass-by-pointer is that you can see what's happening at the call site. References' value syntax and pointer semantics is a weird mix. But that might just be the C programmer talking, as you suggested. -- Chris ___ me

Re: [Mesa-dev] void operation in glsl

2013-08-25 Thread Chris Forbes
It's just a simple, portable way to make the `unused parameter` warning shut up, when you're deliberately ignoring your parameters. There are other ways [__attribute__(( unused )), etc] but they cease to be simple or portable fairly quickly. -- Chris On Mon, Aug 26, 2013 at 5:07 PM, Liu Xin wro

[Mesa-dev] [PATCH] i965/fs: Gen4: Zero out extra coordinates when using shadow compare

2013-08-27 Thread Chris Forbes
Fixes broken rendering if these MRFs contained anything other than zero. NOTE: This is a candidate for stable branches. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri

Re: [Mesa-dev] [PATCH] i965/fs: Gen4: Zero out extra coordinates when using shadow compare

2013-08-27 Thread Chris Forbes
Sorry, saw the bogus comment style just after I sent this out. -- Chris On Tue, Aug 27, 2013 at 9:45 PM, Chris Forbes wrote: > Fixes broken rendering if these MRFs contained anything other than zero. > > NOTE: This is a candidate for stable branches. > Signed-off-by: Chris Forbes

Re: [Mesa-dev] [PATCH 4/4] i965: Enable AMD_seamless_cubemap_per_texture

2013-09-04 Thread Chris Forbes
For the series, Reviewed-by: Chris Forbes On Thu, Sep 5, 2013 at 6:29 AM, Ian Romanick wrote: > From: Ian Romanick > > The change is very small. Do seamless filtering if either the context > enable is set or the sampler enable is set. > > The AMD_seamless_cubema

Re: [Mesa-dev] [PATCH] i965/gen7: always lower textureGrad() on gen7

2013-09-05 Thread Chris Forbes
A possible explanation for the perf change is that Xonotic uses anisotropic filtering at this quality level. Lowering to txl defeats it. It would be worth doing an image quality comparison before and after the change. -- Chris On Thu, Sep 5, 2013 at 8:35 PM, Chia-I Wu wrote: > sample_d is slowe

Re: [Mesa-dev] [PATCH] i965/vec4: Only zero out unused message components when there are any.

2013-09-09 Thread Chris Forbes
. Reviewed-by: Chris Forbes On Tue, Sep 10, 2013 at 6:38 AM, Kenneth Graunke wrote: > Otherwise, coordinates with four components would result in a MOV > with a destination writemask that has no channels enabled: > > mov(8) g115<1>.F 0D { align16 WE_normal NoDDChk 1Q }; > > At

Re: [Mesa-dev] [PATCH 4/9] i965/gs: Set control data header size/format appropriately for EndPrimitive().

2013-09-09 Thread Chris Forbes
In the commit message: > Fortunately, OpenGL only requires separate streams to be supported >when the output type is points, and EndPrimitive() only has an effect > when the input type is line_strip or triangle_strip, so it's not a... Shouldn't this say 'output type' ? -- Chris On Tue, Sep 10,

Re: [Mesa-dev] [PATCH 1/3] i965/vec4: Simplify the computation of coord_mask and zero_mask.

2013-09-10 Thread Chris Forbes
This is a fair bit saner :) For the series: Reviewed-by: Chris Forbes On Tue, Sep 10, 2013 at 11:00 AM, Kenneth Graunke wrote: > We can easily compute these without loops, resulting in simpler and > shorter code. > > Signed-off-by: Kenneth Graunke > Cc: Ian Romanick >

Re: [Mesa-dev] [PATCH] i965/hsw: approximate DDX with a uniform value across a subspan

2013-09-11 Thread Chris Forbes
Can we make this approximation conditional on an image-quality control in driconf [or somewhere else]? On Thu, Sep 12, 2013 at 5:00 PM, Chia-I Wu wrote: > From: Chia-I Wu > > Replicate the gradient of the top-left pixel to the other three pixels in the > subspan, as how DDY is implemented. Befo

Re: [Mesa-dev] [PATCH] i965/hsw: approximate DDX with a uniform value across a subspan

2013-09-12 Thread Chris Forbes
In a *very* quick look I haven't found anything equivalent -- but I might just be being blind. CC'ing Ian -- any opinion? Is there any conformance issue here? -- Chris On Thu, Sep 12, 2013 at 8:41 PM, Chia-I Wu wrote: > On Thu, Sep 12, 2013 at 2:06 PM, Chris Forbes wrote: &

Re: [Mesa-dev] [PATCH] i965/hsw: approximate DDX with a uniform value across a subspan

2013-09-12 Thread Chris Forbes
Sounds good to me. On Fri, Sep 13, 2013 at 3:11 PM, Chia-I Wu wrote: > On Thu, Sep 12, 2013 at 10:48 PM, Ian Romanick wrote: >> On 09/12/2013 01:06 AM, Chris Forbes wrote: >>> Can we make this approximation conditional on an image-quality control >>> in

[Mesa-dev] [PATCH V3 00/11] ARB_texture_gather for i965 Gen7

2013-09-15 Thread Chris Forbes
This series adds support for ARB_texture_gather. Patches 1-2 add the core mesa and GLSL compiler scaffolding for the extension; Patches 3-5 add basic support to the i965 driver; Patches 6-10 work around a hardware bug which causes incorrect sampling of R32G32_FLOAT surfaces; Patch 11 turns everyt

[Mesa-dev] [PATCH V3 01/11] mesa: add texture gather changes

2013-09-15 Thread Chris Forbes
From: Maxence Le Dore Reviewed-by: Kenneth Graunke --- src/mapi/glapi/gen/ARB_texture_gather.xml | 14 ++ src/mapi/glapi/gen/gl_API.xml | 2 +- src/mesa/main/context.c | 4 src/mesa/main/extensions.c| 1 + src/mesa/main/get.c

[Mesa-dev] [PATCH V3 02/11] glsl: add texture gather changes

2013-09-15 Thread Chris Forbes
From: Maxence Le Dore V2 [Chris Forbes]: - Add new pattern, fixup parameter reading. V3: Rebase onto new builtins machinery Reviewed-by: Kenneth Graunke --- src/glsl/builtin_functions.cpp | 35 +++ src/glsl/glcpp/glcpp-parse.y| 3 +++ src/glsl

[Mesa-dev] [PATCH V3 03/11] i965: add SHADER_OPCODE_TG4

2013-09-15 Thread Chris Forbes
Adds the Gen7 message IDs, a new SHADER_OPCODE_TG4 pseudo-op, and low-level support for emitting it via generate_tex(). V3: Updated for changes in master. Signed-off-by: Chris Forbes Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_defines.h | 3 +++ src/mesa/drivers/dri

[Mesa-dev] [PATCH V3 04/11] i965/fs: Add support for ir_tg4

2013-09-15 Thread Chris Forbes
ffset), and then don't do anything afterward in the shader. * For 0/1 swizzles blast the appropriate constant over all the output channels instead of sampling. V2: Avoid duplicating header enabling block V3: Avoid sampling at all, for degenerate swizzles. Signed-off-by: Chris Forbes ---

[Mesa-dev] [PATCH V3 05/11] i965/vs: Add support for ir_tg4

2013-09-15 Thread Chris Forbes
Pretty much the same as the FS case. Channel select goes in the header, V2: Less mangling. V3: Avoid sampling at all, for degenerate swizzles. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_vec4.h | 1 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 46

[Mesa-dev] [PATCH V3 06/11] i965: w/a for gather4 green RG32F

2013-09-15 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 src/mesa/drivers/dri/i965/brw_program.h| 5 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 4 src/mesa/drivers/dri/i965/brw_wm.c | 9 + 4 files changed, 22 insertions

[Mesa-dev] [PATCH V3 07/11] i965: Add BRW_SURFACEFORMAT_R32G32_FLOAT_LD, required for IVB gather4 w/a

2013-09-15 Thread Chris Forbes
gather4 GREEN channel against a surface with format R32G32_FLOAT doesn't work correctly on IVB. w/a from bspec: - use R32G32_FLOAT_LD = 0x97 instead, for gather4 only. - select BLUE channel to read GREEN Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_defines.h

[Mesa-dev] [PATCH V3 08/11] i965: make room in the binding table for a full alternate set of surface_states

2013-09-15 Thread Chris Forbes
Worst-case is that *every* texunit uses a format that needs overriding. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_context.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.h b/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH V3 09/11] i965: Emit a second set of SURFACE_STATE for gather4 from textures.

2013-09-15 Thread Chris Forbes
This allows us to use a different surface format for gather4, which is required for R32G32_FLOAT to work on Gen7. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_context.h | 3 +- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 57 ++- src/mesa

[Mesa-dev] [PATCH V3 10/11] i965: use gather slots in the binding table for gather4.

2013-09-15 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_fs_emit.cpp | 8 ++-- src/mesa/drivers/dri/i965/brw_vec4_emit.cpp | 8 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp b/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH V3 11/11] i965: Enable ARB_texture_gather on Gen7

2013-09-15 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_context.c | 1 + src/mesa/drivers/dri/i965/intel_extensions.c | 4 2 files changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index 4fcc9fb..96d1ff4

[Mesa-dev] [PATCH] i965: Fix cube array coordinate normalization

2013-09-15 Thread Chris Forbes
adjusted to provoke this behavior. Signed-off-by: Chris Forbes Cc: "9.2" mesa-sta...@lists.freedesktop.org --- src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/mesa/driver

[Mesa-dev] [PATCH] add LIBGL_NEVER_INDIRECT env var to disable fallback to indirect

2013-09-25 Thread Chris Forbes
This is useful when working on the drivers, since falling back to indirect rendering means we broke our driver's ability to load somehow. Signed-off-by: Chris Forbes --- docs/envvars.html | 1 + src/glx/glxext.c | 10 -- 2 files changed, 9 insertions(+), 2 deletions(-) diff --

Re: [Mesa-dev] [PATCH] i965: Fix cube array coordinate normalization

2013-09-25 Thread Chris Forbes
Fixed and landed on master now. On Mon, Sep 23, 2013 at 8:05 AM, Eric Anholt wrote: > Chris Forbes writes: > >> Hardware requires the magnitude of the largest component to not exceed >> 1; brw_cubemap_normalize ensures that this is the case. >> >> Unfortunately, we

Re: [Mesa-dev] [PATCH V3 04/19] glsl: add support for ARB_texture_multisample

2013-02-13 Thread Chris Forbes
Ouch. Thanks for catching that -- are there any other similar things I need to be aware of? On Wed, Feb 13, 2013 at 8:19 PM, Kenneth Graunke wrote: > On 02/08/2013 01:19 AM, Chris Forbes wrote: >> >> V2: - emit `sample` parameter properly for multisample texelFetch() >>

[Mesa-dev] [PATCH 0/3] Revisit sample count limits with internalformat_query

2013-02-17 Thread Chris Forbes
This series implements the interactions between internalformat_query, texture_multisample, and multisample renderbuffer creation. Applies on top of V4 of the texture_multisample series (which I'll send out soon), or V3 with small modifications. 2/3 might be interesting on its own, for the 9.1 br

[Mesa-dev] [PATCH 1/3] mesa: allow internalformat_query with multisample texture targets

2013-02-17 Thread Chris Forbes
, but the driver may still be able to implement a reasonable resolve operation, so it can be supported for renderbuffers. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_context.c | 6 -- src/mesa/main/dd.h | 4 +++- src/mesa/main/formatquery.c

[Mesa-dev] [PATCH 2/3] mesa: helper for checking renderbuffer sample count

2013-02-17 Thread Chris Forbes
2): "If is greater than the maximum number of samples supported for then the error INVALID_OPERATION is generated (see GetInternalformativ in section 6.X)." Signed-off-by: Chris Forbes --- src/mesa/main/fbobject.c | 43 +++ src/mesa/mai

[Mesa-dev] [PATCH 3/3] mesa: use _mesa_check_sample_count() for multisample textures

2013-02-17 Thread Chris Forbes
TODO in the implementation of TexImage*DMultisample. Signed-off-by: Chris Forbes --- src/mesa/main/fbobject.c | 11 +++ src/mesa/main/teximage.c | 30 +- 2 files changed, 16 insertions(+), 25 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa

[Mesa-dev] [PATCH V4 00/19] ARB_texture_multisample support

2013-02-26 Thread Chris Forbes
This series adds the core mesa bits for ARB_texture_multisample, and support in the i965 driver for Gen6 and Gen7. I've addressed the issues that were raised for V3, and also fixed some other bugs which I found while beefing up the piglit coverage for this. - Proxy texture targets were denied in

[Mesa-dev] [PATCH V4 01/19] glapi: add ARB_texture_multisample

2013-02-26 Thread Chris Forbes
g the generator it makes good sense. V3: - Squash in stubs for new entrypoints, and dispatch_sanity tweaks, so we don't get build breakage between those patches. V4: - Fix various remaining whitespace issues Signed-off-by: Chris Forbes [1/3 V2] Reviewed-by: Matt Turner [V3] Reviewe

[Mesa-dev] [PATCH V4 02/19] mesa: add texobj support for ARB_texture_multisample

2013-02-26 Thread Chris Forbes
thing with correct values. For V4, just do the setup in finish_texture_init(). Signed-off-by: Chris Forbes [V2] Reviewed-by: Paul Berry [V4] Reviewed-by: Eric Anholt --- src/mesa/main/fbobject.c | 11 -- src/mesa/main/get.c | 3 ++ src/mesa/main/get_hash_para

[Mesa-dev] [PATCH V4 03/19] tests: add ARB_texture_multisample enums to table

2013-02-26 Thread Chris Forbes
Signed-off-by: Chris Forbes Reviewed-by: Eric Anholt Reviewed-by: Paul Berry --- src/mesa/main/tests/enum_strings.cpp | 21 + 1 file changed, 21 insertions(+) diff --git a/src/mesa/main/tests/enum_strings.cpp b/src/mesa/main/tests/enum_strings.cpp index 5d70007..1dae60f

[Mesa-dev] [PATCH V4 04/19] glsl: add support for ARB_texture_multisample

2013-02-26 Thread Chris Forbes
whitespace V4: - don't forget to include the new opcode in tex_opcode_strs[] (thanks Kenneth for spotting this) Signed-off-by: Chris Forbes [V2] Reviewed-by: Eric Anholt [V2] Reviewed-by: Paul Berry --- src/glsl/builtin_types.h | 19 + .../builtins/pro

[Mesa-dev] [PATCH V4 05/19] mesa: add new max sample count state

2013-02-26 Thread Chris Forbes
- GL_MAX_COLOR_TEXTURE_SAMPLES - GL_MAX_DEPTH_TEXTURE_SAMPLES - GL_MAX_INTEGER_SAMPLES V2: initialize limits to 1 in _mesa_init_constants as suggested by Brian and Paul Signed-off-by: Chris Forbes Reviewed-by: Paul Berry Reviewed-by: Eric Anholt --- src/mesa/main/context.c | 5

[Mesa-dev] [PATCH V4 06/19] i965: expose new max sample counts

2013-02-26 Thread Chris Forbes
V2: For now, only expose a depth sample count of 1, since there are unresolved interactions with W-tiling for stencil textures and possibly also HiZ for depth textures. Signed-off-by: Chris Forbes Reviewed-by: Paul Berry Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_context.c

[Mesa-dev] [PATCH V4 07/19] mesa: implement GetMultisamplefv

2013-02-26 Thread Chris Forbes
ition for winsys FBOs, at Paul's suggestion Signed-off-by: Chris Forbes Reviewed-by: Paul Berry Reviewed-by: Eric Anholt --- src/mesa/drivers/common/driverfuncs.c | 3 +++ src/mesa/main/dd.h| 8 src/mesa/main/multisample.c | 25 ++

[Mesa-dev] [PATCH V4 08/19] mesa: implement sample mask

2013-02-26 Thread Chris Forbes
igned-off-by: Chris Forbes Reviewed-by: Eric Anholt --- src/mesa/main/enable.c | 18 ++ src/mesa/main/get.c | 9 + src/mesa/main/get_hash_params.py | 2 ++ src/mesa/main/mtypes.h | 6 ++ src/mesa/main/multisample.c

[Mesa-dev] [PATCH V4 09/19] i965: add support for sample mask on Gen6+

2013-02-26 Thread Chris Forbes
Signed-off-by: Chris Forbes Reviewed-by: Eric Anholt Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_context.h| 2 +- src/mesa/drivers/dri/i965/gen6_blorp.cpp | 2 +- src/mesa/drivers/dri/i965/gen6_multisample_state.c | 19 +-- src/mesa/drivers

[Mesa-dev] [PATCH V4 10/19] i965: expose sample positions

2013-02-26 Thread Chris Forbes
Moves the definition of the sample positions out of gen6_emit_3dstate_multisample, and unpacks them in gen6_get_sample_position. V2: Be consistent about `sample position` rather than `location`. Signed-off-by: Chris Forbes Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_context.c

[Mesa-dev] [PATCH V4 11/19] mesa: support multisample textures in framebuffer completeness check

2013-02-26 Thread Chris Forbes
-type-specific blocks, as suggested by Eric V4: - Removed stencil hacks which were missed in V3 (thanks Eric) - Don't move the declaration of texImg; only required pre-V3. Signed-off-by: Chris Forbes [V2] Reviewed-by: Paul Berry --- src/mesa/main/fbobj

[Mesa-dev] [PATCH V4 12/19] mesa: implement TexImage*Multisample

2013-02-26 Thread Chris Forbes
deallocate the texture - dont forget to call _mesa_update_fbo_texture V4: - fix indentation - don't throw errors on proxy texture targets Signed-off-by: Chris Forbes --- src/mesa/main/teximage.c | 167 +-- 1 file changed, 163 insertions(

[Mesa-dev] [PATCH V4 13/19] i965: add support for multisample textures

2013-02-26 Thread Chris Forbes
d-off-by: Chris Forbes Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_tex_layout.c | 1 + src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 2 ++ src/mesa/drivers/dri/intel/intel_fbo.c | 24 +--- src/mesa/drivers/dri/intel/intel_mipmap_tree.c

[Mesa-dev] [PATCH V4 14/19] i965: Support multisampling in surface_state for textures

2013-02-26 Thread Chris Forbes
- set GEN7_SURFACE_ARYSPC_LOD0 if it's set in the miptree. V2: - Clarify commit message - Rebased onto Paul's physical/logical dims cleanup - Added Gen7 support Signed-off-by: Chris Forbes Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_wm_surface_st

[Mesa-dev] [PATCH V4 15/19] i965: take the target into account for Gen7 MSAA modes

2013-02-26 Thread Chris Forbes
the MCS surface may be accessed. Software must ensure that the surface is defined to avoid GTT errors." To allow the shader to treat all surfaces uniformly, force UMS if the surface is to be used as a multisample texture, even if CMS would have been possible. V3: - Quoted erratum text

[Mesa-dev] [PATCH V4 16/19] i965: add a new virtual opcode: SHADER_OPCODE_TXF_MS

2013-02-26 Thread Chris Forbes
clobbered, producing bad results. Signed-off-by: Chris Forbes Reviewed-by: Paul Berry --- src/mesa/drivers/dri/i965/brw_defines.h | 1 + src/mesa/drivers/dri/i965/brw_fs.cpp| 2 ++ src/mesa/drivers/dri/i965/brw_fs_emit.cpp | 7 +++ src/mesa/drivers/dri/i965/brw_vec4.cpp

[Mesa-dev] [PATCH V4 17/19] i965/vs: add support for ir_txf_ms on Gen6+

2013-02-26 Thread Chris Forbes
itted. V2: Reworked completely, added support for Gen7. V3: - Use new sample_index, sample_index_type rather than reusing lod - Clarify commit message. V4: - Fix comment style Signed-off-by: Chris Forbes Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/i965/brw_vec4_visito

[Mesa-dev] [PATCH V4 18/19] i965/fs: add support for ir_txf_ms on Gen6+

2013-02-26 Thread Chris Forbes
r Gen7. V3: - Introduce sample_index parameter rather than reusing lod - Removed spurious whitespace change - Clarify commit message V4: - Fix comment style - Emit SHADER_OPCODE_TXF_MS on Gen6. This was benignly wrong since it lowers to `ld` anyway on this gen, but still wrong. Signed-off

[Mesa-dev] [PATCH V4 19/19] i965: enable ARB_texture_multisample on Gen6+

2013-02-26 Thread Chris Forbes
V2: Works on Ivy Bridge now too, so this can be 6+. Signed-off-by: Chris Forbes Reviewed-by: Paul Berry Reviewed-by: Eric Anholt --- src/mesa/drivers/dri/intel/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/intel/intel_extensions.c b/src/mesa

Re: [Mesa-dev] [PATCH V4 00/19] ARB_texture_multisample support

2013-03-01 Thread Chris Forbes
The minmax regression is addressed by my followup series, which adds the internalformat_query interactions. Do I need to fold that into this one? On Sat, Mar 2, 2013 at 7:59 AM, Paul Berry wrote: > On 26 February 2013 02:10, Chris Forbes wrote: >> >> This series adds the cor

Re: [Mesa-dev] [PATCH V4 00/19] ARB_texture_multisample support

2013-03-01 Thread Chris Forbes
I've had a quick look at the push-pop-texture-state regression, and that looks like a real bug I've introduced. I'm looking into it. On Sat, Mar 2, 2013 at 8:44 AM, Chris Forbes wrote: > The minmax regression is addressed by my followup series, which adds > the internalform

Re: [Mesa-dev] [PATCH V4 00/19] ARB_texture_multisample support

2013-03-01 Thread Chris Forbes
I missed a case in attrib.c; this small patch should be folded in with the rest of the changes which add support for the new targets: commit 8b16367bab07cfe2eb44cc96a22bb925593b1e20 Author: Chris Forbes Date: Sat Mar 2 09:10:25 2013 +1300 fixup glPopAttrib(GL_TEXTURE_BIT) diff --git a

[Mesa-dev] [PATCH 0/7] Add support for ARB_texture_storage_multisample

2013-03-15 Thread Chris Forbes
This series adds support for ARB_texture_storage_multisample, which adds two interesting bits of behavior for multisample textures: - Immutable-format support, consistent with ARB_texture_storage - [Get]TexParameter* support This is admittedly not very useful by itself, but becomes more interesti

[Mesa-dev] [PATCH 1/7] mesa: add support for immutable textures to teximagemultisample()

2013-03-15 Thread Chris Forbes
this behavior to TexImage*Multisample, but it seems like the reasonable thing to do. Signed-off-by: Chris Forbes --- src/mesa/main/teximage.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index bc755ae

[Mesa-dev] [PATCH 2/7] glapi: add definition of ARB_texture_storage_multisample

2013-03-15 Thread Chris Forbes
Adds XML for the extension, dispatch_sanity enabling, and the two new entrypoints. These are both implemented by calling the shared teximagemultisample() with immutable=GL_TRUE. Signed-off-by: Chris Forbes --- .../glapi/gen/ARB_texture_storage_multisample.xml | 31 ++ src

[Mesa-dev] [PATCH 3/7] mesa: add enable bit for ARB_texture_storage_multisample

2013-03-15 Thread Chris Forbes
--- src/mesa/main/extensions.c | 1 + src/mesa/main/mtypes.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c index e90a296..004fc8e 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa/main/extensions.c @@ -148,6 +148,7 @@ static

[Mesa-dev] [PATCH 4/7] mesa: improve reported function name in Tex*Multisample

2013-03-15 Thread Chris Forbes
Now that there are 4 variants, just pass the function name into teximagemultisample rather than reconstructing it. Signed-off-by: Chris Forbes --- src/mesa/main/teximage.c | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/mesa/main

[Mesa-dev] [PATCH 5/7] mesa: allow multisample texture targets in [Get]TexParameter*

2013-03-15 Thread Chris Forbes
- any state which appears in the `per-sampler` state table may not be set; generates INVALID_OPERATION Signed-off-by: Chris Forbes --- src/mesa/main/texparam.c | 92 +++- 1 file changed, 91 insertions(+), 1 deletion(-) diff --git a/src/mesa/main

[Mesa-dev] [PATCH 6/7] i965: enable ARB_texture_storage_multisample on Gen6+

2013-03-15 Thread Chris Forbes
This can be enabled everywhere that ARB_texture_multisample is supported -- ARB_texture_storage is supported on everything. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/intel/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/intel

[Mesa-dev] [PATCH 7/7] docs: mark ARB_texture_storage_multisample done

2013-03-15 Thread Chris Forbes
Signed-off-by: Chris Forbes --- docs/GL3.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index de51693..3c97c8d 100644 --- a/docs/GL3.txt +++ b/docs/GL3.txt @@ -151,7 +151,7 @@ ARB_shader_storage_buffer_object not started

Re: [Mesa-dev] Basic GLSL 1.50 support: new types & built-in functions

2013-03-19 Thread Chris Forbes
For the series: Reviewed-by: Chris Forbes On Tue, Mar 19, 2013 at 2:57 PM, Kenneth Graunke wrote: > This series improves our basic GLSL 1.50 support. First, it makes 1.50 > shaders using built-in functions work. Secondly, it adds the new types > and built-ins from the ARB_texture_mu

[Mesa-dev] [PATCH V2 0/3] Sample count limit tidy-up

2013-03-23 Thread Chris Forbes
This series tidies up the missing interactions between unextended GL3, ARB_texture_multisample and ARB_internalformat_query. No serious functional changes from V1, just a lot of shuffling things around. -- Chris ___ mesa-dev mailing list mesa-dev@lists

[Mesa-dev] [PATCH V2 1/3] mesa: allow internalformat_query with multisample texture targets

2013-03-23 Thread Chris Forbes
, but the driver may still be able to implement a reasonable resolve operation, so it can be supported for renderbuffers. V2: - Don't break Gallium compile. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_context.c | 6 -- src/mesa/main/dd.h | 4 +++-

[Mesa-dev] [PATCH V2 2/3] mesa: helper for checking renderbuffer sample count

2013-03-23 Thread Chris Forbes
d-off-by: Chris Forbes --- src/mesa/main/fbobject.c| 13 --- src/mesa/main/multisample.c | 54 + src/mesa/main/multisample.h | 5 + 3 files changed, 69 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa

[Mesa-dev] [PATCH V2 3/3] mesa: use _mesa_check_sample_count() for multisample textures

2013-03-23 Thread Chris Forbes
block. - Do this in multisample.c instead. - Fix typo in error message. - Inline spec quotes Signed-off-by: Chris Forbes Reviewed-by: Brian Paul --- src/mesa/main/multisample.c | 29 ++--- src/mesa/main/teximage.c| 34 +++--- 2

[Mesa-dev] [PATCH] mesa: only check sample count if we actually wanted multisampling

2013-03-25 Thread Chris Forbes
n the nonmultisampling case at all. Signed-off-by: Chris Forbes --- src/mesa/main/fbobject.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 3fdf626..c1f5299 100644 --- a/src/mesa/main/fbobject.c +++ b/src

[Mesa-dev] [PATCH] intel: provide a default QuerySamplesForFormat func

2013-03-28 Thread Chris Forbes
We claim to support ARB_internalformat_query on everything, but only i965+ bothered to provide the hook -- so QueryInternalformativ() would just explode (fail the assert in debug; segfault otherwise) on earlier platforms. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/intel

[Mesa-dev] [PATCH V2] mesa: provide default implementation of QuerySamplesForFormat

2013-03-28 Thread Chris Forbes
: - Move from intel to core mesa. Signed-off-by: Chris Forbes --- src/mesa/drivers/common/driverfuncs.c | 3 ++- src/mesa/main/formatquery.c | 15 +++ src/mesa/main/formatquery.h | 4 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers

[Mesa-dev] [PATCH V2 0/8] ARB_texture_storage_multisample support

2013-03-29 Thread Chris Forbes
This series adds support for the ARB_texture_storage_multisample extension. Only minor changes from V1: * Added missing error cases in TexStorage*Multisample. Thanks Eric for pointing out that this was a bit lacking. * Dropped spurious special case for TEXTURE_MAX_LEVELS. This wasn't in the

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