[Mesa-dev] i965 surface state tidying, part 1

2013-09-14 Thread Kenneth Graunke
Here's a bit of tidying I did to the i965 SURFACE_STATE code: - It unifies the code for constant buffers/UBOs, texture buffers, and shader time buffers. - It also unifies the texture/renderbuffer code on Gen7+. Both of these delete a /lot/ of complicated cut and pasted code. No performance

[Mesa-dev] [PATCH 1/4] i965: Refactor Gen7+ SURFACE_STATE setup for buffer surfaces.

2013-09-14 Thread Kenneth Graunke
This was an embarassingly large amount of copy and pasted code, and it wasn't particularly simple code either. By factoring it out into a helper function, we consolidate the complexity. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/gen7_wm_surface_state.c |

[Mesa-dev] [PATCH 2/4] i965: Share Gen7+ SURFACE_STATE setup for textures and renderbuffers.

2013-09-14 Thread Kenneth Graunke
The SURFACE_STATE entries for textures and renderbuffers share almost all of the same fields. Only a couple are specific to one or the other. Thus, it makes sense to have a single shared function that takes care of all the bit-shifting required to assemble the SURFACE_STATE structure. This

[Mesa-dev] [PATCH 3/4] i965: Remove MIPLAYOUT_BELOW from Gen4-6 constant buffer surface state.

2013-09-14 Thread Kenneth Graunke
Specifying a miptree layout makes no sense for constant buffers. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c

[Mesa-dev] [PATCH 4/4] i965: Refactor Gen4-6 SURFACE_STATE setup for buffer surfaces.

2013-09-14 Thread Kenneth Graunke
This was an embarassingly large amount of copy and pasted code, and it wasn't particularly simple code either. By factoring it out into a helper function, we consolidate the complexity. Signed-off-by: Kenneth Graunke kenn...@whitecape.org --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c |

[Mesa-dev] [Bug 69354] New: glxgears window displayed in a mess and showing error messages in terminal

2013-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69354 Priority: medium Bug ID: 69354 Assignee: mesa-dev@lists.freedesktop.org Summary: glxgears window displayed in a mess and showing error messages in terminal Severity: major

[Mesa-dev] [Bug 69354] glxgears window displayed in a mess and showing error messages in terminal

2013-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69354 --- Comment #1 from Flos lonice...@gmail.com --- Created attachment 85827 -- https://bugs.freedesktop.org/attachment.cgi?id=85827action=edit all packages installed in my box -- You are receiving this mail because: You are the assignee for the

[Mesa-dev] [Bug 69354] glxgears window displayed in a mess and showing error messages in terminal

2013-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69354 --- Comment #2 from j...@openbsd.org --- You need to set 'Option ColorTiling2D off' in the Device section of xorg.conf to use a recent version of xf86-video-ati with Mesa 9.0 -- You are receiving this mail because: You are the assignee for the

Re: [Mesa-dev] [PATCH] st/mesa: don't dereference stObj-pt if NULL

2013-09-14 Thread Brian Paul
On 09/13/2013 08:15 PM, Dave Airlie wrote: It seems a user app can get us into this state, I trigger the fail running fbo-maxsize inside virgl, it fails to create the backing storage for the texture object, but then segfaults here when it should fail the completeness test. Signed-off-by: Dave

Re: [Mesa-dev] [PATCH] st/mesa: don't dereference stObj-pt if NULL

2013-09-14 Thread Brian Paul
On 09/14/2013 09:37 AM, Brian Paul wrote: On 09/13/2013 08:15 PM, Dave Airlie wrote: It seems a user app can get us into this state, I trigger the fail running fbo-maxsize inside virgl, it fails to create the backing storage for the texture object, but then segfaults here when it should fail

Re: [Mesa-dev] [PATCH] gallivm: some bits of seamless cube filtering implementation

2013-09-14 Thread Brian Paul
On 09/13/2013 11:52 AM, srol...@vmware.com wrote: From: Roland Scheidegger srol...@vmware.com Simply adjust wrap mode to clamp_to_edge. This is all that's needed for a correct implementation for nearest filtering, and it's way better than using repeat wrap for instance for linear filtering

