[Mesa-dev] [PATCH 3/3] intel: Add support copying Y-tiled buffers with the Gen6 blitter.

2011-06-29 Thread Kenneth Graunke
According to the Sandybridge PRM, Volume 1, Part 5, Section 1.9.15, Gen6's blitter supports Y-tiled buffers as well as X-tiled. Pitch is specified in 512-byte granularity for X-tiled, but 128-byte for Y-tiled. Gen5 and earlier unfortunately only support X-tiled buffers. Fixes a software fallback

[Mesa-dev] [PATCH 2/3] intel: Remove restriction against Y-tiling in intel_copy_texsubimage.

2011-06-29 Thread Kenneth Graunke
intelEmitCopyBlit already checks for this, so the check is redundant and unnecessary. This consolidates the logic (which will soon change). NOTE: This is a candidate for the 7.10 and 7.11 branches. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/intel/intel_tex_copy.c |5 - 1 f

[Mesa-dev] [PATCH 1/3] intel: Recognize GL_DEPTH_COMPONENT32 in get_teximage_readbuffer.

2011-06-29 Thread Kenneth Graunke
gl_texture_image::InternalFormat is actually the user requested internal format, not what the texture actually is. Thus, even though we don't support 32-bit depth buffers, we need to recognize the enumeration here. Otherwise, it wrongly returns the color read buffer instead of the depth read buffe

Re: [Mesa-dev] [PATCH-RFC] autoconf: add --enable-{dri,glx,osmesa}

2011-06-29 Thread Chia-I Wu
On Sun, Jun 26, 2011 at 10:39 PM, Chia-I Wu wrote: > From: Chia-I Wu > > The idea is that DRI driver, libGL and libOSMesa are libraries that can > be independently enabled, yet --with-driver does not allow us to easily > do that, if not impossible.  This also matches what > --enable-{egl,xorg,d3d

Re: [Mesa-dev] [PATCH] llvmpipe: Optimize new fs state setup

2011-06-29 Thread Roland Scheidegger
Ok in fact there's a gcc bug about memcmp: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43052 In short gcc's memcmp builtin is totally lame and loses to glibc's memcmp (including call overhead, no knowledge about alignment etc.) even when comparing only very few bytes (and loses BIG time for lots of

[Mesa-dev] [Bug 38789] New: [bisected] Hacks cubestorm, noof and pipes from XScreenSaver stopped displaying anything

2011-06-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38789 Summary: [bisected] Hacks cubestorm, noof and pipes from XScreenSaver stopped displaying anything Product: Mesa Version: git Platform: x86-64 (AMD64) OS/Version: Linux (All)

[Mesa-dev] [PATCH] i965/fs: Fix message register allocation in FB writes.

2011-06-29 Thread Kenneth Graunke
Commit 6750226e6d915742ebf96bae2cfcdd287b85db35 bumped the base MRF to m2 instead of m0, but failed to adjust inst->mlen, which was being set to the highest MRF. Subtracting the base MRF solves the issue. Signed-off-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 11 +++

Re: [Mesa-dev] [PATCH] llvmpipe: Optimize new fs state setup

2011-06-29 Thread Roland Scheidegger
I didn't even look at that was just curious why the memcmp (which is used a lot in other places) is slow. However, none of the other memcmp seem to show up prominently (cso functions are quite low in profiles, _mesa_search_program_cache uses memcmp too but it's not that high neither). So I guess th

Re: [Mesa-dev] How to submit a patch?

