[Mesa-dev] [RFC PATCH 24/26] i965/vs: emit sample index for txf

2012-12-29 Thread Chris Forbes
When fetching texels from a multisample surface, the sample index is provided as an extra argument after the lod, and the actual lod needs to be hardwired to 0. The frontend gives us the sample index in the lod parameter, so fix this up. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa

[Mesa-dev] [RFC PATCH 25/26] i965/fs: emit sample index for txf

2012-12-29 Thread Chris Forbes
When fetching texels from a multisample surface, the sample index is provided as an extra argument after the lod, and the actual lod needs to be hardwired to 0. The frontend gives us the sample index in the lod parameter, so fix this up. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa

[Mesa-dev] [RFC PATCH 26/26] i965: enable ARB_texture_multisample on Gen6

2012-12-29 Thread Chris Forbes
There are a few things that need to be done to support Gen7+ as well, but I don't have a machine available to test them. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/intel/intel_extensions.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri

Re: [Mesa-dev] [RFC PATCH 15/26] i965: expose sample locations

2013-01-07 Thread Chris Forbes
Forbes chr...@ijw.co.nz wrote: Moves the definition of the sample locations out of gen6_emit_3dstate_multisample, and unpacks them in gen6_get_sample_postiion. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_context.c| 3 + src/mesa/drivers/dri

Re: [Mesa-dev] [PATCH 0/3] intel: Untangle physical vs logical surface dimensions.

2013-01-08 Thread Chris Forbes
For the series: Reviewed-by: Chris Forbes chr...@ijw.co.nz On Wed, Jan 9, 2013 at 11:26 AM, Paul Berry stereotype...@gmail.com wrote: In the process of reviewing Chris Forbes' patches to implement ARB_texture_multisample, we discovered considerable confusion in the code that refers to surface

Re: [Mesa-dev] [PATCH 3/3] intel: Clean up confusion between logical and physical surface dimensions.

2013-01-10 Thread Chris Forbes
Hi Paul, They do work -- they just take the same path as TEXTURE_2D_ARRAY by this point. It's possible that we're missing some assert(depth0 % 6 == 0) for sanity there. Have a look at this piglit: tests/spec/arb_texture_cube_map_array/cubemap.c; it uses a 2-layer cubemap array, and depth0 is 12

[Mesa-dev] [PATCH 0/1] i965: Add support for GL_AMD_seamless_cubemap_per_texture

2012-04-29 Thread Chris Forbes
Here is a simple patch which adds support for the GL_AMD_seamless_cubemap_per_texture extension to the i965 driver. This may actually work on pre-Gen6 devices as well, but I haven't been able to test on one. Passes the piglit test for this extension. Originally sent to dri-patches@, but

[Mesa-dev] [PATCH] i965: enable AMD_seamless_cubemap_per_texture for Gen6+

2012-04-29 Thread Chris Forbes
--- src/mesa/drivers/dri/i965/brw_wm_sampler_state.c |2 +- src/mesa/drivers/dri/i965/gen7_sampler_state.c |2 +- src/mesa/drivers/dri/intel/intel_extensions.c|3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c

Re: [Mesa-dev] [PATCH 0/1] i965: Add support for GL_AMD_seamless_cubemap_per_texture

2012-04-30 Thread Chris Forbes
Does anyone know of any actual use for GL_AMD_seamless_cubemap_per_texture? I can't think of any -- it reads I've had a couple of cases where I was using cubes for non-environment-map things, and the lack of filtering across faces was useful. I agree that you pretty much always just want

Re: [Mesa-dev] [PATCH 06/10] i965: Parameterize HiZ code to prepare for adding blitting.

