platform/upstream/mesa.git
13 years agoRevert "intel: Add some defense against buffer allocation failure for subimage blits"
Chris Wilson [Wed, 30 Mar 2011 09:54:31 +0000 (10:54 +0100)]
Revert "intel: Add some defense against buffer allocation failure for subimage blits"

This reverts commit de7678ef521f4fb34459e407a66ab8bf8be733e1.

The conversion from using drm_intel_bo_alloc_tiled to a plain
drm_intel_bo_alloc forgot that the tiled variant adjusts the
allocation height even for TILING_NONE.

Reported-by: Dave Airlie <airlied@redhat.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=35786
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agogallium: Use explicit values in caps enums.
Michel Dänzer [Wed, 30 Mar 2011 08:20:00 +0000 (10:20 +0200)]
gallium: Use explicit values in caps enums.

Simplifies mapping between numbers and identifiers for these.

13 years agoUse row stride instead of width when getting colour index texels.
Michel Dänzer [Wed, 30 Mar 2011 08:48:37 +0000 (10:48 +0200)]
Use row stride instead of width when getting colour index texels.

Untested, noticed while working on the depth/stencil fix.

13 years agoUse proper source row stride when getting depth/stencil texels.
Michel Dänzer [Wed, 30 Mar 2011 07:02:21 +0000 (09:02 +0200)]
Use proper source row stride when getting depth/stencil texels.

13 years agointel: Add IS_GT2 macro for recognizing Sandybridge GT2 systems.
Kenneth Graunke [Wed, 30 Mar 2011 00:03:22 +0000 (17:03 -0700)]
intel: Add IS_GT2 macro for recognizing Sandybridge GT2 systems.

Also, refactor IS_GEN6 to use the IS_GT1 and IS_GT2 macros.

13 years agonv50,nvc0: implement colour clamping controls
Christoph Bumiller [Tue, 29 Mar 2011 21:09:02 +0000 (23:09 +0200)]
nv50,nvc0: implement colour clamping controls

13 years agor600g: implement texture barrier
Fredrik Höglund [Tue, 29 Mar 2011 17:52:03 +0000 (19:52 +0200)]
r600g: implement texture barrier

13 years agor600g: implement the pipe_screen fence functions
Fredrik Höglund [Tue, 29 Mar 2011 17:43:59 +0000 (19:43 +0200)]
r600g: implement the pipe_screen fence functions

v2: Allocate the fences from a single shared buffer object.
v3: Allocate the r600_fence structs in blocks of 16.
    Spin a few times before calling sched_yield in r600_fence_finish().

13 years agomesa: Fix ugly indentation left from previous commit
Ian Romanick [Fri, 25 Mar 2011 01:31:05 +0000 (18:31 -0700)]
mesa: Fix ugly indentation left from previous commit

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
13 years agoglsl: Calcluate Mesa state slots in front-end instead of back-end
Ian Romanick [Tue, 25 Jan 2011 18:41:20 +0000 (10:41 -0800)]
glsl: Calcluate Mesa state slots in front-end instead of back-end

This should be the last bit of infrastructure changes before
generating GLSL IR for assembly shaders.

This commit leaves some odd code formatting in ir_to_mesa and brw_fs.
This was done to minimize whitespace changes / reindentation in some
loops.  The following commit will restore formatting sanity.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
13 years agoglsl: Move _mesa_builtin_uniform_desc from uniforms.c to ir_variable.cpp
Ian Romanick [Tue, 25 Jan 2011 00:55:50 +0000 (16:55 -0800)]
glsl: Move _mesa_builtin_uniform_desc from uniforms.c to ir_variable.cpp

This array is going to be used in the main compiler soon.  Leaving
them uniforms.c caused problems for building the stand-alone compiler.

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@intel.com>
13 years agor300g: add support for all render targets with one and two channels
Marek Olšák [Tue, 29 Mar 2011 14:35:13 +0000 (16:35 +0200)]
r300g: add support for all render targets with one and two channels

The hardware should be set according to this table:

FORMAT -> R300 COLORFORMAT
-------------------------
X16    -> UV88
X16Y16 -> ARGB8888
X32    -> ARGB8888
X32Y32 -> ARGB16161616

US_OUT_FMT must contain the real format.

I wasn't able to make B3G3R2 and L4A4 work, but those aren't important.

13 years agointel: fix build
Marek Olšák [Tue, 29 Mar 2011 16:01:44 +0000 (18:01 +0200)]
intel: fix build

broken with e5c6a92a12b5cd7db205d72039f58d302b0be9d5
(mesa: implement clamping controls (ARB_color_buffer_float))

13 years agointel: Protect intel_clear_with_blit from failed buffer allocations
Chris Wilson [Tue, 29 Mar 2011 14:40:21 +0000 (15:40 +0100)]
intel: Protect intel_clear_with_blit from failed buffer allocations

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34419
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoi965: Avoid name clash of loop counter and member
Chris Wilson [Tue, 29 Mar 2011 14:39:01 +0000 (15:39 +0100)]
i965: Avoid name clash of loop counter and member

src/mesa/drivers/dri/i965/brw_fs.cpp:565 warning: name lookup of ‘c’ changed

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agoi915: Detect allocation failure of batch buffer
Chris Wilson [Thu, 10 Mar 2011 18:01:32 +0000 (18:01 +0000)]
i915: Detect allocation failure of batch buffer

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
13 years agodocs: update GL3 status
Marek Olšák [Tue, 29 Mar 2011 11:03:26 +0000 (13:03 +0200)]
docs: update GL3 status

13 years agor300g: finish up signed normalized textures and render targets
Marek Olšák [Mon, 14 Mar 2011 15:37:15 +0000 (16:37 +0100)]
r300g: finish up signed normalized textures and render targets

13 years agor300g: enable clamping controls
Marek Olšák [Tue, 15 Feb 2011 23:50:25 +0000 (00:50 +0100)]
r300g: enable clamping controls

13 years agogallium: remove PIPE_CAP_VERTEX_COLOR_CLAMP_CONTROL
Marek Olšák [Sat, 26 Mar 2011 12:19:23 +0000 (13:19 +0100)]
gallium: remove PIPE_CAP_VERTEX_COLOR_CLAMP_CONTROL

The vertex color clamp control is a property of an API,
a lot like gl_rasterization_rules.

The state should be set according to the API being implemented, for example:
   OpenGL Compatibility: enabled by default
   OpenGL Core: disabled by default
   D3D11: always disabled

This patch also changes the way ARB_color_buffer_float is advertised.
If no SNORM or FLOAT render target is supported, fragment color clamping
is not required.

13 years agomesa: clamp texture border color if ARB_texture_float is unsupported
Marek Olšák [Sat, 26 Mar 2011 12:06:22 +0000 (13:06 +0100)]
mesa: clamp texture border color if ARB_texture_float is unsupported

ARB_texture_float disables clamping of the texture border color,
ARB_color_buffer_float only modifies clamping of the glGet query.

13 years agost/mesa: choose an appropriate texture format for DrawPixels
Marek Olšák [Tue, 15 Mar 2011 14:00:02 +0000 (15:00 +0100)]
st/mesa: choose an appropriate texture format for DrawPixels

13 years agogallium: add EXT_texture_snorm support
Marek Olšák [Mon, 14 Mar 2011 09:04:36 +0000 (10:04 +0100)]
gallium: add EXT_texture_snorm support

13 years agomesa: implement texstore and texfetch hooks for signed normalized formats
Marek Olšák [Sun, 13 Mar 2011 13:48:09 +0000 (14:48 +0100)]
mesa: implement texstore and texfetch hooks for signed normalized formats

The snorm texstore functions were all broken.

swrast support done except for mipmap generation, but I leave it disabled.

13 years agomesa: initial EXT_texture_snorm support
Marek Olšák [Fri, 18 Mar 2011 12:44:51 +0000 (13:44 +0100)]
mesa: initial EXT_texture_snorm support

The component ordering of some formats has been been reversed to match
Gallium types.

13 years agogallium: implement clamping controls (ARB_color_buffer_float)
Luca Barbieri [Tue, 15 Feb 2011 23:14:49 +0000 (00:14 +0100)]
gallium: implement clamping controls (ARB_color_buffer_float)

BTW this changes the gallium interface.
Some rather cosmetic changes by Marek.

Squashed commit of the following:

commit 513b37d484f0318311e84bb86ed4c93cdff71f13
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:17:54 2010 +0200

    mesa/st: respect fragment clamping in st_DrawPixels

commit 546a31e42cad459d7a7a10ebf77fc5ffcf89e9b8
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:17:28 2010 +0200

    mesa/st: support fragment and vertex color clamping

commit c406514a1fbee6891da4cf9ac3eebe4e4407ec13
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Tue Aug 24 21:56:37 2010 +0200

    mesa/st: expose ARB_color_buffer_float if unclamping is supported

commit d0c5ea11b6f75f3da2f4ca989115f150ebc7cf8d
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 17:53:41 2010 +0200

    mesa/st: use unclamped colors

    This assumes that Gallium is to be interpreted as given drivers the
    responsibility to clamp these colors if necessary.

commit aef5c3c6be6edd076e955e37c80905bc447f8a82
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:12:34 2010 +0200

    mesa, mesa/st: handle read color clamping properly

    We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where
    the operation mandates it. (see the removed XXX comment. -Marek)

    TODO: did I get the set of operations mandating it right?

commit 76bdfcfe3ff4145a1818e6cb6e227b730a5f12d8
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:18:25 2010 +0200

    gallium: add color clamping to the interface

13 years agomesa: implement clamping controls (ARB_color_buffer_float)
Marek Olšák [Tue, 15 Feb 2011 22:30:23 +0000 (23:30 +0100)]
mesa: implement clamping controls (ARB_color_buffer_float)

Squashed commit of the following:

Author: Marek Olšák <maraeo@gmail.com>

    mesa: fix getteximage so that it doesn't clamp values
    mesa: update the compute_version function
    mesa: add display list support for ARB_color_buffer_float
    mesa: fix glGet query with GL_ALPHA_TEST_REF and ARB_color_buffer_float

commit b2f6ddf907935b2594d2831ddab38cf57a1729ce
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Tue Aug 31 16:50:57 2010 +0200

    mesa: document known possible deviations from ARB_color_buffer_float

commit 5458935be800c1b19d1c9d1569dc4fa30a97e8b8
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Tue Aug 24 21:54:56 2010 +0200

    mesa: expose GL_ARB_color_buffer_float

commit aef5c3c6be6edd076e955e37c80905bc447f8a82
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:12:34 2010 +0200

    mesa, mesa/st: handle read color clamping properly

    (I'll squash the st/mesa part to a separate commit. -Marek)

    We set IMAGE_CLAMP_BIT in the caller based on _ClampReadColor, where
    the operation mandates it.

    TODO: did I get the set of operations mandating it right?

commit 3a9cb5e59b676b6148c50907ce6eef5441677e36
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:09:41 2010 +0200

    mesa: respect color clamping in texenv programs (v2)

    Changes in v2:
    - Fix attributes other than vertex color sometimes getting clamped

commit de26f9e47e886e176aab6e5a2c3d4481efb64362
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:05:53 2010 +0200

    mesa: restore color clamps on glPopAttrib

commit a55ac3c300c189616627c05d924c40a8b55bfafa
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 18:04:26 2010 +0200

    mesa: clamp color queries if and only if fragment clamping is enabled

commit 9940a3e31c2fb76cc3d28b15ea78dde369825107
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Wed Aug 25 00:00:16 2010 +0200

    mesa: introduce derived _ClampXxxColor state resolving FIXED_ONLY

    To do this, we make ClampColor call FLUSH_VERTICES with the appropriate
    _NEW flag.

    We introduce _NEW_FRAG_CLAMP since fragment clamping has wide-ranging
    effects, despite being in the Color attrib group.

    This may be easily changed by s/_NEW_FRAG_CLAMP/_NEW_COLOR/g

commit 6244c446e3beed5473b4e811d10787e4019f59d6
Author: Luca Barbieri <luca@luca-barbieri.com>
Date:   Thu Aug 26 17:58:24 2010 +0200

    mesa: add unclamped color parameters

13 years agomesa: regenerate glapi files
Marek Olšák [Tue, 15 Feb 2011 23:02:15 +0000 (00:02 +0100)]
mesa: regenerate glapi files

13 years agoi965: Resolve implied moves in brw_dp_READ_4_vs_relative.
Kenneth Graunke [Tue, 29 Mar 2011 12:49:40 +0000 (05:49 -0700)]
i965: Resolve implied moves in brw_dp_READ_4_vs_relative.

Fixes piglit test glsl-vs-arrays-3 on Sandybridge, as well as garbage
rendering in 3DMarkMobileES 2.0's Taiji demo and GLBenchmark 2.0's
Egypt and PRO demos.

NOTE: This a candidate for stable release branches.  It depends on
commit 9a21bc640188e4078075b9f8e6701853a4f0bbe4.

13 years agoi965: Refactor Sandybridge implied move handling.
Kenneth Graunke [Wed, 16 Mar 2011 21:09:17 +0000 (14:09 -0700)]
i965: Refactor Sandybridge implied move handling.

This was open-coded in three different places, and more are necessary.
Extract this into a function so it can be reused.

Unfortunately, not all variations were the same: in particular, one set
compression control and checked that the source register was not
ARF_NULL.  This seemed like a good idea, so all cases now do so.

13 years agomesa: Add missing parentheses in glBlitFramebufferEXT error strings.
Vinson Lee [Tue, 29 Mar 2011 03:32:01 +0000 (20:32 -0700)]
mesa: Add missing parentheses in glBlitFramebufferEXT error strings.

13 years agointel: Don't leak the tex object miptree when replacing it
Ian Romanick [Mon, 28 Mar 2011 17:13:25 +0000 (10:13 -0700)]
intel: Don't leak the tex object miptree when replacing it

Eventually the miptree refcounting interface should be cleaned up.
The assymmetry dramatically increases the probability of bugs like
this.  It should be made to like like libdrm refcounting or the
refcounting style used in other parts of Mesa.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=33046

Reviewed-by: Eric Anholt <eric@anholt.net>
13 years agogallivm: Fix build with llvm-2.9.
Vinson Lee [Tue, 29 Mar 2011 00:48:37 +0000 (17:48 -0700)]
gallivm: Fix build with llvm-2.9.

The build fix of commit 40ae214067673edbda79371969d1730b6194d83e does
not apply to llvm-2.9 but rather to llvm-3.0svn.

13 years agoi915g: Fix build.
Vinson Lee [Tue, 29 Mar 2011 00:37:33 +0000 (17:37 -0700)]
i915g: Fix build.

Fix build failures introduced with commit 0fbb64a52931ba5871aa2c5eb01b81d391f678d1.

Reviewed-by: Jakob Bornecrantz <wallbraker@gmail.com>
13 years agoi915g: use drm ioctl to get pci devid
Daniel Vetter [Mon, 28 Mar 2011 19:16:12 +0000 (21:16 +0200)]
i915g: use drm ioctl to get pci devid

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
13 years agogallivm: Fix build with llvm-2.9
Tobias Droste [Sun, 27 Mar 2011 15:11:14 +0000 (08:11 -0700)]
gallivm: Fix build with llvm-2.9

In llvm-2.9 Target->createMCInstPrinter() takes different arguments

Signed-off-by: Tobias Droste <tdroste@gmx.de>
13 years agost/mesa: Validate state before doing blits.
Henri Verbeet [Wed, 23 Mar 2011 20:58:06 +0000 (21:58 +0100)]
st/mesa: Validate state before doing blits.

Specifically, this ensures things like the front buffer actually exist. This
fixes piglt fbo/fbo-sys-blit and fd.o bug 35483.

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Handle texture fetch instructions with relative addressing
Fabian Bieler [Wed, 23 Mar 2011 22:27:01 +0000 (23:27 +0100)]
r600g: Handle texture fetch instructions with relative addressing

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Handle texture fetch instructions with neg or abs on source register
Fabian Bieler [Wed, 23 Mar 2011 22:26:41 +0000 (23:26 +0100)]
r600g: Handle texture fetch instructions with neg or abs on source register

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: Handle texture fetch instructions with swizzle on source register
Fabian Bieler [Wed, 23 Mar 2011 17:12:44 +0000 (18:12 +0100)]
r600g: Handle texture fetch instructions with swizzle on source register

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agoglsl: Accept precision qualifiers on sampler types, but only in ES.
Kenneth Graunke [Sun, 27 Mar 2011 06:37:09 +0000 (23:37 -0700)]
glsl: Accept precision qualifiers on sampler types, but only in ES.

GLSL 1.30 states clearly that only float and int are allowed, while the
GLSL ES specification's issues section states that sampler types may
take precision qualifiers.

Fixes compilation failures in 3DMarkMobileES 2.0 and GLBenchmark 2.0.

NOTE: This is a candidate for stable release branches.

13 years agoi965/fs: Fix linear gl_Color interpolation on pre-gen6 hardware.
Kenneth Graunke [Sun, 27 Mar 2011 05:04:23 +0000 (22:04 -0700)]
i965/fs: Fix linear gl_Color interpolation on pre-gen6 hardware.

Civilization 4's shaders make heavy use of gl_Color and don't use
perspective interpolation.  This resulted in rivers, units, trees, and
so on being rendered almost entirely white.  This is a regression
compared to the old fragment shader backend.

Found by inspection (comparing the old and new FS backend code).

References: https://bugs.freedesktop.org/show_bug.cgi?id=32949

NOTE: This is a candidate for the 7.10 branch.

13 years agoegl/wayland-drm: Fix include path
Benjamin Franzke [Wed, 16 Mar 2011 12:51:22 +0000 (13:51 +0100)]
egl/wayland-drm: Fix include path

src/egl/main/egltypedefs.h needs the path for EGL/egl.h

Reported by jlind on irc.

13 years agoegl_dri2: We don't actually support KHR_gl_texture_2D_image
Kristian Høgsberg [Tue, 8 Mar 2011 01:19:10 +0000 (20:19 -0500)]
egl_dri2: We don't actually support KHR_gl_texture_2D_image

13 years agoegl_dri2: Enable image extensions in one place
Kristian Høgsberg [Tue, 8 Mar 2011 01:18:29 +0000 (20:18 -0500)]
egl_dri2: Enable image extensions in one place

We know what we can support in egl_dri2.c so just enable the extensions
there.

13 years agoglsl: Generate readable unique names at print time.
Kenneth Graunke [Fri, 25 Mar 2011 17:59:46 +0000 (10:59 -0700)]
glsl: Generate readable unique names at print time.

Since GLSL IR allows multiple ir_variables to share the same name, we
need to generate unique names when printing the IR.  Previously, we
always used %s@%p, appending the ir_variable's memory address.

While this worked, it had two drawbacks:
- When there aren't duplicates, the extra "@0x669a3e88" is useless
  and makes the code harder to read.
- Real duplicates were hard to tell apart:
  channel_expressions@0x6699e3c8 vs. channel_expressions@0x6699ddd8

We now append @2, @3, @4, and so on, but only where necessary to
distinguish duplicates.  Since we only do this at print time, any
performance impact is irrelevant.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <idr@freedesktop.org>
13 years agogallivm: Fix build with llvm-2.9.
Vinson Lee [Fri, 25 Mar 2011 19:47:06 +0000 (12:47 -0700)]
gallivm: Fix build with llvm-2.9.

In llvm-2.9, the header file llvm/System/Host.h has been moved to
llvm/Support/Host.h.

13 years agoglsl: Make add_variable, add_uniform, et. al. have similar signatures
Ian Romanick [Tue, 25 Jan 2011 00:45:11 +0000 (16:45 -0800)]
glsl: Make add_variable, add_uniform, et. al. have similar signatures

While making some other changes in this area I was finding it annoying
each of these functions took mostly the same set of parameters in
differing orders.

13 years agoi965/fs: Use different name for inner loop counter
Ian Romanick [Fri, 25 Mar 2011 01:01:37 +0000 (18:01 -0700)]
i965/fs: Use different name for inner loop counter

'i' is already used for the outer loop.  This caused some problems
while doing other work in this area.  No bug exists here... until you
want to use the outer loop counter in the inner loop.

13 years agoglsl: Fix off-by-one error setting max_array_access for non-constant indexing
Ian Romanick [Thu, 24 Mar 2011 23:50:23 +0000 (16:50 -0700)]
glsl: Fix off-by-one error setting max_array_access for non-constant indexing

NOTE: This is a candidate for the stable branches.

13 years agoglsl: Add array access bounds checking to ir_validate
Ian Romanick [Thu, 24 Mar 2011 23:49:21 +0000 (16:49 -0700)]
glsl: Add array access bounds checking to ir_validate

13 years agomesa: add void to save_TextureBarrierNV()
Brian Paul [Fri, 25 Mar 2011 16:33:51 +0000 (10:33 -0600)]
mesa: add void to save_TextureBarrierNV()

13 years agoglsl: Add void to _mesa_destroy_shader_compiler() argument list.
José Fonseca [Fri, 25 Mar 2011 16:00:11 +0000 (16:00 +0000)]
glsl: Add void to _mesa_destroy_shader_compiler() argument list.

At least MSVC sees a distinction between foo() and foo(void) and warns
about it.

13 years agomesa: Avoid redefining PUBLIC/USE/likely/unlikely macros.
José Fonseca [Fri, 25 Mar 2011 15:59:03 +0000 (15:59 +0000)]
mesa: Avoid redefining PUBLIC/USE/likely/unlikely macros.

13 years agomesa: Use appropriate call convention in VertexAttribI*v.
José Fonseca [Fri, 25 Mar 2011 15:41:43 +0000 (15:41 +0000)]
mesa: Use appropriate call convention in VertexAttribI*v.

We were using typecasts because the functions pointers are polymorphic
in the second argument type, which.

Surprisingly the wrong calling convention didn't cause crashes on Windows,
but it was causing certain registers to be trashed in MSVC optimized
builds, when processing callists in the ClearView RC Flight Simulator.

13 years agogallium: Avoid redefinition of likely/unlikely macros on non gcc compilers.
José Fonseca [Fri, 25 Mar 2011 11:37:24 +0000 (11:37 +0000)]
gallium: Avoid redefinition of likely/unlikely macros on non gcc compilers.

13 years agomesa,mapi: Remove spurious const keyword from ClearBufferfi args.
José Fonseca [Fri, 25 Mar 2011 11:23:16 +0000 (11:23 +0000)]
mesa,mapi: Remove spurious const keyword from ClearBufferfi args.

13 years agor300g: fix alpha-test with no colorbuffer
Marek Olšák [Thu, 24 Mar 2011 22:35:16 +0000 (23:35 +0100)]
r300g: fix alpha-test with no colorbuffer

Piglit:
- fbo-alphatest-nocolor

NOTE: This is a candidate for the stable branches.

13 years agomesa: added _mesa_dump_image() for debugging
Brian Paul [Thu, 24 Mar 2011 19:38:04 +0000 (13:38 -0600)]
mesa: added _mesa_dump_image() for debugging

13 years agomesa: minor whitespace fixes
Brian Paul [Thu, 24 Mar 2011 19:15:29 +0000 (13:15 -0600)]
mesa: minor whitespace fixes

13 years agoi965/fs: Make compile failure more verbose with INTEL_DEBUG=wm.
Eric Anholt [Sun, 13 Mar 2011 20:43:05 +0000 (13:43 -0700)]
i965/fs: Make compile failure more verbose with INTEL_DEBUG=wm.

13 years agoi965/fs: Clean up reg_undef args from long ago lack of fs_inst overloads.
Eric Anholt [Sun, 13 Mar 2011 08:25:36 +0000 (00:25 -0800)]
i965/fs: Clean up reg_undef args from long ago lack of fs_inst overloads.

13 years agoi965/fs: Clean up the emit calls by introducing emit() overload helpers.
Eric Anholt [Sun, 13 Mar 2011 08:23:40 +0000 (00:23 -0800)]
i965/fs: Clean up the emit calls by introducing emit() overload helpers.

I think the code ends up a lot more legible this way, though we've
still got the overloads in the fs_inst as well (even though there's
only one caller left currently).

13 years agomesa: new MESA_EXTENSION_MAX_YEAR env var
Brian Paul [Thu, 24 Mar 2011 17:39:21 +0000 (11:39 -0600)]
mesa: new MESA_EXTENSION_MAX_YEAR env var

If set to year X, only report extensions up to that year.  This is a
work-around for games that try to copy the extensions string to a fixed
size buffer and overflow.  If a game was released in year X, setting
MESA_EXTENSION_MAX_YEAR to that year will likely fix the problem.

13 years agosvga: adjust triangle rasterization offset
Brian Paul [Thu, 24 Mar 2011 17:32:33 +0000 (11:32 -0600)]
svga: adjust triangle rasterization offset

Fixes minor sub-pixel positioning error in some apps.

13 years agoradeon: use C99 style in macros with variable arguments
Iain Hibbert [Thu, 24 Mar 2011 14:35:48 +0000 (08:35 -0600)]
radeon: use C99 style in macros with variable arguments

Signed-off-by: Iain Hibbert <plunky@netbsd.org>
13 years agoradeon: reorder #includes to silence warnings
Brian Paul [Thu, 24 Mar 2011 14:34:19 +0000 (08:34 -0600)]
radeon: reorder #includes to silence warnings

Silences warnings about RADEON_TILING_SURFACE being redefined.
Only compile tested, not run tested.

13 years agor128: fix an old annoying warning
Brian Paul [Thu, 24 Mar 2011 14:29:28 +0000 (08:29 -0600)]
r128: fix an old annoying warning

13 years agoradeon: fix radeon_create_image_from_name() wrong parameter type
Brian Paul [Thu, 24 Mar 2011 14:29:28 +0000 (08:29 -0600)]
radeon: fix radeon_create_image_from_name() wrong parameter type

13 years agost/wgl: Adjust the pbuffer invisible window size.
José Fonseca [Thu, 24 Mar 2011 10:43:27 +0000 (10:43 +0000)]
st/wgl: Adjust the pbuffer invisible window size.

Thanks to Brian Paul for diagnosing the issue.

13 years agomesa: More glGet* fixes.
José Fonseca [Wed, 23 Mar 2011 16:36:59 +0000 (16:36 +0000)]
mesa: More glGet* fixes.

glGet(GL_NORMAL_ARRAY) giving potentially wrong results.

Most of glGet(GL_XXX_ARRAY_BUFFER_BINDING) giving totally bogus results.

13 years agomesa: remove unused _MESA_NEW_NEED_NORMALS
Brian Paul [Wed, 23 Mar 2011 15:05:04 +0000 (09:05 -0600)]
mesa: remove unused _MESA_NEW_NEED_NORMALS

13 years agomesa: remove _MESA_NEW_TRANSFER_STATE
Brian Paul [Wed, 23 Mar 2011 15:04:22 +0000 (09:04 -0600)]
mesa: remove _MESA_NEW_TRANSFER_STATE

13 years agomesa: Fix typo glGet*v(GL_TEXTURE_COORD_ARRAY_*).
José Fonseca [Tue, 22 Mar 2011 22:45:21 +0000 (22:45 +0000)]
mesa: Fix typo glGet*v(GL_TEXTURE_COORD_ARRAY_*).

13 years agor600g: Check for relative addressing in destination register when trying to merge...
Fabian Bieler [Thu, 3 Mar 2011 09:08:08 +0000 (10:08 +0100)]
r600g: Check for relative addressing in destination register when trying to merge instruction groups

Signed-off-by: Henri Verbeet <hverbeet@gmail.com>
13 years agor600g: fix bo names causing -35 EDEADLCK
Dave Airlie [Mon, 21 Mar 2011 09:56:26 +0000 (19:56 +1000)]
r600g: fix bo names causing -35 EDEADLCK

this is a port of the r300 winsys code to do the same thing.

13 years agosvga: Avoid synchronizing when doing piecewise upload of textures.
José Fonseca [Mon, 21 Mar 2011 17:28:21 +0000 (17:28 +0000)]
svga: Avoid synchronizing when doing piecewise upload of textures.

13 years agosvga: Undo the DMA buffer size limiting.
José Fonseca [Thu, 17 Mar 2011 23:33:50 +0000 (23:33 +0000)]
svga: Undo the DMA buffer size limiting.

Move this to the winsys, given it is not a virtual device limitation,
but a limitation specific to certain winsyses.

Also update debug message.

13 years agoglapi: drop glapi.[ch] and glapitemp.h from being copied to the X server.
Dave Airlie [Mon, 21 Mar 2011 02:03:20 +0000 (12:03 +1000)]
glapi: drop glapi.[ch] and glapitemp.h from being copied to the X server.

These files are no longer considered shared as the X code is a lot simpler
without sharing them.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agomesa: 80-column wrapping and comment updates
Brian Paul [Sat, 19 Mar 2011 20:17:42 +0000 (14:17 -0600)]
mesa: 80-column wrapping and comment updates

13 years agomesa: 80-column wrapping, update comment
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: 80-column wrapping, update comment

13 years agogl.h: reorder some #defines
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
gl.h: reorder some #defines

13 years agomesa: consolidate enable/disable code for GL_TEXTURE_GEN_S/T/R/Q
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: consolidate enable/disable code for GL_TEXTURE_GEN_S/T/R/Q

13 years agomesa: consolidate clip plane update code
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: consolidate clip plane update code

13 years agomesa: 80-column wrapping
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: 80-column wrapping

13 years agomesa: replace macro with function
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: replace macro with function

13 years agomesa: 80-column wrapping
Brian Paul [Sat, 19 Mar 2011 20:17:41 +0000 (14:17 -0600)]
mesa: 80-column wrapping

13 years agomesa: rename functions to follow Mesa conventions
Brian Paul [Sat, 19 Mar 2011 20:17:40 +0000 (14:17 -0600)]
mesa: rename functions to follow Mesa conventions

13 years agomesa: 80-column wrapping
Brian Paul [Sat, 19 Mar 2011 20:17:40 +0000 (14:17 -0600)]
mesa: 80-column wrapping

13 years agonv50,nvc0: implement texture barrier
Christoph Bumiller [Thu, 17 Mar 2011 16:07:30 +0000 (17:07 +0100)]
nv50,nvc0: implement texture barrier

13 years agor300/compiler: Use a 4-bit writemask in pair instructions
Tom Stellard [Fri, 18 Mar 2011 18:06:47 +0000 (11:06 -0700)]
r300/compiler: Use a 4-bit writemask in pair instructions

We now use a 4-bit writemask for all instruction types, which makes it
easier to write generic helper functions to manipulte writemasks.

NOTE: This is a candidate for the 7.10 branch.

13 years agonouveau: Fix serious compiler warnings
Johannes Obermayr [Fri, 18 Mar 2011 18:10:07 +0000 (12:10 -0600)]
nouveau: Fix serious compiler warnings

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=35025

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agomesa: minor improvements in glTexEnvfv()
Brian Paul [Fri, 18 Mar 2011 02:31:58 +0000 (20:31 -0600)]
mesa: minor improvements in glTexEnvfv()

13 years agomesa: only report up to 50 _mesa_problem() calls
Brian Paul [Fri, 18 Mar 2011 02:31:58 +0000 (20:31 -0600)]
mesa: only report up to 50 _mesa_problem() calls

http://bugs.freedesktop.org/show_bug.cgi?id=35200 reports a disk
partition getting filled because of warning messages.  Stop emitting
after 50.

13 years agoswrast: report data type in error message
Brian Paul [Fri, 18 Mar 2011 02:31:58 +0000 (20:31 -0600)]
swrast: report data type in error message

13 years agomesa: Remove the CompileShader driver hook; it's just a no-op.
Kenneth Graunke [Sat, 26 Feb 2011 08:42:24 +0000 (00:42 -0800)]
mesa: Remove the CompileShader driver hook; it's just a no-op.

13 years agomesa: use _mesa_get_current_tex_unit() helper in BindTexture()
Brian Paul [Thu, 17 Mar 2011 03:13:31 +0000 (21:13 -0600)]
mesa: use _mesa_get_current_tex_unit() helper in BindTexture()

13 years agomesa: remove unneeded local var in BindTexture()
Brian Paul [Thu, 17 Mar 2011 03:13:31 +0000 (21:13 -0600)]
mesa: remove unneeded local var in BindTexture()

13 years agomesa: clean up the glBindTexture early out code a bit
Brian Paul [Thu, 17 Mar 2011 03:13:31 +0000 (21:13 -0600)]
mesa: clean up the glBindTexture early out code a bit

13 years agoi965: Rename brw_(IF|CONT)_gen6 functions to gen6_(IF|CONT).
Kenneth Graunke [Wed, 16 Mar 2011 07:00:09 +0000 (00:00 -0700)]
i965: Rename brw_(IF|CONT)_gen6 functions to gen6_(IF|CONT).