Re: [Mesa-dev] [PATCH] i965: Replace structs with bit-shifting for Gen7 SURFACE_STATE entries.

2012-12-29 Thread Kenneth Graunke
On 12/29/2012 02:38 PM, Ben Widawsky wrote: Anyway, we all agree it's a mess, and I just wanted to point out that this patch is the nail in the coffin. Maybe you should CC the maintainers for the other projects which depend on this? The nail in the coffin of what, exactly? intel-gpu-tools has

[Mesa-dev] [Bug 58872] New: Mac OS X configure: error: Couldn't find clock_gettime

2012-12-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=58872 Priority: medium Bug ID: 58872 Keywords: regression CC: airl...@freedesktop.org Assignee: mesa-dev@lists.freedesktop.org Summary: Mac OS X configure: error: Couldn't find clock_g

Re: [Mesa-dev] [PATCH] i965: Replace structs with bit-shifting for Gen7 SURFACE_STATE entries.

2012-12-29 Thread Ben Widawsky
On Sat, 29 Dec 2012 13:21:02 -0800 Kenneth Graunke wrote: > On 12/29/2012 11:58 AM, Ben Widawsky wrote: > > On Fri, 28 Dec 2012 21:21:51 -0800 > > Kenneth Graunke wrote: > > > >> Every generation except Gen7 creates SURFACE_STATE entries via a > >> uint32_t array. Only Gen7 uses the older bitfi

Re: [Mesa-dev] [PATCH] i965: Replace structs with bit-shifting for Gen7 SURFACE_STATE entries.

2012-12-29 Thread Kenneth Graunke
On 12/29/2012 11:58 AM, Ben Widawsky wrote: On Fri, 28 Dec 2012 21:21:51 -0800 Kenneth Graunke wrote: Every generation except Gen7 creates SURFACE_STATE entries via a uint32_t array. Only Gen7 uses the older bitfield structure, which we moved away from because it was less efficient. Convert

Re: [Mesa-dev] [PATCH] i965: Replace structs with bit-shifting for Gen7 SURFACE_STATE entries.

2012-12-29 Thread Ben Widawsky
On Fri, 28 Dec 2012 21:21:51 -0800 Kenneth Graunke wrote: > Every generation except Gen7 creates SURFACE_STATE entries via a > uint32_t array. Only Gen7 uses the older bitfield structure, which we > moved away from because it was less efficient. Convert it for > consistency. > > This reduces t

[Mesa-dev] [PATCH] i965: Fix glCompressedTexSubImage2D offsets for ETC textures.

2012-12-29 Thread Paul Berry
This patch fixes intel_miptree_unmap_etc() (which decompresses ETC textures to linear) to pay attention to map->x and map->y when writing to the destination image. Previously these values were ignored, causing the xoffset and yoffset parameters passed to glCompressedTexSubImage2D() to be ignored.

Re: [Mesa-dev] [RFC PATCH 01/26] glapi: add ARB_texture_multisample

2012-12-29 Thread Matt Turner
On Sat, Dec 29, 2012 at 4:35 AM, Chris Forbes wrote: > Signed-off-by: Chris Forbes > --- > src/mapi/glapi/gen/ARB_texture_multisample.xml | 69 > ++ > src/mapi/glapi/gen/gl_API.xml | 3 ++ > 2 files changed, 72 insertions(+) > create mode 100644 src/ma

[Mesa-dev] r600g: RFC: ISA information tables and shader disassembler

2012-12-29 Thread Vadim Girlin
The patches are pretty big so you can find the branch here: http://cgit.freedesktop.org/~vadimg/mesa/log/?h=r600-disasm My primary goal was to have a shader disassembler in the driver to simplify the debugging. The disassembler itself is small, but it relies on the big patch that introduces th

