Re: [Piglit] [PATCH] Rework the PIGLIT_GL_VISUAL flags, fix RGB vs RGBA vs ALPHA confusion

2013-03-27 Thread Brian Paul

On 03/26/2013 11:13 AM, Marek Olšák wrote:

Hi,

would anyone like to comment on this? Or is it still stuck in the
moderation queue?


I can't find the patch you're referring to.  Repost?

-Brian

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] Rework the PIGLIT_GL_VISUAL flags, fix RGB vs RGBA vs ALPHA confusion

2013-03-27 Thread Marek Olšák
The patch seems to be too large for a mailing list. It's here:

http://cgit.freedesktop.org/~mareko/piglit/commit/?id=8fa85790a3e5a3caba3a6eba912e7858c893363b

Marek

On Wed, Mar 27, 2013 at 11:39 PM, Brian Paul bri...@vmware.com wrote:
 On 03/26/2013 11:13 AM, Marek Olšák wrote:

 Hi,

 would anyone like to comment on this? Or is it still stuck in the
 moderation queue?


 I can't find the patch you're referring to.  Repost?

 -Brian

___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] st/wgl: fix handling of minimized windows

2013-03-27 Thread Brian Paul
If a window is redrawn while minimized we were emitting an invalid
size when doing SwapBuffers.  With the VMware SVGA driver it meant we
were emitting invalid dimensions for the SurfaceCopy command.

--

I've been running with this patch for a few days and haven't seen
any regressions.  Tested in WinXP and Win7.

Fixes http://bugzilla.eng.vmware.com/show_bug.cgi?id=996695
---
 src/gallium/state_trackers/wgl/stw_framebuffer.c |   26 +++
 src/gallium/state_trackers/wgl/stw_st.c  |   86 +++---
 2 files changed, 54 insertions(+), 58 deletions(-)

diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.c 
b/src/gallium/state_trackers/wgl/stw_framebuffer.c
index 32d3a2c..7d9c6c9 100644
--- a/src/gallium/state_trackers/wgl/stw_framebuffer.c
+++ b/src/gallium/state_trackers/wgl/stw_framebuffer.c
@@ -122,33 +122,29 @@ stw_framebuffer_get_size( struct stw_framebuffer *fb )
 */
 
assert(fb-hWnd);
-   assert(fb-width  fb-height);
assert(fb-client_rect.right  == fb-client_rect.left + fb-width);
assert(fb-client_rect.bottom == fb-client_rect.top  + fb-height);
 
/*
-* Get the client area size.
+* Get the client area size.  Note: we might get a size of 0 x 0 if
+* the window is minimized.
 */
-
if (!GetClientRect(fb-hWnd, client_rect)) {
   return;
}
 
+   if (0)
+  debug_printf(GetClientRect l %u  r %u  t %u  b %u\n,
+   (unsigned) client_rect.left,
+   (unsigned) client_rect.right,
+   (unsigned) client_rect.top,
+   (unsigned) client_rect.bottom);
+
assert(client_rect.left == 0);
assert(client_rect.top == 0);
width  = client_rect.right  - client_rect.left;
height = client_rect.bottom - client_rect.top;
 