Re: [Mesa-dev] [PATCH] mesa: Check for valid debug label before memcpy.

2013-09-14 Thread Brian Paul
On 09/13/2013 08:19 PM, Vinson Lee wrote: Fixes Dereference after null check reported by Coverity. Signed-off-by: Vinson Lee v...@freedesktop.org --- src/mesa/main/objectlabel.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git

[Mesa-dev] [PATCH 1/3] mesa: asst. clean-ups in copy_label()

2013-09-14 Thread Brian Paul
This incorporates Vinson's change to check for a null src pointer as detected by coverity. Also, rename the function params to be src/dst, const-qualify src, and use GL types to match the calling functions. And add some more comments. --- src/mesa/main/objectlabel.c | 37

[Mesa-dev] [PATCH 2/3] mesa: use caller string in error message in get_label_pointer()

2013-09-14 Thread Brian Paul
--- src/mesa/main/objectlabel.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/objectlabel.c b/src/mesa/main/objectlabel.c index d9e42cf..bfe9ba2 100644 --- a/src/mesa/main/objectlabel.c +++ b/src/mesa/main/objectlabel.c @@ -224,7 +224,7 @@

[Mesa-dev] [PATCH 3/3] mesa: add missing error checks in _mesa_GetObject[Ptr]Label()

2013-09-14 Thread Brian Paul
--- src/mesa/main/objectlabel.c | 12 1 file changed, 12 insertions(+) diff --git a/src/mesa/main/objectlabel.c b/src/mesa/main/objectlabel.c index bfe9ba2..c373a46 100644 --- a/src/mesa/main/objectlabel.c +++ b/src/mesa/main/objectlabel.c @@ -256,6 +256,12 @@

[Mesa-dev] [PATCH 1/2] mesa: minor fix-ups for _mesa_validate_sync()

2013-09-14 Thread Brian Paul
Return bool instead of int. Const-qualify the syncObj. Add some comments. --- src/mesa/main/syncobj.c | 12 ++-- src/mesa/main/syncobj.h |5 +++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c index

[Mesa-dev] [PATCH 2/2] mesa: check for bufSize 0 in _mesa_GetSynciv()

2013-09-14 Thread Brian Paul
The spec doesn't say GL_INVALID_VALUE should be raised for bufSize = 0. In any case, memcpy(len 0) will lead to a crash, so don't allow it. --- src/mesa/main/syncobj.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/syncobj.c b/src/mesa/main/syncobj.c index

Re: [Mesa-dev] gallium-bind-sampler-states branch

2013-09-14 Thread Brian Paul
On 09/12/2013 09:06 PM, Chia-I Wu wrote: Hi Brian, On Fri, Sep 13, 2013 at 8:46 AM, Brian Paul bri...@vmware.com wrote: I just pushed a gallium-bind-sampler-states branch to my git repo at git://people.freedesktop.org/~brianp/mesa It replaces the four

[Mesa-dev] [Bug 69354] glxgears window displayed in a mess and showing error messages in terminal

2013-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69354 Fabio Pedretti fabio@libero.it changed: What|Removed |Added Attachment #85826|text/plain |image/png

[Mesa-dev] [PATCH] i965: Add some missing bits to {mesa, brw, cache}_bits[].

2013-09-14 Thread Paul Berry
These data structures are used for debug output, so it wasn't hurting anything that there were missing bits. But it's good to keep things up to date. This patch also adds static asserts so that the {brw,cache}_bits[] arrays are the proper size, so that we don't forget to add to them in the

[Mesa-dev] [PATCH] i965/gs: Implement basic gl_PrimitiveIDIn functionality.

2013-09-14 Thread Paul Berry
If the geometry shader refers to the built-in variable gl_PrimitiveIDIn, we need to set a bit in 3DSTATE_GS to tell the hardware to dispatch primitive ID to r1, and we need to leave room for it when allocating registers. Note: this feature doesn't yet work properly when software primitive restart

[Mesa-dev] [PATCH] vdpau/decode: Check max width and max height.

2013-09-14 Thread Rico Schüller
--- src/gallium/state_trackers/vdpau/decode.c | 20 1 file changed, 20 insertions(+) diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c index 47ca229..b144b83 100644 --- a/src/gallium/state_trackers/vdpau/decode.c +++

Re: [Mesa-dev] [PATCH] i965/gs: Implement basic gl_PrimitiveIDIn functionality.

2013-09-14 Thread Kenneth Graunke
On 09/14/2013 10:33 AM, Paul Berry wrote: If the geometry shader refers to the built-in variable gl_PrimitiveIDIn, we need to set a bit in 3DSTATE_GS to tell the hardware to dispatch primitive ID to r1, and we need to leave room for it when allocating registers. Note: this feature doesn't

[Mesa-dev] [PATCH 1/4] glsl: Keep track of location for interface block fields.

2013-09-14 Thread Paul Berry
This patch adds a location element to struct glsl_struct_field, so that we can keep track of the gl_varying_slot associated with each built-in geometry shader input. In lower_named_interface_blocks, we use this value to populate the location field in the ir_variable that stores each geometry

[Mesa-dev] [PATCH 2/4] glsl/gs: add gl_in support to builtin_variables.cpp.

2013-09-14 Thread Paul Berry
Previously, builtin_variables.cpp was written assuming that we supported ARB_geometry_shader4 style geometry shader inputs, meaning that each built-in varying input to a geometry was supplied via an array variable whose name ended in In, e.g. gl_PositionIn or gl_PointSizeIn. However, in GLSL 1.50

[Mesa-dev] [PATCH 3/4] glsl/gs: handle gl_ClipDistance geometry input in lower_clip_distance.

2013-09-14 Thread Paul Berry
From: Bryan Cain bryanca...@gmail.com This corresponds to the lowering of gl_ClipDistance to gl_ClipDistanceMESA for vertex and geometry shader outputs. Since this lowering pass occurs after lower_named_interface blocks, it deals with 2D arrays (gl_ClipDistance[vertex][clip_plane]) rather than

[Mesa-dev] [PATCH 4/4] i965/gs: Fixup gl_PointSize on entry to geometry shaders.

2013-09-14 Thread Paul Berry
gl_PointSize is stored in the w component of VARYING_SLOT_PSIZ, but the geometry shader infrastructure assumes that it should look for all geometry shader inputs of type float in the x component. So when compiling a geomtery shader that uses a gl_PointSize input, fix it up during the shader

[Mesa-dev] [PATCH 1/2] i965/gs: Add new primitive types.

2013-09-14 Thread Paul Berry
As part of its support for geometry shaders, GL 3.2 introduces four new primitive types: GL_LINES_ADJACENCY, GL_LINE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY, and GL_TRIANGLE_STRIP_ADJACENCY. --- src/mesa/drivers/dri/i965/brw_context.h | 2 +- src/mesa/drivers/dri/i965/brw_draw.c| 8 ++--

[Mesa-dev] [PATCH 2/2] i965/gs: New gs primitive types are supported by HW primitive restart.

2013-09-14 Thread Paul Berry
When we previously implemented primitive restart, we didn't add cases to brw_primitive_restart.c's can_cut_index_handle_prims() for the primitive types that are introduced with geometry shaders. It turns out that all of the new primitive types are supported by hardware primitive restart. ---

Re: [Mesa-dev] [PATCH 2/2] i965/gs: New gs primitive types are supported by HW primitive restart.

2013-09-14 Thread Kenneth Graunke
On 09/14/2013 01:59 PM, Paul Berry wrote: When we previously implemented primitive restart, we didn't add cases to brw_primitive_restart.c's can_cut_index_handle_prims() for the primitive types that are introduced with geometry shaders. It turns out that all of the new primitive types are

Re: [Mesa-dev] [PATCH] i965: Add some missing bits to {mesa, brw, cache}_bits[].

2013-09-14 Thread Kenneth Graunke
On 09/14/2013 10:29 AM, Paul Berry wrote: These data structures are used for debug output, so it wasn't hurting anything that there were missing bits. But it's good to keep things up to date. This patch also adds static asserts so that the {brw,cache}_bits[] arrays are the proper size, so

[Mesa-dev] [Bug 69354] glxgears window displayed in a mess and showing error messages in terminal

2013-09-14 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=69354 Flos lonice...@gmail.com changed: What|Removed |Added Status|NEW |RESOLVED