[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 --- src/mesa/drivers/dri/intel/intel_extensions.c | 5 + 1 file changed, 5 insertions(+) diff --git a/src/mesa/drivers/dri/intel/intel_extensi

[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 --- src/mesa/drivers/dri/i965

[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 --- src/mesa/drivers/dri/i965

[Mesa-dev] [RFC PATCH 23/26] i965: fix renderbuffer wrapper setup for multisample textures

2012-12-29 Thread Chris Forbes
Previously we were putting the 2x2 (or 4x2) fake dimensions of the surface into the renderbuffer wrapper. This is different from how other parts of the driver expect multisample renderbuffers to be set up, and produced stalls and memory stomps. Pulls multisample textures into line with classic mul

[Mesa-dev] [RFC PATCH 22/26] i965: gen6: set multisample mode in surface_state

2012-12-29 Thread Chris Forbes
- Set the multisample mode - Set the surface dimensions correctly, in pixels. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mes

[Mesa-dev] [RFC PATCH 21/26] i965: add support for multisample textures

2012-12-29 Thread Chris Forbes
This is a bit nasty -- I've just (ab)used the existing multisample renderbuffer path. Also put the actual sample count from the mt back into the renderbuffer so core mesa can see what the driver actually gave it. Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c |

[Mesa-dev] [RFC PATCH 20/26] i965: sanity check that built miptree wont need immediate rebuild

2012-12-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/intel/intel_tex.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c index 6820f98..fdf5812 100644 --- a/src/mesa/drivers/dri/intel/intel_tex.c +++ b/src/mesa/

[Mesa-dev] [RFC PATCH 19/26] mesa: implement TexImage*Multisample

2012-12-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/main/teximage.c | 150 +-- 1 file changed, 144 insertions(+), 6 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index b24efda..48ca997 100644 --- a/src/mesa/main/teximage.c +++ b/sr

[Mesa-dev] [RFC PATCH 18/26] fbo: allow stencil textures

2012-12-29 Thread Chris Forbes
ARB_texture_multisample allows STENCIL_INDEX and sized variants with the multisample texture targets; similar to renderbuffers. Signed-off-by: Chris Forbes --- src/mesa/main/fbobject.c | 29 ++--- 1 file changed, 6 insertions(+), 23 deletions(-) diff --git a/src/mesa/mai

[Mesa-dev] [RFC PATCH 17/26] mesa: adjust texture completeness for multisample

2012-12-29 Thread Chris Forbes
GL_TEXTURE_2D_MULTISAMPLE and GL_TEXTURE_2D_MULTISAMPLE_ARRAY targets don't allow filtering state to be set, but the default state fails the completeness check for integer formats. We still care about other reasons the texture might be considered incomplete though, so can't skip this entirely like

[Mesa-dev] [RFC PATCH 16/26] mesa: support multisample textures in framebuffer completeness check

2012-12-29 Thread Chris Forbes
- sample count must be the same on all attachments - fixedsamplepositions must be the same on all attachments (renderbuffers have fixedsamplepositions=true implicitly; only multisample textures can choose to have it false) Signed-off-by: Chris Forbes --- src/mesa/main/fbobject.c | 35 +++

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

2012-12-29 Thread Chris Forbes
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 --- src/mesa/drivers/dri/i965/brw_context.c| 3 + src/mesa/drivers/dri/i965/brw_context.h| 5 + src/mesa/driver

[Mesa-dev] [RFC PATCH 14/26] i965: add support for sample mask on Gen6+

2012-12-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- 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/dri/i965/gen7_blorp.cpp | 2 +- 4 files

[Mesa-dev] [RFC PATCH 13/26] mesa: implement sample mask

2012-12-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/main/enable.c | 15 +++ 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 | 16 ++-- 5 files changed,

[Mesa-dev] [RFC PATCH 12/26] mesa: implement GetMultisamplefv

2012-12-29 Thread Chris Forbes
Actual sample locations deferred to a driverfunc since only the driver really knows where they will be. V2: pass the draw buffer to the driverfunc; don't fallback to pixel center if driverfunc is missing. Signed-off-by: Chris Forbes --- src/mesa/drivers/common/driverfuncs.c | 3 +++ src/mesa/m

[Mesa-dev] [RFC PATCH 11/26] i965: expose new max sample counts

2012-12-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/drivers/dri/i965/brw_context.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index df0f8d6..40f7ff3 100644 --- a/src/mesa/drivers/dri/i96

[Mesa-dev] [RFC PATCH 10/26] mesa: add new max sample count state

2012-12-29 Thread Chris Forbes
- GL_MAX_COLOR_TEXTURE_SAMPLES - GL_MAX_DEPTH_TEXTURE_SAMPLES - GL_MAX_INTEGER_SAMPLES Signed-off-by: Chris Forbes --- src/mesa/main/get_hash_params.py | 5 - src/mesa/main/mtypes.h | 5 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/get_hash_para

[Mesa-dev] [RFC PATCH 09/26] wire up GL_TEXTURE_SAMPLES and GL_TEXTURE_FIXED_SAMPLE_LOCATIONS

2012-12-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/main/texparam.c | 13 + 1 file changed, 13 insertions(+) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index c141992..c54ead3 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -1119,6 +1119,19 @@ get_te

[Mesa-dev] [RFC PATCH 08/26] glsl: add support for ARB_texture_multisample

2012-12-29 Thread Chris Forbes
V2: emit `sample` parameter properly for multisample texelFetch() Signed-off-by: Chris Forbes --- src/glsl/builtin_types.h| 19 +++ .../builtins/profiles/ARB_texture_multisample.glsl | 18 ++ src/glsl/builtins/tools/generate_builtins.p

[Mesa-dev] [RFC PATCH 07/26] mesa: support getting current binding for multisample textures

2012-12-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/main/get.c | 9 + src/mesa/main/get_hash_params.py | 5 + 2 files changed, 14 insertions(+) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 273a79f..4c227a8 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @

[Mesa-dev] [RFC PATCH 06/26] mesa: add new texture state for ARB_texture_multisample

2012-12-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/main/mtypes.h | 4 src/mesa/main/texobj.c | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index db87ead..4be1074 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1302,6 +1302,

[Mesa-dev] [RFC PATCH 05/26] tests: add ARB_texture_multisample enums to table

2012-12-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- 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 d473c30..1e6bd7e 100644 --- a/src/mesa/main/tests/enum_strings.cpp +++

[Mesa-dev] [RFC PATCH 04/26] mesa: add texobj support for ARB_texture_multisample

2012-12-29 Thread Chris Forbes
V2: Allow multisample texture targets in glInvalidateTexSubImage too. This was already partly there, but I missed it the first time around since the interaction is defined in a newer extension. Signed-off-by: Chris Forbes --- src/mesa/main/fbobject.c | 5 + src/mesa/main/mtypes.h | 4 +++

[Mesa-dev] [RFC PATCH 03/26] mesa: add stubs for new entrypoints for ARB_texture_multisample

2012-12-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/main/multisample.c | 15 +++ src/mesa/main/multisample.h | 5 + src/mesa/main/teximage.c| 20 src/mesa/main/teximage.h| 15 +++ 4 files changed, 55 insertions(+) diff --git a/src/mesa/main/multisam

[Mesa-dev] [RFC PATCH 02/26] dispatch_sanity: enable checks for ARB_texture_multisample

2012-12-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mesa/main/tests/dispatch_sanity.cpp | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index a285559..78bf763 100644 --- a/src/mesa/main/tests/dispatch_s

[Mesa-dev] [RFC PATCH 01/26] glapi: add ARB_texture_multisample

2012-12-29 Thread Chris Forbes
Signed-off-by: Chris Forbes --- src/mapi/glapi/gen/ARB_texture_multisample.xml | 69 ++ src/mapi/glapi/gen/gl_API.xml | 3 ++ 2 files changed, 72 insertions(+) create mode 100644 src/mapi/glapi/gen/ARB_texture_multisample.xml diff --git a/src/mapi/glapi

[Mesa-dev] [RFC PATCH 0/26] Implement ARB_texture_multisample

2012-12-29 Thread Chris Forbes
This series adds support for ARB_texture_multisample in core mesa and the i965 driver, and initially enables it for Gen6. There's a few rough edges still: - sample counts aren't quantized correctly - various small Gen7-specific things aren't done or adequately tested (Gen7 surface_state bits;