-   if (width = 0 || height = 0) {
-  /*
-   * When the window is minimized GetClientRect will return zeros.  Simply
-   * preserve the current window size, until the window is restored or
-   * maximized again.
-   */
-
-  return;
-   }
-
if (width != fb-width || height != fb-height) {
   fb-must_resize = TRUE;
   fb-width = width; 
@@ -337,9 +333,7 @@ stw_framebuffer_update(
struct stw_framebuffer *fb)
 {
assert(fb-stfb);
-   assert(fb-height);
-   assert(fb-width);
-   
+
/* XXX: It would be nice to avoid checking the size again -- in theory  
 * stw_call_window_proc would have cought the resize and stored the right 
 * size already, but unfortunately threads created before the DllMain is 
diff --git a/src/gallium/state_trackers/wgl/stw_st.c 
b/src/gallium/state_trackers/wgl/stw_st.c
index dcf9587..96b322d 100644
--- a/src/gallium/state_trackers/wgl/stw_st.c
+++ b/src/gallium/state_trackers/wgl/stw_st.c
@@ -70,48 +70,50 @@ stw_st_framebuffer_validate_locked(struct 
st_framebuffer_iface *stfb,
  pipe_resource_reference(stwfb-textures[i], NULL);
}
 
-   memset(templ, 0, sizeof(templ));
-   templ.target = PIPE_TEXTURE_2D;
-   templ.width0 = width;
-   templ.height0 = height;
-   templ.depth0 = 1;
-   templ.array_size = 1;
-   templ.last_level = 0;
-
-   for (i = 0; i  ST_ATTACHMENT_COUNT; i++) {
-  enum pipe_format format;
-  unsigned bind;
-
-  /* the texture already exists or not requested */
-  if (stwfb-textures[i] || !(mask  (1  i))) {
- /* remember the texture */
- if (stwfb-textures[i])
-mask |= (1  i);
- continue;
-  }
-
-  switch (i) {
-  case ST_ATTACHMENT_FRONT_LEFT:
-  case ST_ATTACHMENT_BACK_LEFT:
- format = stwfb-stvis.color_format;
- bind = PIPE_BIND_DISPLAY_TARGET |
-PIPE_BIND_RENDER_TARGET;
- break;
-  case ST_ATTACHMENT_DEPTH_STENCIL:
- format = stwfb-stvis.depth_stencil_format;
- bind = PIPE_BIND_DEPTH_STENCIL;
- break;
-  default:
- format = PIPE_FORMAT_NONE;
- break;
-  }
-
-  if (format != PIPE_FORMAT_NONE) {
- templ.format = format;
- templ.bind = bind;
-
- stwfb-textures[i] =
-stw_dev-screen-resource_create(stw_dev-screen, templ);
+   if (width  0  height  0) {
+  memset(templ, 0, sizeof(templ));
+  templ.target = PIPE_TEXTURE_2D;
+  templ.width0 = width;
+  templ.height0 = height;
+  templ.depth0 = 1;
+  templ.array_size = 1;
+  templ.last_level = 0;
+
+  for (i = 0; i  ST_ATTACHMENT_COUNT; i++) {
+ enum pipe_format format;
+ unsigned bind;
+
+ /* the texture already exists or not requested */
+ if (stwfb-textures[i] || !(mask  (1  i))) {
+/* remember the texture */
+if (stwfb-textures[i])
+   mask |= (1  i);
+continue;
+ }
+
+ switch (i) {
+ case ST_ATTACHMENT_FRONT_LEFT:
+ case ST_ATTACHMENT_BACK_LEFT:
+format = stwfb-stvis.color_format;
+bind = PIPE_BIND_DISPLAY_TARGET |
+   

Re: [Piglit] [PATCH] Rework the PIGLIT_GL_VISUAL flags, fix RGB vs RGBA vs ALPHA confusion

2013-03-27 Thread Brian Paul

Looks OK to me but you might want to wait for other feedback.

Reviewed-by: Brian Paul bri...@vmware.com

On 03/27/2013 05:00 PM, Marek Olšák wrote:

The patch seems to be too large for a mailing list. It's here:

http://cgit.freedesktop.org/~mareko/piglit/commit/?id=8fa85790a3e5a3caba3a6eba912e7858c893363b

Marek

On Wed, Mar 27, 2013 at 11:39 PM, Brian Paulbri...@vmware.com  wrote:

On 03/26/2013 11:13 AM, Marek Olšák wrote:


Hi,

would anyone like to comment on this? Or is it still stuck in the
moderation queue?



I can't find the patch you're referring to.  Repost?

-Brian



___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH v2] Test some interactions with multiple inout parameters

2013-03-27 Thread Eric Anholt
Ian Romanick i...@freedesktop.org writes:

 From: Ian Romanick ian.d.roman...@intel.com

 There are several variations of

 void foo(inout int i, inout float f);
 ...
 foo(i, f[i]);

 that Mesa's GLSL compiler gets wrong.  NVIDIA's closed-source driver
 (version 304.64) fails vs-inout-index-inout-mat2-col.shader_test and
 vs-inout-index-inout-mat2-row.shader_test, but passes the others.

 v2: Use 'proble all rgb' and make vs-inout-index-inout-mat2-col use u=1
 like the other tests.  Both items were suggested by Eric Anholt.  I use
 'probe all rgb' because the tests actually write 0 for alpha, but
 shader_runner doesn't always get an RGBA visual (so alpha will be 0 or
 1).  Also, add two simpler tests vs-out-vec4 and vs-inout-vec4.  This
 currently pass, but a patch series I have in progress had broken them.

Other than the note that shader_runner does actually always get an RGBA
visual,

Reviewed-by: Eric Anholt e...@anholt.net


pgpLi9OJL1vxS.pgp
Description: PGP signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] Rework the PIGLIT_GL_VISUAL flags, fix RGB vs RGBA vs ALPHA confusion

2013-03-27 Thread Dave Airlie

 The patch seems to be too large for a mailing list. It's here:


 http://cgit.freedesktop.org/~mareko/piglit/commit/?id=8fa85790a3e5a3caba3a6eba912e7858c893363b

LGTM as well!

Dave.
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit