[Mesa-dev] [PATCH] tgsi: Fix memory leak in out-of-memory path.

2011-10-25 Thread Vinson Lee
Fixes Coverity resource leak defect. --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 17 ++--- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c index b4eea54..1fb7f8f 100644 --- a/src/gallium

Re: [Mesa-dev] [PATCH] gallium: implement WGL_ARB_create_context

2011-10-25 Thread morgan armand
Here is the modified patch. I just checked if it works but doesn't have a good test case for it. But I will write one for sure! --- src/gallium/state_trackers/wgl/SConscript |1 + src/gallium/state_trackers/wgl/stw_context.c | 47 +++- src/gallium/state_trackers/wgl/stw_c

[Mesa-dev] [PATCH] swrast: Fix memory leak in out-of-memory path.

2011-10-25 Thread Vinson Lee
Fixes Coverity resource leak defect. --- src/mesa/swrast/s_texcombine.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c index c67c356..a7cbb44 100644 --- a/src/mesa/swrast/s_texcombine.c +++ b/src/mesa/swrast/

Re: [Mesa-dev] [PATCH 1/3] mesa: Fold gallium's texture border stripping into a core Mesa option.

2011-10-25 Thread Kenneth Graunke
On 10/24/2011 04:15 PM, Eric Anholt wrote: > We wanted to reuse this in the Intel driver. As the Fedora Hot Dog theme chooser applet(*) says: "YES" or "HELL YES"! For the series: Reviewed-by: Kenneth Graunke (*) http://fedoraproject.org/wiki/Features/Hot_Dog ___

Re: [Mesa-dev] [PATCH 3/8] mesa: Add interpolation override bitfields.

2011-10-25 Thread Brian Paul
On 10/24/2011 05:37 PM, Paul Berry wrote: On 24 October 2011 15:58, Brian Paul mailto:bri...@vmware.com>> wrote: On 10/24/2011 03:38 PM, Paul Berry wrote: This patch adds the bitfields InterpOverridesFlat, InterpOverridesSmooth, and InterpOverridesNoperspective to gl

Re: [Mesa-dev] [PATCH 3/8] mesa: Add interpolation override bitfields.

2011-10-25 Thread Brian Paul
On 10/24/2011 05:47 PM, Paul Berry wrote: On 24 October 2011 16:37, Paul Berry mailto:stereotype...@gmail.com>> wrote: On 24 October 2011 15:58, Brian Paul mailto:bri...@vmware.com>> wrote: On 10/24/2011 03:38 PM, Paul Berry wrote: This patch adds the bitfields InterpOv

Re: [Mesa-dev] [PATCH] swrast: Fix memory leak in out-of-memory path.

2011-10-25 Thread Brian Paul
On 10/25/2011 11:12 AM, Vinson Lee wrote: Fixes Coverity resource leak defect. --- src/mesa/swrast/s_texcombine.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c index c67c356..a7cbb44 100644 --- a/src/mes

Re: [Mesa-dev] [PATCH] tgsi: Fix memory leak in out-of-memory path.

2011-10-25 Thread Brian Paul
On 10/25/2011 09:26 AM, Vinson Lee wrote: Fixes Coverity resource leak defect. --- src/gallium/auxiliary/tgsi/tgsi_exec.c | 17 ++--- 1 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/gallium/auxiliary/tgsi/tgsi_exec.c b/src/gallium/auxiliary/tgsi/tgsi_exec.c i

[Mesa-dev] [PATCH] state_trackers/vdpau: Implement VdpGenerateCSCMatrix partially

2011-10-25 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst struct_version > VDP_PROCAMP_VERSION) + return VDP_STATUS_INVALID_STRUCT_VERSION; + + switch (standard) { + case VDP_COLOR_STANDARD_ITUR_BT_601: Kry = 0.299; Kby = .114; break; + case VDP_COLOR_STANDARD_ITUR_BT_709: Kry = 0.2126; Kby = .0722; break;

Re: [Mesa-dev] [PATCH] state_trackers/vdpau: Implement VdpGenerateCSCMatrix partially

2011-10-25 Thread Younes Manton
On Tue, Oct 25, 2011 at 1:35 PM, Maarten Lankhorst wrote: > Signed-off-by: Maarten Lankhorst > --- > > diff --git a/src/gallium/state_trackers/vdpau/mixer.c > b/src/gallium/state_trackers/vdpau/mixer.c > index 8728157..83daddf 100644 > --- a/src/gallium/state_trackers/vdpau/mixer.c > +++ b/src/g

Re: [Mesa-dev] [PATCH] state_trackers/vdpau: Implement VdpGenerateCSCMatrix partially

2011-10-25 Thread Maarten Lankhorst
On 10/25/2011 08:00 PM, Younes Manton wrote: > On Tue, Oct 25, 2011 at 1:35 PM, Maarten Lankhorst > wrote: >> > Is there a reason not to use/add to the code in vl_csc.c in this case? > It supports 601 and 709, wider gamut, and and it takes procamp into > account. It calculates a 4x4 matrix, b

[Mesa-dev] [PATCH 1/5] mesa: Skip texstore for 0-sized texture data.

2011-10-25 Thread Eric Anholt
The intel driver (and gallium, it looks like, though it doesn't use these texstore functions at this point) doesn't bother making storage for textures with 0 width, height, or depth. This avoids them having to deal with returning a mapping for that nonexistent data. Fixes assertion failures with

Re: [Mesa-dev] [PATCH 1/3] mesa: Fold gallium's texture border

2011-10-25 Thread Eric Anholt
On Mon, 24 Oct 2011 19:23:53 -0600, Brian Paul wrote: > On Mon, Oct 24, 2011 at 5:15 PM, Eric Anholt wrote: > > @@ -2322,6 +2363,16 @@ teximage(struct gl_context *ctx, GLuint dims, > >          return;   /* error was recorded */ > >       } > > > > +      /* Allow a hardware driver to just strip

[Mesa-dev] [PATCH 2/5] mesa: Fold gallium's texture border stripping into a core Mesa option.

2011-10-25 Thread Eric Anholt
We wanted to reuse this in the Intel driver. --- src/mesa/main/mtypes.h | 14 src/mesa/main/teximage.c | 57 +-- src/mesa/state_tracker/st_cb_texture.c | 58 ++-- src/mesa/state_tracker/st_extensio

[Mesa-dev] [PATCH 4/5] intel: Enable stripping of texture borders.

2011-10-25 Thread Eric Anholt
This replaces software rendering of textures with the deprecated 1-pixel border (which is always bad, since mipmapping is rather broken in swrast, and GLSL 1.30 is unsupported) with hardware rendering that just pretends there was never a border (so you have potential seams on apps that actually int

[Mesa-dev] [PATCH 3/5] mesa: Apply StripTextureBorder to CopyTexImage as well.

2011-10-25 Thread Eric Anholt
--- src/mesa/main/teximage.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index a93ae94..acf7187 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -2713,6 +2713,16 @@ copyteximage(struct

[Mesa-dev] [PATCH] copyteximage-border: New test for glCopyTexImage2D() vs texture borders.

2011-10-25 Thread Eric Anholt
This test ignores the actual border pixels, because we don't care. Just make sure the body of the texture works. --- tests/all.tests |1 + tests/texturing/CMakeLists.gl.txt |1 + tests/texturing/copyteximage-border.c | 109 + 3 fil

[Mesa-dev] [PATCH 5/5] intel: Drop texture border support code.

2011-10-25 Thread Eric Anholt
Now that texture borders are gone, we never need to allocate our textures through non-miptrees, which simplifies some irritating paths. (There's additional code to be removed in copy_miptree_to_teximage, which Chad has a patch for) --- src/mesa/drivers/dri/i965/brw_fallback.c| 17 +-

Re: [Mesa-dev] [PATCH 5/5] intel: Drop texture border support code.

2011-10-25 Thread Chad Versace
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/25/2011 02:58 PM, Eric Anholt wrote: > Now that texture borders are gone, we never need to allocate our > textures through non-miptrees, which simplifies some irritating paths. > > (There's additional code to be removed in copy_miptree_to_texima

Re: [Mesa-dev] [PATCH 1/5] mesa: Skip texstore for 0-sized texture data.

2011-10-25 Thread Brian Paul
On 10/25/2011 03:58 PM, Eric Anholt wrote: The intel driver (and gallium, it looks like, though it doesn't use these texstore functions at this point) doesn't bother making storage for textures with 0 width, height, or depth. This avoids them having to deal with returning a mapping for that none

[Mesa-dev] [PATCH 1/2] mesa: Add glsl_type::get_scalar_type() function.

2011-10-25 Thread Paul Berry
This function is similar to get_base_type(), but when called on arrays, it returns the scalar type composing the array. For example, glsl_type(vec4[]) => float_type. --- src/glsl/glsl_types.cpp | 23 +++ src/glsl/glsl_types.h | 11 +++ 2 files changed, 34 inserti

[Mesa-dev] [PATCH 2/2] i965: Fix flat integral varyings.

2011-10-25 Thread Paul Berry
Previously, the vertex and fragment shader back-ends assumed that all varyings were floats. In GLSL 1.30 this is no longer true--they can also be of integral types provided that they have an interpolation qualifier of "flat". This required two changes in each back-end: assigning the correct type

Re: [Mesa-dev] [PATCH 1/2] mesa: Add glsl_type::get_scalar_type() function.

2011-10-25 Thread Kenneth Graunke
On 10/25/2011 04:47 PM, Paul Berry wrote: > This function is similar to get_base_type(), but when called on > arrays, it returns the scalar type composing the array. For example, > glsl_type(vec4[]) => float_type. > --- > src/glsl/glsl_types.cpp | 23 +++ > src/glsl/glsl_typ

Re: [Mesa-dev] [PATCH 1/2] mesa: Add glsl_type::get_scalar_type() function.

2011-10-25 Thread Paul Berry
On 25 October 2011 16:55, Kenneth Graunke wrote: > On 10/25/2011 04:47 PM, Paul Berry wrote: > > This function is similar to get_base_type(), but when called on > > arrays, it returns the scalar type composing the array. For example, > > glsl_type(vec4[]) => float_type. > > --- > > src/glsl/gls

Re: [Mesa-dev] [PATCH 2/2] i965: Fix flat integral varyings.

2011-10-25 Thread Kenneth Graunke
On 10/25/2011 04:47 PM, Paul Berry wrote: > Previously, the vertex and fragment shader back-ends assumed that all > varyings were floats. In GLSL 1.30 this is no longer true--they can > also be of integral types provided that they have an interpolation > qualifier of "flat". > > This required two

Re: [Mesa-dev] [PATCH 2/2] i965: Fix flat integral varyings.

2011-10-25 Thread Paul Berry
On 25 October 2011 17:08, Kenneth Graunke wrote: > On 10/25/2011 04:47 PM, Paul Berry wrote: > > Previously, the vertex and fragment shader back-ends assumed that all > > varyings were floats. In GLSL 1.30 this is no longer true--they can > > also be of integral types provided that they have an

Re: [Mesa-dev] [PATCH 3/8] mesa: Add interpolation override bitfields.

2011-10-25 Thread Paul Berry
On 25 October 2011 10:21, Brian Paul wrote: > On 10/24/2011 05:37 PM, Paul Berry wrote: > >> On 24 October 2011 15:58, Brian Paul > > wrote: >> >>On 10/24/2011 03:38 PM, Paul Berry wrote: >> >>This patch adds the bitfields InterpOverridesFlat, >>Inter

[Mesa-dev] [PATCH v2 0/8] Interpolation qualifier support for i965

2011-10-25 Thread Paul Berry
Here is try #2 at support for GLSL 1.30 interpolation qualifiers for i965 Gen6+. Based on comments from Brian Paul, I got rid of the bitfields InterpOverridesFlat, InterpOverridesSmooth, and InterpOverridesNoperspective, and replaced them with an array, InterpQualifier, that specifies the interpol

[Mesa-dev] [PATCH v2 1/8] mesa: Expose GLSL interpolation qualifiers in gl_fragment_program.

2011-10-25 Thread Paul Berry
This patch makes GLSL interpolation qualifiers visible to drivers via the array InterpQualifier[] in gl_fragment_program, so that they can easily be used by driver back-ends to select the correct interpolation mode. Previous to this patch, the GLSL compiler was using the enum ir_variable_interpola

[Mesa-dev] [PATCH v2 2/8] glsl: Distinguish between no interpolation qualifier and 'smooth'

2011-10-25 Thread Paul Berry
Previously, we treated the 'smooth' qualifier as equivalent to no qualifier at all. However, this is incorrect for the built-in color variables (gl_FrontColor, gl_BackColor, gl_FrontSecondaryColor, and gl_BackSecondaryColor). For those variables, if there is no qualifier at all, interpolation sho

[Mesa-dev] [PATCH v2 3/8] glsl: add ir_variable::determine_interpolation_mode() function.

2011-10-25 Thread Paul Berry
This function determines how a variable should be interpolated based both on interpolation qualifiers and the current shade model. --- src/glsl/ir.cpp | 15 +++ src/glsl/ir.h | 11 +++ 2 files changed, 26 insertions(+), 0 deletions(-) diff --git a/src/glsl/ir.cpp b/src/g

[Mesa-dev] [PATCH v2 4/8] i965/fs: Fix split_virtual_grfs() when delta_xy not in a virtual register.

2011-10-25 Thread Paul Berry
This patch modifies the special case in fs_visitor::split_virtual_grfs() that prevents splitting from being applied to the delta_x/delta_y register pair (this register pair needs to remain contiguous so that it can be used by the PLN instruction). When gen>=6, this register pair is in a fixed loca

[Mesa-dev] [PATCH v2 5/8] i965/gen6+: Parameterize barycentric interpolation modes.

2011-10-25 Thread Paul Berry
This patch modifies the fragment shader back-end so that instead of using a single delta_x/delta_y register pair to store barycentric coordinates, it uses an array of such register pairs, one for each possible intepolation mode. When setting up the WM, we intstruct it to only provide the barycentr

[Mesa-dev] [PATCH v2 6/8] i965/fs: use determine_interpolation_mode().

2011-10-25 Thread Paul Berry
This patch changes how fs_visitor::emit_general_interpolation() decides what kind of interpolation to do. Previously, it used the shade model to determine how to interpolate colors, and used smooth interpolation on everything else. Now it uses ir_variable::determine_interpolation_mode(), so that

[Mesa-dev] [PATCH v2 7/8] i965/gen6+: Rename GEN6_CLIP_BARYCENTRIC_ENABLE.

2011-10-25 Thread Paul Berry
The name was misleading. The actual effect of the bit is to cause the clipper to emit *non-perspective* barycentric coordinate information (which is only needed when doing noperspective interpolation). --- src/mesa/drivers/dri/i965/brw_defines.h |2 +- 1 files changed, 1 insertions(+), 1 dele

[Mesa-dev] [PATCH v2 8/8] i965/gen6+: Add support for noperspective interpolation.

2011-10-25 Thread Paul Berry
This required the following changes: - WM setup now makes the appropriate set of barycentric coordinates (perspective vs. noperspective) available to the fragment shader, based on whether the shader requires perspective interpolation, noperspective interpolation, both, or neither. - The fra