2012-05-02 Thread Chris Forbes
+void +brw_blorp_params::exec(struct intel_context *intel) const +{ + switch (intel-gen) { + case 6: + gen6_blorp_exec(intel, this); + break; + case 7: + gen7_blorp_exec(intel, this); + break; + default: + /* BLORP is not supported before Gen7. */ +

[Mesa-dev] [PATCH] glGetStringi: fix dropped

2012-09-16 Thread Chris Forbes
This fixes glGetStringi(GL_EXTENSIONS,.. for core contexts. Previously, all extension names returned would be NULL. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/main/extensions.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/extensions.c b/src

[Mesa-dev] [PATCH 1/6] i965: add missing BRW_SURFACEFORMAT constants from Ivybridge PRM

2012-10-09 Thread Chris Forbes
From the master surface formats list in the Sampler Engine chapter. The relevant formats for 2_10_10_10 are mentioned in the Sandybridge PRM as vertex attribute types, but the 0x1b*- encodings are missing from its list in the Sampler Engine chapter. --- src/mesa/drivers/dri/i965/brw_defines.h |

[Mesa-dev] [PATCH 2/6] i965: add format parameter to debug in get_surface_type

2012-10-09 Thread Chris Forbes
--- src/mesa/drivers/dri/i965/brw_draw_upload.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index f5f65ca..0a563ed 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++

[Mesa-dev] [PATCH 3/6] i965: add debug in brw_draw_upload

2012-10-09 Thread Chris Forbes
--- src/mesa/drivers/dri/i965/brw_draw_upload.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 0a563ed..aba1559 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++

[Mesa-dev] [PATCH 4/6] i965: implement get_size for 2_10_10_10 formats

2012-10-09 Thread Chris Forbes
--- src/mesa/drivers/dri/i965/brw_draw_upload.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index aba1559..6b073ad 100644 --- a/src/mesa/drivers/dri/i965/brw_draw_upload.c +++

[Mesa-dev] [PATCH 5/6] i965: support 2_10_10_10 formats in get_surface_type.

2012-10-09 Thread Chris Forbes
--- src/mesa/drivers/dri/i965/brw_draw_upload.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index 6b073ad..f2d177a 100644 ---

[Mesa-dev] [PATCH 6/6] i965: enable ARB_vertex_type_2_10_10_10_rev

2012-10-09 Thread Chris Forbes
TODO: determine exactly which gens can do this. At least 6+; perhaps as early as 4+? --- 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/drivers/dri/intel/intel_extensions.c index

[Mesa-dev] [PATCH 1/6] i965: implement get_size for 2_10_10_10 formats

2012-10-22 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_draw_upload.c | 4 1 file changed, 4 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c index f5f65ca..8ffcc57 100644 --- a/src/mesa/drivers/dri

[Mesa-dev] [PATCH 2/6] i965: support 2_10_10_10 formats in get_surface_type.

2012-10-22 Thread Chris Forbes
Always use R10G10B10A2_UINT; Most of the other formats we'd like don't actually work on the hardware. Will emit w/a for scaling, sign recovery and BGRA swizzle in the VS. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_draw_upload.c | 18 +- 1 file

[Mesa-dev] [PATCH 3/6] i965: Generalize GL_FIXED VS w/a support

2012-10-22 Thread Chris Forbes
Next few patches build on this to add other workarounds for packed formats. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 14 +++--- src/mesa/drivers/dri/i965/brw_vs.c | 9 + src/mesa/drivers/dri/i965/brw_vs.h

[Mesa-dev] [PATCH 4/6] i965: set attribute w/a bits for packed formats

2012-10-22 Thread Chris Forbes
Flag the need for various workarounds to be applied by the vertex shader. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_vs.c | 30 ++ 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b

[Mesa-dev] [PATCH 5/6] i965: emit w/a for packed attribute formats in VS

2012-10-22 Thread Chris Forbes
for final version. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_vs_emit.c | 49 +++-- 1 file changed, 47 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c

[Mesa-dev] [PATCH 6/6] i965: enable ARB_vertex_type_2_10_10_10_rev

2012-10-22 Thread Chris Forbes
Enabled on Gen4+. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- docs/GL3.txt | 2 +- src/mesa/drivers/dri/intel/intel_extensions.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/GL3.txt b/docs/GL3.txt index 876165f..6e66e55 100644

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 chr...@ijw.co.nz On Tue, Sep 10, 2013 at 6:38 AM, Kenneth Graunke kenn...@whitecape.org wrote: Otherwise, coordinates with four components would result in a MOV with a destination writemask that has no channels enabled: mov(8) g1151.F 0D { align16 WE_normal NoDDChk 1Q

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 chr...@ijw.co.nz On Tue, Sep 10, 2013 at 11:00 AM, Kenneth Graunke kenn...@whitecape.org wrote: We can easily compute these without loops, resulting in simpler and shorter code. Signed-off-by: Kenneth Graunke kenn

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

2013-09-12 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 olva...@gmail.com wrote: From: Chia-I Wu o...@lunarg.com Replicate the gradient of the top-left pixel to the other three pixels in the subspan, as

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 olva...@gmail.com wrote: On Thu, Sep 12, 2013 at 2:06 PM, Chris Forbes chr...@ijw.co.nz

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 olva...@gmail.com wrote: On Thu, Sep 12, 2013 at 10:48 PM, Ian Romanick i...@freedesktop.org wrote: On 09/12/2013 01:06 AM, Chris Forbes wrote: Can we make this approximation conditional on an image-quality control in driconf

[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

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

2013-09-15 Thread Chris Forbes
From: Maxence Le Dore maxence.led...@gmail.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- 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

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

2013-09-15 Thread Chris Forbes
From: Maxence Le Dore maxence.led...@gmail.com V2 [Chris Forbes]: - Add new pattern, fixup parameter reading. V3: Rebase onto new builtins machinery Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/builtin_functions.cpp | 35 +++ 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 chr...@ijw.co.nz Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_defines.h

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

2013-09-15 Thread Chris Forbes
), 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 chr...@ijw.co.nz

[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 chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_vec4.h | 1 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

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

2013-09-15 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- 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

[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 chr...@ijw.co.nz --- src/mesa/drivers/dri/i965

[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 chr...@ijw.co.nz --- 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

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

2013-09-15 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- 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

[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 chr...@ijw.co.nz 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/drivers/dri/i965

[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 chr...@ijw.co.nz --- docs/envvars.html | 1 + src/glx/glxext.c | 10 -- 2 files changed, 9 insertions(+), 2 deletions

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

2013-09-26 Thread Chris Forbes
Fixed and landed on master now. On Mon, Sep 23, 2013 at 8:05 AM, Eric Anholt e...@anholt.net wrote: Chris Forbes chr...@ijw.co.nz writes: Hardware requires the magnitude of the largest component to not exceed 1; brw_cubemap_normalize ensures that this is the case. Unfortunately, we would

[Mesa-dev] [PATCH] i965/blorp: Use passed in framebuffer rather than ctx-DrawBuffer

2013-09-30 Thread Chris Forbes
We have the destination framebuffer object passed in; there's no need to go digging around in the context. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_blorp_clear.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers

[Mesa-dev] [PATCH] i965: fix bogus swizzle in brw_cubemap_normalize

2013-09-30 Thread Chris Forbes
cube arrays in the VS. Signed-off-by: Chris Forbes chr...@ijw.co.nz Cc: 9.2 mesa-sta...@lists.freedesktop.org --- src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp b

[Mesa-dev] [PATCH V4 00/13] ARB_texture_gather

2013-09-30 Thread Chris Forbes
This series adds support for ARB_texture_gather in core mesa and in i965 for Gen7+. Notable changes from V3: - Only emit extra surface state, recompiles, etc if the shader actually uses gather4. - Use SCS to accomplish the workaround on Haswell [will need testing] Cc: Kenneth Graunke

[Mesa-dev] [PATCH V4 01/13] mesa: add texture gather changes

2013-09-30 Thread Chris Forbes
From: Maxence Le Dore maxence.led...@gmail.com Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- 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

[Mesa-dev] [PATCH V4 02/13] glsl: add texture gather changes

2013-09-30 Thread Chris Forbes
From: Maxence Le Dore maxence.led...@gmail.com V2 [Chris Forbes]: - Add new pattern, fixup parameter reading. V3: Rebase onto new builtins machinery Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/glsl/builtin_functions.cpp | 35 +++ src/glsl

[Mesa-dev] [PATCH V4 03/13] i965: add SHADER_OPCODE_TG4

2013-09-30 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 chr...@ijw.co.nz Reviewed-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_defines.h

[Mesa-dev] [PATCH V4 04/13] i965/fs: Add support for ir_tg4

2013-09-30 Thread Chris Forbes
), 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 chr...@ijw.co.nz

[Mesa-dev] [PATCH V4 05/13] i965/vs: Add support for ir_tg4

2013-09-30 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 chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_vec4.h | 1 + src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp

[Mesa-dev] [PATCH V4 06/13] glsl: flag shaders which use gather4 at all

2013-09-30 Thread Chris Forbes
--- src/glsl/ir_set_program_inouts.cpp | 9 + src/mesa/main/mtypes.h | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/glsl/ir_set_program_inouts.cpp b/src/glsl/ir_set_program_inouts.cpp index 1267d6d..ab23538 100644 --- a/src/glsl/ir_set_program_inouts.cpp +++

[Mesa-dev] [PATCH V4 07/13] i965: w/a for gather4 green RG32F

2013-09-30 Thread Chris Forbes
V4: Only flag quirks if there are any uses of gather in the shader, to avoid spurious recompiles just because someone happened to use RG32F. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 src/mesa/drivers/dri/i965/brw_program.h

[Mesa-dev] [PATCH V4 08/13] i965: Add BRW_SURFACEFORMAT_R32G32_FLOAT_LD, required for IVB gather4 w/a

2013-09-30 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 chr...@ijw.co.nz --- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH V4 09/13] i965: make room in the binding table for a full alternate set of surface_states

2013-09-30 Thread Chris Forbes
Worst-case is that *every* texunit uses a format that needs overriding. V4: Place the gather slots last, so shaders which don't use gather don't get penalized by having a huge binding table. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_context.h | 20

[Mesa-dev] [PATCH V4 10/13] i965: Emit a second set of SURFACE_STATE for gather4 from textures.

2013-09-30 Thread Chris Forbes
what w/a to apply. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_context.h | 3 +- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 38 +++ src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 6 +++- 3 files changed, 39

[Mesa-dev] [PATCH V4 12/13] i965: Enable ARB_texture_gather on Gen7

2013-09-30 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- 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

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

2013-09-30 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 8 ++-- src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 8 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa

[Mesa-dev] [PATCH V4 13/13] i965/hsw: Apply gather4 RG32F w/a using SCS instead of shader.

2013-09-30 Thread Chris Forbes
The new surface channel select bits allow us to avoid having to recompile the shader for this workaround. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_wm.c| 5 +++-- src/mesa/drivers/dri/i965/gen7_wm_surface_state.c | 14 -- 2 files

Re: [Mesa-dev] [PATCH] i965: compute DDX in a subspan based only on top row

2013-10-01 Thread Chris Forbes
With those fixes: Reviewed-by: Chris Forbes chr...@ijw.co.nz On Wed, Oct 2, 2013 at 6:38 AM, Ian Romanick i...@freedesktop.org wrote: On 09/30/2013 10:54 PM, Chia-I Wu wrote: From: Chia-I Wu o...@lunarg.com I agree with both of Ken's comments. With those fixed, this patch is Reviewed

Re: [Mesa-dev] [PATCH] i965/fs: Improve accuracy of dFdy() to match dFdx().

2013-10-01 Thread Chris Forbes
Acked-by: Chris Forbes chr...@ijw.co.nz On Wed, Oct 2, 2013 at 8:38 AM, Paul Berry stereotype...@gmail.com wrote: Previously, we computed dFdy() using the following instruction: add(8) dst1F src4,4,0)F -src.24,4,0F { align1 1Q } That had the disadvantage that it computed the same value

Re: [Mesa-dev] [PATCH V4 01/13] mesa: add texture gather changes

2013-10-02 Thread Chris Forbes
Hi Paul, Sorry, I should have run make check first. I'll fix this when I get home. -- Chris On Thu, Oct 3, 2013 at 1:06 PM, Paul Berry stereotype...@gmail.com wrote: On 30 September 2013 03:08, Chris Forbes chr...@ijw.co.nz wrote: From: Maxence Le Dore maxence.led...@gmail.com Reviewed

[Mesa-dev] [PATCH] mesa: fix make check for ARB_texture_gather

2013-10-02 Thread Chris Forbes
Clean up inconsistency in enum decoration: - Use the undecorated enums where possible. - MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB remains decorated, since it has no undecorated equivalent in GL4. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mapi/glapi/gen/ARB_texture_gather.xml | 6

[Mesa-dev] [PATCH 0/6] ARB_texture_query_levels for i965

2013-10-04 Thread Chris Forbes
This series adds support for ARB_texture_query_levels on i965 Gen6+. The fourth channel of the resinfo message (used for textureSize()) includes the correct value for textureQueryLevels(). ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

[Mesa-dev] [PATCH 1/6] mesa: add plumbing for GL_ARB_texture_query_levels

2013-10-04 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- 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 c0f17c5..2507fdf 100644 --- a/src/mesa/main/extensions.c +++ b/src/mesa

[Mesa-dev] [PATCH 2/6] glsl: add plumbing for GL_ARB_texture_query_levels

2013-10-04 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/builtin_functions.cpp | 56 + src/glsl/glcpp/glcpp-parse.y| 3 ++ src/glsl/glsl_parser_extras.cpp | 1 + src/glsl/glsl_parser_extras.h | 2 ++ src/glsl/ir.cpp

[Mesa-dev] [PATCH 4/6] i965/fs: implement ir_query_levels

2013-10-04 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index a8ad659

[Mesa-dev] [PATCH 5/6] i965/vs: implement ir_query_levels

2013-10-04 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 9e6cc78

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

2013-10-04 Thread Chris Forbes
Theoretically would work on Gen5 as well but requires GLSL 1.30, which is not (yet) enabled by default there. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/intel_extensions.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 0/2] ARB_conservative_depth support for i965 Gen7+

2013-10-05 Thread Chris Forbes
I haven't tested this thoroughly, but this is how it looks like it ought to work from the PRM. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 1/2] i965/wm: Program correct conservative depth modes

2013-10-05 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/gen7_wm_state.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/gen7_wm_state.c b/src/mesa/drivers/dri/i965/gen7_wm_state.c index 80073cd..7ddeb6e 100644

[Mesa-dev] [PATCH 2/2] i965: Enable ARB_conservative_depth for Gen7+.

2013-10-05 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- 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 52076f7..6f024b4 100644 --- a/src/mesa/drivers/dri

Re: [Mesa-dev] [PATCH 5/6] i965/vs: implement ir_query_levels

2013-10-05 Thread Chris Forbes
Eek -- so I am. Thanks for spotting this. On Sat, Oct 5, 2013 at 8:07 PM, Christoph Brill egore...@egore911.de wrote: 2013/10/5 Chris Forbes chr...@ijw.co.nz Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 15 ++- 1 file changed

[Mesa-dev] [PATCH 0/5] ARB_gpu_shader5 textureGather enhancements for i965

2013-10-05 Thread Chris Forbes
This series adds some of the new textureGather variants from ARB_gpu_shader5, and implementation for i965 Gen7+. - Use with gsampler2DRect - Component select in the shader ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org

[Mesa-dev] [PATCH 1/5] glsl: Add support for specifying the component in textureGather

2013-10-05 Thread Chris Forbes
ARB_gpu_shader5 introduces new variants of textureGather* which have an explicit component selector, rather than relying purely on the sampler's swizzle state. This patch adds the GLSL plumbing for the extra parameter. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl

[Mesa-dev] [PATCH 2/5] glsl: add ARB_gpu_shader5's additional textureGather signatures

2013-10-05 Thread Chris Forbes
- gsampler2DRect support - optional `comp` parameter Future patches will add shadow sampler support and textureGatherOffsets(). Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/builtin_functions.cpp | 27 ++- 1 file changed, 26 insertions(+), 1 deletion(-) diff

[Mesa-dev] [PATCH 3/5] i965/fs: Add support for textureGather(.., comp)

2013-10-05 Thread Chris Forbes
-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 6141009..5508cdc 100644 --- a/src

[Mesa-dev] [PATCH 4/5] i965/vs: Add support for textureGather(.., comp)

2013-10-05 Thread Chris Forbes
-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 224524e..4307125 100644

[Mesa-dev] [PATCH 5/5] i965/ivb: Flag RG32F quirk for texture gather regardless of swizzles

2013-10-05 Thread Chris Forbes
As of ARB_gpu_shader5, textureGather doesn't always read the post-swizzle RED channel -- so we can't just look at the red swizzle state. Theoretically we could only flag the quirk if *some* green swizzle is in use, but that's probably more trouble than it's worth. Signed-off-by: Chris Forbes chr

Re: [Mesa-dev] [PATCH 1/5] glsl: Add support for specifying the component in textureGather

2013-10-05 Thread Chris Forbes
Yes, that's clearer; what I had was a strange artifact of how it grew :) -- Chris On Sun, Oct 6, 2013 at 6:54 AM, Kenneth Graunke kenn...@whitecape.org wrote: On 10/05/2013 03:38 AM, Chris Forbes wrote: ARB_gpu_shader5 introduces new variants of textureGather* which have an explicit component

Re: [Mesa-dev] [PATCH 3/5] i965/fs: Add support for textureGather(.., comp)

2013-10-05 Thread Chris Forbes
...@whitecape.org wrote: On 10/05/2013 03:38 AM, Chris Forbes wrote: - For HSW: Select the channel based on the component selected (swizzle is done in HW) - For IVB: Select the channel based on the swizzle state for the component selected. Only apply the RG32F w/a if we actually want green -- we're

[Mesa-dev] [PATCH 1/7] glsl: Add ARB_gpu_shader5 textureGatherOffset signatures

2013-10-08 Thread Chris Forbes
- gsampler2DRect - optional `comp` parameter Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/builtin_functions.cpp | 16 1 file changed, 16 insertions(+) diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index d40888d..aa40876 100644

[Mesa-dev] [PATCH 6/7] i965/fs: add support for gather4 with nonconstant offsets

2013-10-08 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 45 ++-- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index

[Mesa-dev] [PATCH 0/7] ARB_gpu_shader5 textureGather*, Part 2

2013-10-08 Thread Chris Forbes
This series adds support for the following textureGather* enhancements that are part of ARB_gpu_shader5: - new textureGatherOffset variants - nonconstant offset for all textureGatherOffset variants, when GLSL 4.00 or ARB_gpu_shader5 is in use. If only ARB_texture_gather is enabled, const

[Mesa-dev] [PATCH 7/7] i965/vs: add support for gather4 with nonconstant offsets

2013-10-08 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp | 16 +++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp index 0cf8277

[Mesa-dev] [PATCH 2/7] glsl: relax const offset requirement for textureGatherOffset

2013-10-08 Thread Chris Forbes
Prior to ARB_gpu_shader5 / GLSL 4.0, the offset is required to be a constant expression. With that extension, it is relaxed to be any dynamically uniform expression. If the value is not dynamically uniform, the results are undefined. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl

[Mesa-dev] [PATCH 3/7] i965: add missing tg4 case in brw_instruction_name

2013-10-08 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_shader.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 61c4bf5..19500d1 100644 --- a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 4/7] i965: Add SHADER_OPCODE_TG4_OFFSET for gather with nonconstant offsets.

2013-10-08 Thread Chris Forbes
The generator code ends up clearer this way than if we had to sniff via mlen. Implemented via the gather4_po message in hardware, which is present in Gen7 and later. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_defines.h | 1 + src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 5/7] i965: relax brw_texture_offset assert

2013-10-08 Thread Chris Forbes
Some texturing ops are about to have nonconstant offset support; the offset in the header in these cases should be zero. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_shader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers

Re: [Mesa-dev] [PATCH 2/7] glsl: relax const offset requirement for textureGatherOffset

2013-10-08 Thread Chris Forbes
The commit message is wrong -- there is no requirement for the offset to be dynamically uniform, either in the spec or in the i965 implementation in later patches. On Tue, Oct 8, 2013 at 10:34 PM, Chris Forbes chr...@ijw.co.nz wrote: Prior to ARB_gpu_shader5 / GLSL 4.0, the offset is required

Re: [Mesa-dev] [PATCH 1/9] i965: Fix a compiler warning about conservative depth enums.

2013-10-08 Thread Chris Forbes
Sorry, that was a bit sloppy on my part.. Reviewed-by: Chris Forbes chr...@ijw.co.nz On Wed, Oct 9, 2013 at 10:00 AM, Eric Anholt e...@anholt.net wrote: --- src/mesa/drivers/dri/i965/gen7_wm_state.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 0/5] ARB_gpu_shader5 textureGather*, Part 3

2013-10-10 Thread Chris Forbes
... in which support for shadow samplers is added. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] [PATCH 1/5] glsl: Add support for separate reference Z for shadow samplers

2013-10-10 Thread Chris Forbes
ARB_gpu_shader5's textureGather*() functions which take shadow samplers have a separate `refz` parameter rather than adding it to the coordinate. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/builtin_functions.cpp | 20 +++- 1 file changed, 15 insertions(+), 5

[Mesa-dev] [PATCH 2/5] glsl: Add new textureGathe[Offset]() overloads for shadow samplers

2013-10-10 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/glsl/builtin_functions.cpp | 10 ++ 1 file changed, 10 insertions(+) diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index ef8b7bb..deedddb 100644 --- a/src/glsl/builtin_functions.cpp +++ b/src/glsl

[Mesa-dev] [PATCH 3/5] i965: Add Gen7 gather4_c and gather4_po_c message types

2013-10-10 Thread Chris Forbes
Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_defines.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/drivers/dri/i965/brw_defines.h b/src/mesa/drivers/dri/i965/brw_defines.h index f1ea736..c0caba6 100644 --- a/src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 4/5] i965/vs: Add support for shadow comparitors with gather4

2013-10-10 Thread Chris Forbes
gather4_c's argument layout is straightforward -- refz just goes on the end. gather4_po_c's layout however -- the array index is replaced with refz. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 12 ++-- src/mesa/drivers/dri/i965

[Mesa-dev] [PATCH 5/5] i965/fs: Add support for shadow comparitors with gather4

2013-10-10 Thread Chris Forbes
Note that gather4_po_c's parameters are too long for SIMD16. It might be worth emitting 2xSIMD8 messages in this case at some point. Signed-off-by: Chris Forbes chr...@ijw.co.nz --- src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 15 --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp

Re: [Mesa-dev] [PATCH 5/5] i965/fs: Add support for shadow comparitors with gather4

2013-10-10 Thread Chris Forbes
The 1D array case doesn't actually exist -- there is no 1D texture support for gather. For 2D arrays, the array index lands in the `r` slot of the message. On Fri, Oct 11, 2013 at 9:25 AM, Eric Anholt e...@anholt.net wrote: Chris Forbes chr...@ijw.co.nz writes: Note that gather4_po_c's

Re: [Mesa-dev] [PATCH 4/5] i965/vs: Add support for shadow comparitors with gather4

2013-10-10 Thread Chris Forbes
You're right, that looks completely bogus. I only have compiler tests and eyeballs for the shadow variants at this point -- I'll sort that out :) -- Chris On Fri, Oct 11, 2013 at 9:33 AM, Eric Anholt e...@anholt.net wrote: Chris Forbes chr...@ijw.co.nz writes: gather4_c's argument layout

Re: [Mesa-dev] [PATCH 5/5] i965/fs: Add support for shadow comparitors with gather4

2013-10-10 Thread Chris Forbes
Yes; fortunately we don't have to support offset and shadow together on them. On Fri, Oct 11, 2013 at 10:13 AM, Eric Anholt e...@anholt.net wrote: Chris Forbes chr...@ijw.co.nz writes: The 1D array case doesn't actually exist -- there is no 1D texture support for gather. For 2D arrays

Re: [Mesa-dev] [PATCH 0/3] Enable GL 3.2 support for i965, bump Mesa version.

2013-10-11 Thread Chris Forbes
Great to see this enabled! For the series: Reviewed-by: Chris Forbes chr...@ijw.co.nz On Fri, Oct 11, 2013 at 7:12 PM, Kenneth Graunke kenn...@whitecape.org wrote: On 10/10/2013 09:33 PM, Dave Airlie wrote: On Fri, Oct 11, 2013 at 2:27 PM, Paul Berry stereotype...@gmail.com wrote: It's been

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