2011-06-29 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/29/2011 07:34 AM, Micael wrote: > I'm new here, and I'm looking for a way to submit a patch that I have > created that fixes an "index out of bounds" issue. > I already attached the patch to the bug report in question > (https://bugs.freedesktop

Re: [Mesa-dev] [PATCH] llvmpipe: Optimize new fs state setup

2011-06-29 Thread Corbin Simpson
Okay, so maybe I'm failing to recognize the exact situation here, but wouldn't it be possible to mark the FS state with a serial number and just compare those? Or are these FS states not CSO-cached? ~ C. On Wed, Jun 29, 2011 at 3:44 PM, Roland Scheidegger wrote: > Actually I ran some numbers her

Re: [Mesa-dev] [PATCH 4/9] i965: Implement new ir_unop_u2i and ir_unop_i2u opcodes.

2011-06-29 Thread Eric Anholt
On Wed, 15 Jun 2011 00:49:33 -0700, Kenneth Graunke wrote: > No MOV is necessary since signed/unsigned integers share the same > bit-representation; it's simply a question of interpretation. In > particular, the fs_reg::imm union shouldn't need updating. > > Signed-off-by: Kenneth Graunke > --

Re: [Mesa-dev] [PATCH] llvmpipe: Optimize new fs state setup

2011-06-29 Thread Roland Scheidegger
Actually I ran some numbers here and tried out a optimized struct compare: original ipers: 12.1 fps ajax patch: 15.5 fps optimized struct compare: 16.8 fps This is the function I used for that (just enabled in that lp_setup function): static INLINE int util_cmp_struct(const void *src1, const voi

[Mesa-dev] [PATCH 5/5] i915: Fix leak of ViewportMatrix data on context destroy.

2011-06-29 Thread Eric Anholt
From: John Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30217 --- src/mesa/drivers/dri/intel/intel_context.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index 91f6c6d.

[Mesa-dev] [PATCH 2/5] intel: Rely on intel_region_reference()'s support of *dst != NULL.

2011-06-29 Thread Eric Anholt
--- src/mesa/drivers/dri/i915/i830_vtbl.c |2 -- src/mesa/drivers/dri/i915/i915_vtbl.c |2 -- src/mesa/drivers/dri/intel/intel_fbo.c| 13 - src/mesa/drivers/dri/intel/intel_screen.c |1 - 4 files changed, 0 insertions(+), 18 deletions(-) diff --git a/src/mesa

[Mesa-dev] [PATCH 1/5] intel: Allow intel_region_reference() with *dst != NULL.

2011-06-29 Thread Eric Anholt
This should help us avoid leaking regions in region reference code by making the API more predictable. --- src/mesa/drivers/dri/intel/intel_regions.c | 10 ++ 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mesa/drivers/dri/intel/intel_regions.c b/src/mesa/drivers/dri

[Mesa-dev] [PATCH 4/5] intel: Remove gratuitous context checks in intel_delete_renderbuffer().

2011-06-29 Thread Eric Anholt
Even if we don't have a current context, if we're freeing the rb we should free its region (and BO). The renderbuffer unreference checks appear to be just cargo-cult from the region unreference code. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30217 --- src/mesa/drivers/dri/intel/inte

[Mesa-dev] [PATCH 3/5] intel: Remove now trivial intel_renderbuffer_set_{hiz_, }region().

2011-06-29 Thread Eric Anholt
Note that as a result of this cleanup a bug in intel_process_dri2_buffer_no_separate_stencil() beomes quite apparent. --- src/mesa/drivers/dri/intel/intel_context.c | 40 src/mesa/drivers/dri/intel/intel_fbo.c | 19 - src/mesa/drivers/dri/intel/inte

Re: [Mesa-dev] [PATCH 5/5] glsl: Generate IR for switch statements

2011-06-29 Thread Dan McCabe
Right back at ya', comments in-line, in response to your in-line comments. Thanks for the good feedback and review. cheers, danm On 06/29/2011 12:53 PM, Kenneth Graunke wrote: On 06/28/2011 02:48 PM, Dan McCabe wrote: Up until now modifying the GLSL compiler has been pretty straightforward. T

Re: [Mesa-dev] How to submit a patch?

2011-06-29 Thread Alex Deucher
On Wed, Jun 29, 2011 at 10:34 AM, Micael wrote: > Hi > I'm new here, and I'm looking for a way to submit a patch that I have > created that fixes an "index out of bounds" issue. > I already attached the patch to the bug report in question > (https://bugs.freedesktop.org/show_bug.cgi?id=34495). Is

[Mesa-dev] How to submit a patch?

2011-06-29 Thread Micael
Hi I'm new here, and I'm looking for a way to submit a patch that I have created that fixes an "index out of bounds" issue. I already attached the patch to the bug report in question ( https://bugs.freedesktop.org/show_bug.cgi?id=34495). Is that enough? Thanks. -- Micael Dias __

Re: [Mesa-dev] [PATCH 4/5] glsl: Reference data structure ctors in grammar

2011-06-29 Thread Kenneth Graunke
On 06/28/2011 02:48 PM, Dan McCabe wrote: > We now tie the grammar to the ctors of the ASTs they reference. > > This requires that we actually have definitions of the ctors. > > In addition, we also need to define "print" and "hir" methods for the AST > classes. The Print methods are pretty simpl

Re: [Mesa-dev] [PATCH 5/5] glsl: Generate IR for switch statements

2011-06-29 Thread Kenneth Graunke
On 06/28/2011 02:48 PM, Dan McCabe wrote: > Up until now modifying the GLSL compiler has been pretty straightforward. > This is where things get interesting. But still pretty straightforward. Dan, This patch looks good! I found a few small issues...nothing major. I think one more round and it s

[Mesa-dev] [Bug 38716] Can't build, error: undefined reference to `_eglFilterConfigArray'

2011-06-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38716 Alexandre Demers changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|

Re: [Mesa-dev] [PATCH] llvmpipe: Optimize new fs state setup

2011-06-29 Thread Roland Scheidegger
Ohh that's interesting, you'd think the comparison shouldn't be that expensive (though I guess in ipers case the comparison is never true). memcmp is quite extensively used everywhere. Maybe we could replace that with something faster (since we only ever care if the blocks are the same but not care

[Mesa-dev] [PATCH 2/2] GLX/DRI2: handle swap event swap count wrapping

2011-06-29 Thread Jesse Barnes
Create a new GLX drawable struct to track client related info, and add a wrap counter to it drawable and track it as we receive events. This allows us to support the full 64 bits of the event structure we pass to the client even though the server only gives us a 32 bit count. Reviewed-by: Michel

Re: [Mesa-dev] [PATCH] llvmpipe: Optimize new fs state setup

2011-06-29 Thread Keith Whitwell
On Wed, 2011-06-29 at 13:19 -0400, Adam Jackson wrote: > Perversely, do this by eliminating the comparison between stored and > current fs state. On ipers, a perf trace showed try_update_scene_state > using 31% of a CPU, and 98% of that was in 'repz cmpsb', ie, the memcmp. > Taking that out takes

[Mesa-dev] [PATCH 1/2] DRI2/GLX: use new swap event types

2011-06-29 Thread Jesse Barnes
Use the new swap event type so we get valid SBC values. Reviewed-by: Ian Romanick Reviewed-by: Jeremy Huddleston Signed-off-by: Jesse Barnes --- configure.ac |4 ++-- src/glx/dri2.c |4 ++-- src/glx/glxext.c |4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --gi

Re: [Mesa-dev] [PATCH 1/2] getenv4d-with-error: New test for a bug in glGetProgramEnvParameter4dARB().

2011-06-29 Thread Eric Anholt
On Wed, 29 Jun 2011 11:56:29 +0200, Gustaw Smolarczyk wrote: > 2011/6/29 Eric Anholt : > > +       if (fabs(test_data[0] - result_data[0]) > epsilon || > > +           fabs(test_data[1] - result_data[1]) > epsilon || > > +           fabs(test_data[2] - result_data[2]) > epsilon || > > +          

Re: [Mesa-dev] [PATCH 1/3] mesa: Don't skip glGetProgramEnvParam4dvARB if there was already an error.

2011-06-29 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/28/2011 04:49 PM, Eric Anholt wrote: > Fixes a bug caught by oglconform, and now piglit > ARB_vertex_program/getenv4d-with-error. The wrapping of an existing > GL function made it so that we couldn't distinguish an error in > looking up our argu

[Mesa-dev] [PATCH] llvmpipe: Optimize new fs state setup

2011-06-29 Thread Adam Jackson
Perversely, do this by eliminating the comparison between stored and current fs state. On ipers, a perf trace showed try_update_scene_state using 31% of a CPU, and 98% of that was in 'repz cmpsb', ie, the memcmp. Taking that out takes try_update_scene_state down to 6.5% of the profile; more import

Re: [Mesa-dev] [PATCH 3/5] glsl: Create AST structs corresponding to new productions in grammar

2011-06-29 Thread Dan McCabe
On 06/28/2011 10:47 PM, Kenneth Graunke wrote: On 06/28/2011 02:48 PM, Dan McCabe wrote: Previously we added productions for: switch_body case_label_list case_statement case_statement_list Now add AST structs corresponding to those productions. Both 1/3 and 3/3 l

Re: [Mesa-dev] [PATCH 2/2] Gallium:draw:aaline and aapoint: Don't free the tokens.

2011-06-29 Thread Stéphane Marchesin
2011/6/29 Jose Fonseca : > Stephane, > > It doens't look right to me: we did allocate these (with the > tgsi_alloc_tokens() call above); and the driver should not delete them (the > driver will make a copy of the tokens if it needs them, and should not hold > on to the incoming tokens. > > If th

[Mesa-dev] [ANNOUNCE] dri2proto 2.6

2011-06-29 Thread Jesse Barnes
Chad Versace (1): Add attachment token DRI2BufferHiz Jesse Barnes (2): Revert "dri2proto: make DRI2 swap event match GLX spec" dri2proto: add a new DRI2BufferSwapComplete struct that matches the spec git tag: dri2proto-2.6 http://xorg.freedesktop.org/archive/individual/proto/dr

Re: [Mesa-dev] [PATCH 3/3] mesa: Remove extra NULL Check on glFeedbackBuffer().

2011-06-29 Thread Eric Anholt
On Tue, 28 Jun 2011 21:20:14 -0600, Brian Paul wrote: > On Tue, Jun 28, 2011 at 5:49 PM, Eric Anholt wrote: > > This error result doesn't appear in the GL 2.1 or 3.2 compatibility > > specs, and triggers an unexpected GL error in Intel's oglconform when > > it tries to reset the feedback state af

[Mesa-dev] [Bug 38776] Account request for Vadim Girlin

2011-06-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38776 Alex Deucher changed: What|Removed |Added Product|Mesa|freedesktop.org Component|Other

[Mesa-dev] [Bug 38776] Account request for Vadim Girlin

2011-06-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38776 --- Comment #1 from Vadim 2011-06-29 08:05:16 PDT --- Created an attachment (id=48555) --> (https://bugs.freedesktop.org/attachment.cgi?id=48555) gpg key -- Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email --- You ar

[Mesa-dev] [Bug 38776] New: Account request for Vadim Girlin

2011-06-29 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=38776 Summary: Account request for Vadim Girlin Product: Mesa Version: unspecified Platform: Other OS/Version: All Status: NEW Severity: normal Priority: medium

Re: [Mesa-dev] [PATCH] st/mesa: Use correct internal target

2011-06-29 Thread Brian Paul
On Tue, Jun 28, 2011 at 11:47 AM, Emil Velikov wrote: > Commit 1a339b6c(st/mesa: prefer native texture formats when possible) > introduced two new arguments to the st_choose_format() functions. > This patch fixes the order and passes the correct internal_target > rather than GL_NONE > > NOTE: This

Re: [Mesa-dev] [PATCH] st/mesa: fix overwriting gl_format with pipe_format since 9d380f48

2011-06-29 Thread Brian Paul
On Mon, Jun 27, 2011 at 9:03 AM, Andre Maasikas wrote: > fixes assert later on in texcompress2/r600g Pushed. Thanks! -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] Mesa (master): i915g: Improve SIN/COS a bit.

2011-06-29 Thread Brian Paul
On Wed, Jun 29, 2011 at 5:49 AM, Jon TURNEY wrote: >> Module: Mesa >> Branch: master >> Commit: 062a1e291fdc0ef69b6677f8ae0e3471047e281d >> URL:     >> http://cgit.freedesktop.org/mesa/mesa/commit/?id=062a1e291fdc0ef69b6677f8ae0e3471047e281d >> >> Author: Stéphane Marchesin >> Date:   Tue Jun 28

Re: [Mesa-dev] [PATCH 1/2] st-api: Rework how drawables are invalidated

2011-06-29 Thread Thomas Hellstrom
Jon, Thanks for pointing this out. I apparently missed at least one case. I'll fix ASAP. /Thomas On 06/29/2011 02:20 PM, Jon TURNEY wrote: On 28/06/2011 13:19, Thomas Hellstrom wrote: The api and the state tracker manager code as well as the state tracker code assumed that only a single c

[Mesa-dev] [PATCH] r600g: fix check for empty cs

2011-06-29 Thread Vadim Girlin
--- There is ~20% fps boost with the etqw timenetdemo after this patch. src/gallium/drivers/r600/r600.h |1 + src/gallium/drivers/r600/r600_pipe.c |3 --- src/gallium/winsys/r600/drm/r600_hw_context.c |4 +++- 3 files changed, 4 insertions(+), 4 deletions(-) d

Re: [Mesa-dev] [PATCH 1/2] st-api: Rework how drawables are invalidated

2011-06-29 Thread Jon TURNEY
On 28/06/2011 13:19, Thomas Hellstrom wrote: > The api and the state tracker manager code as well as the state tracker code > assumed that only a single context could be bound to a drawable. That is not > a valid assumption, since multiple contexts can bind to the same drawable. > > Fix this by ma

Re: [Mesa-dev] Mesa (master): i915g: Improve SIN/COS a bit.

2011-06-29 Thread Jon TURNEY
> Module: Mesa > Branch: master > Commit: 062a1e291fdc0ef69b6677f8ae0e3471047e281d > URL: > http://cgit.freedesktop.org/mesa/mesa/commit/?id=062a1e291fdc0ef69b6677f8ae0e3471047e281d > > Author: Stéphane Marchesin > Date: Tue Jun 28 00:53:01 2011 -0700 > > i915g: Improve SIN/COS a bit. > >

Re: [Mesa-dev] [PATCH 2/2] Gallium:draw:aaline and aapoint: Don't free the tokens.

2011-06-29 Thread Jose Fonseca
Stephane, It doens't look right to me: we did allocate these (with the tgsi_alloc_tokens() call above); and the driver should not delete them (the driver will make a copy of the tokens if it needs them, and should not hold on to the incoming tokens. If there's a double free, then I suspect the

Re: [Mesa-dev] [PATCH 1/2] Gallium:draw:aaline and aapoint: Restore the old hooks when we destroy our stage.

2011-06-29 Thread Jose Fonseca
Looks a good thing to do. Jose - Original Message - > --- > src/gallium/auxiliary/draw/draw_pipe_aaline.c |8 > src/gallium/auxiliary/draw/draw_pipe_aapoint.c |9 + > 2 files changed, 17 insertions(+), 0 deletions(-) > > diff --git a/src/gallium/auxiliary/draw/

Re: [Mesa-dev] [PATCH] st-api: Rework how drawables are invalidated v2

2011-06-29 Thread Chia-I Wu
On Wed, Jun 29, 2011 at 4:12 PM, Thomas Hellstrom wrote: [snipped] > diff --git a/src/gallium/state_trackers/vega/vg_manager.c > b/src/gallium/state_trackers/vega/vg_manager.c > index eeea686..dec1581 100644 > --- a/src/gallium/state_trackers/vega/vg_manager.c > +++ b/src/gallium/state_trackers/v

Re: [Mesa-dev] [PATCH] st-api: Rework how drawables are invalidated v2

2011-06-29 Thread Jose Fonseca
- Original Message - > On 06/29/2011 10:10 AM, Jose Fonseca wrote: > > - Original Message - > > > >> Note that the state trackers themselves don't use atomic stamps on > >> frame-buffers. Multiple context rendering to the same drawable > >> should > >> be protected by the appl

Re: [Mesa-dev] [PATCH 1/2] getenv4d-with-error: New test for a bug in glGetProgramEnvParameter4dARB().

2011-06-29 Thread Gustaw Smolarczyk
2011/6/29 Eric Anholt : > --- >  tests/all.tests                                    |    4 + >  tests/spec/CMakeLists.txt                          |    1 + >  tests/spec/arb_vertex_program/CMakeLists.gl.txt    |   16 >  tests/spec/arb_vertex_program/CMakeLists.txt       |    1 + >  .../spec/ar

Re: [Mesa-dev] [PATCH] st-api: Rework how drawables are invalidated v2

2011-06-29 Thread Thomas Hellstrom
On 06/29/2011 10:10 AM, Jose Fonseca wrote: - Original Message - Note that the state trackers themselves don't use atomic stamps on frame-buffers. Multiple context rendering to the same drawable should be protected by the application. I known that contexts must not be used by

Re: [Mesa-dev] [PATCH] st-api: Rework how drawables are invalidated v2

2011-06-29 Thread Jose Fonseca
- Original Message - > Note that the state trackers themselves don't use atomic stamps on > frame-buffers. Multiple context rendering to the same drawable should > be protected by the application. I known that contexts must not be used by two threads simultaneously, but I don't recall eve

[Mesa-dev] [PATCH] st-api: Rework how drawables are invalidated v2

2011-06-29 Thread Thomas Hellstrom
The api and the state tracker manager code as well as the state tracker code assumed that only a single context could be bound to a drawable. That is not a valid assumption, since multiple contexts can bind to the same drawable. Fix this by making it the state tracker's responsibility to update al