platform/upstream/mesa.git
13 years agodocs: Import 7.10 release notes from 7.10 branch
Ian Romanick [Fri, 7 Jan 2011 22:37:08 +0000 (14:37 -0800)]
docs: Import 7.10 release notes from 7.10 branch

13 years agoi965: Avoid double-negation of immediate values in the VS.
Eric Anholt [Fri, 7 Jan 2011 22:26:39 +0000 (14:26 -0800)]
i965: Avoid double-negation of immediate values in the VS.

In general, we have to negate in immediate values we pass in because
the src1 negate field in the register description is in the bits3 slot
that the 32-bit value is loaded into, so it's ignored by the hardware.
However, the src0 negate field is in bits1, so after we'd negated the
immediate value loaded in, it would also get negated through the
register description.  This broke this VP instruction in the position
calculation in civ4:

MAD TEMP[1], TEMP[1], CONST[256].zzzz, CONST[256].-y-y-y-y;

Bug #30156

13 years agodocs: Import 7.9.1 release notes from 7.9 branch
Ian Romanick [Fri, 7 Jan 2011 21:38:26 +0000 (13:38 -0800)]
docs: Import 7.9.1 release notes from 7.9 branch

13 years agor600g: Also set const_offset if the buffer is not a user buffer in r600_upload_const_...
Henri Verbeet [Fri, 7 Jan 2011 16:06:11 +0000 (17:06 +0100)]
r600g: Also set const_offset if the buffer is not a user buffer in r600_upload_const_buffer().

13 years agor600g: Update some comments for Evergreen.
Henri Verbeet [Fri, 7 Jan 2011 16:06:11 +0000 (17:06 +0100)]
r600g: Update some comments for Evergreen.

13 years agor600g: Split ALU clauses based on used constant cache lines.
Henri Verbeet [Fri, 7 Jan 2011 16:06:11 +0000 (17:06 +0100)]
r600g: Split ALU clauses based on used constant cache lines.

13 years agor600g: Consistently use the copy of the alu instruction in r600_bc_add_alu_type().
Henri Verbeet [Fri, 7 Jan 2011 16:06:11 +0000 (17:06 +0100)]
r600g: Consistently use the copy of the alu instruction in r600_bc_add_alu_type().

13 years agor600g: Store kcache settings as an array.
Henri Verbeet [Fri, 7 Jan 2011 16:06:11 +0000 (17:06 +0100)]
r600g: Store kcache settings as an array.

13 years agor300g: derive user buffer sizes at draw time
Marek Olšák [Sun, 26 Dec 2010 03:29:44 +0000 (04:29 +0100)]
r300g: derive user buffer sizes at draw time

This only uploads the [min_index, max_index] range instead of [0, userbuf size],
which greatly speeds up user buffer uploads.

This is also a prerequisite for atomizing vertex arrays in st/mesa.

13 years agomesa: fix an error in uniform arrays in row calculating.
Jian Zhao [Wed, 5 Jan 2011 02:41:20 +0000 (10:41 +0800)]
mesa: fix an error in uniform arrays in row calculating.

Fix the error in uniform row calculating, it may alloc one line
more which may cause out of range on memory usage, sometimes program
aborted when free the memory.

NOTE: This is a candidate for 7.9 and 7.10 branches.

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agomesa: Directly include mfeatures.h in files that perform feature tests.
Vinson Lee [Fri, 7 Jan 2011 08:08:24 +0000 (00:08 -0800)]
mesa: Directly include mfeatures.h in files that perform feature tests.

13 years agor600c: fix up SQ setup in blit code for Ontario/NI
Alex Deucher [Fri, 7 Jan 2011 08:10:50 +0000 (03:10 -0500)]
r600c: fix up SQ setup in blit code for Ontario/NI

13 years agor600g: allow constant buffers to be user buffers.
Dave Airlie [Fri, 7 Jan 2011 00:35:41 +0000 (10:35 +1000)]
r600g: allow constant buffers to be user buffers.

This provides an upload facility for the constant buffers since Marek's
constants in user buffers changes.

gears at least work on my evergreen now.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agor600c: add support for NI asics
Alex Deucher [Thu, 6 Jan 2011 23:40:17 +0000 (18:40 -0500)]
r600c: add support for NI asics

13 years agor600g: add support for NI (Northern Islands) GPUs
Alex Deucher [Thu, 6 Jan 2011 23:05:16 +0000 (18:05 -0500)]
r600g: add support for NI (Northern Islands) GPUs

This adds support for Barts, Turks, and Caicos asics.

13 years agoi965: Rename various gen6 #defines to match the documentation.
Kenneth Graunke [Tue, 4 Jan 2011 22:34:55 +0000 (14:34 -0800)]
i965: Rename various gen6 #defines to match the documentation.

This should make it easier to cross-reference the code and hardware
documentation, as well as clear up any confusion on whether constants
like CMD_3D_WM_STATE mean WM_STATE (pre-gen6) or 3DSTATE_WM (gen6+).

This does not rename any pre-gen6 defines.

13 years agosvga: Ensure that the wrong vdecls don't get used in swtnl path
Jakob Bornecrantz [Thu, 16 Dec 2010 03:13:21 +0000 (04:13 +0100)]
svga: Ensure that the wrong vdecls don't get used in swtnl path

The draw module set new state that didn't require swtnl which caused need_swtnl to
be unset. This caused the call from to svga_update_state(svga, SVGA_STATE_SWTNL_DRAW)
from the vbuf backend to overwrite the vdecls we setup there to be overwritten with
the real buffers vdecls.

13 years agoglsl: Refresh autogenerated lexer and parser files.
Ian Romanick [Thu, 6 Jan 2011 18:53:38 +0000 (10:53 -0800)]
glsl: Refresh autogenerated lexer and parser files.

For the previous commit.

13 years agoglsl: Support the 'invariant(all)' pragma
Ian Romanick [Thu, 6 Jan 2011 18:49:56 +0000 (10:49 -0800)]
glsl: Support the 'invariant(all)' pragma

Previously the 'STDGL invariant(all)' pragma added in GLSL 1.20 was
simply ignored by the compiler.  This adds support for setting all
variable invariant.

In GLSL 1.10 and GLSL ES 1.00 the pragma is ignored, per the specs,
but a warning is generated.

Fixes piglit test glsl-invariant-pragma and bugzilla #31925.

NOTE: This is a candidate for the 7.9 and 7.10 branches.

13 years agoglsl: Allow less restrictive uses of sampler array indexing in GLSL <= 1.20
Ian Romanick [Wed, 5 Jan 2011 00:09:00 +0000 (16:09 -0800)]
glsl: Allow less restrictive uses of sampler array indexing in GLSL <= 1.20

GLSL 1.10 and 1.20 allow any sort of sampler array indexing.
Restrictions were added in GLSL 1.30.  Commit f0f2ec4d added support
for the 1.30 restrictions, but it broke some valid 1.10/1.20 shaders.
This changes the error to a warning in GLSL 1.10, GLSL 1.20, and GLSL
ES 1.00.

There are some spurious whitespace changes in this commit.  I changed
the layout (and wording) of the error message so that all three cases
would be similar.  The 1.10/1.20 and 1.30 text is the same.  The only
difference is that one is an error, and the other is a warning.  The
GLSL ES 1.00 wording is similar but not quite the same.

Fixes piglit test
spec/glsl-1.10/compiler/constant-expressions/sampler-array-index-02.frag
and bugzilla #32374.

13 years agor300g: fix corruption when nr_cbufs==0 and multiwrites enabled
Marek Olšák [Thu, 6 Jan 2011 18:02:12 +0000 (19:02 +0100)]
r300g: fix corruption when nr_cbufs==0 and multiwrites enabled

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

13 years agor300g: remove the buffer range checking
Marek Olšák [Sat, 25 Dec 2010 13:49:17 +0000 (14:49 +0100)]
r300g: remove the buffer range checking

It's no longer needed because the upload buffer remains mapped while the CS
is being filled (openarena, ut2004 and others that this code was for do not
use VBOs by default).

13 years agor300g: skip buffer validation of upload buffers when appropriate
Marek Olšák [Mon, 27 Dec 2010 21:20:58 +0000 (22:20 +0100)]
r300g: skip buffer validation of upload buffers when appropriate

because the upload buffers are reused for subsequent draw operations.

13 years agoutil: add comments to u_upload_mgr and u_inlines
Marek Olšák [Wed, 5 Jan 2011 23:26:02 +0000 (00:26 +0100)]
util: add comments to u_upload_mgr and u_inlines

13 years agovbo: remove a redundant call to _ae_invalidate_state
Marek Olšák [Sun, 26 Dec 2010 00:31:42 +0000 (01:31 +0100)]
vbo: remove a redundant call to _ae_invalidate_state

It's called in vbo_exec_invalidate_state too.

13 years agost/mesa: remove unused members in st_context
Marek Olšák [Wed, 29 Dec 2010 02:35:45 +0000 (03:35 +0100)]
st/mesa: remove unused members in st_context

What were these for?

13 years agotgsi: remove redundant name tables from tgsi_text, use those from tgsi_dump
Marek Olšák [Sun, 26 Dec 2010 21:52:25 +0000 (22:52 +0100)]
tgsi: remove redundant name tables from tgsi_text, use those from tgsi_dump

I also specified the array sizes in the header so that one can use
the Elements macro on it.

13 years agogallium: drivers should reference vertex buffers
Marek Olšák [Sun, 26 Dec 2010 17:43:39 +0000 (18:43 +0100)]
gallium: drivers should reference vertex buffers

So that a state tracker can unreference them after set_vertex_buffers.

13 years agost/mesa: optimize constant buffer uploads
Marek Olšák [Wed, 29 Dec 2010 02:17:43 +0000 (03:17 +0100)]
st/mesa: optimize constant buffer uploads

The overhead of resource_create, transfer_inline_write, and resource_destroy
to upload constant data is very visible with some apps in sysprof, and
as such should be eliminated.

My approach uses a user buffer to pass a pointer to a driver. This gives
the driver the freedom it needs to take the fast path, which may differ
for each driver.

This commit addresses the same issue as Jakob's one that suballocates out
of a big constant buffer, but it also eliminates the copy to the buffer.

13 years agost/mesa: do sanity checks on states only in debug builds
Marek Olšák [Mon, 27 Dec 2010 17:22:05 +0000 (18:22 +0100)]
st/mesa: do sanity checks on states only in debug builds

13 years agou_upload_mgr: new features
Marek Olšák [Mon, 27 Dec 2010 21:32:31 +0000 (22:32 +0100)]
u_upload_mgr: new features

- Added a parameter to specify a minimum offset that should be returned.
  r300g needs this to better implement user buffer uploads. This weird
  requirement comes from the fact that the Radeon DRM doesn't support negative
  offsets.

- Added a parameter to notify a driver that the upload flush occured.
  A driver may skip buffer validation if there was no flush, resulting
  in a better performance.

- Added a new upload function that returns a pointer to the upload buffer
  directly, so that the buffer can be filled e.g. by the translate module.

13 years agou_upload_mgr: keep the upload buffer mapped until it is flushed
Marek Olšák [Fri, 24 Dec 2010 12:47:32 +0000 (13:47 +0100)]
u_upload_mgr: keep the upload buffer mapped until it is flushed

The map/unmap overhead can be significant even though there is no waiting on busy
buffers. There is simply a huge number of uploads.

This is a performance optimization for Torcs, a car racing game.

13 years agomesa: fix build for NetBSD
Pierre Allegraud [Thu, 6 Jan 2011 14:58:57 +0000 (07:58 -0700)]
mesa: fix build for NetBSD

See http://bugs.freedesktop.org/show_bug.cgi?id=32859

NOTE: This is a candidate for the 7.9 and 7.10 branches.

Signed-off-by: Brian Paul <brianp@vmware.com>
13 years agoglext: upgrade to version 67
Brian Paul [Tue, 4 Jan 2011 23:34:12 +0000 (16:34 -0700)]
glext: upgrade to version 67

13 years agomesa: Clean up header file inclusion in version.c.
Vinson Lee [Thu, 6 Jan 2011 08:45:08 +0000 (00:45 -0800)]
mesa: Clean up header file inclusion in version.c.

Include imports.h directly instead of indirectly through context.h.
version.c does use any symbols that are added by context.h.

13 years agonvc0: Fix typo of nvc0_mm.c in SConscript.
Vinson Lee [Thu, 6 Jan 2011 08:06:38 +0000 (00:06 -0800)]
nvc0: Fix typo of nvc0_mm.c in SConscript.

13 years agomesa: bump version to 7.11
Vinson Lee [Thu, 6 Jan 2011 07:27:30 +0000 (23:27 -0800)]
mesa: bump version to 7.11

13 years agomesa: Include mtypes.h in files that use gl_context struct.
Vinson Lee [Thu, 6 Jan 2011 07:11:54 +0000 (23:11 -0800)]
mesa: Include mtypes.h in files that use gl_context struct.

Directly include mtypes.h if a file uses a gl_context struct. This
allows future removal of headers that are not strictly necessary but
indirectly include mtypes.h for a file.

13 years agoi965: skip too small size mipmap
Zou Nan hai [Thu, 6 Jan 2011 03:36:23 +0000 (11:36 +0800)]
i965: skip too small size mipmap

this fixes doom3 crash.

13 years agoi915: Fix build for previous commit.
Eric Anholt [Thu, 6 Jan 2011 02:27:13 +0000 (18:27 -0800)]
i915: Fix build for previous commit.

13 years agointel: Always allocate miptrees from level 0, not tObj->BaseLevel.
Eric Anholt [Thu, 6 Jan 2011 01:02:08 +0000 (17:02 -0800)]
intel: Always allocate miptrees from level 0, not tObj->BaseLevel.

BaseLevel/MaxLevel are mostly used for two things: clamping texture
access for FBO rendering, and limiting the used mipmap levels when
incrementally loading textures.  By restricting our mipmap trees to
just the current BaseLevel/MaxLevel, we caused reallocation thrashing
in the common case, for a theoretical win if someone really did want
just levels 2..4 or whatever of their texture object.

Bug #30366

13 years agointel: Drop unused first/lastlevel args to miptree_create_for_region.
Eric Anholt [Thu, 6 Jan 2011 00:40:56 +0000 (16:40 -0800)]
intel: Drop unused first/lastlevel args to miptree_create_for_region.

We're always making a single-level, 0-baselevel miptree.

13 years agoswrast: Include mtypes.h in s_triangle.c.
Vinson Lee [Thu, 6 Jan 2011 01:46:39 +0000 (17:46 -0800)]
swrast: Include mtypes.h in s_triangle.c.

Include mtypes.h for gl_context symbol.

13 years agost/mesa: Include mtypes.h in st_cb_drawpixels.c.
Vinson Lee [Thu, 6 Jan 2011 00:34:29 +0000 (16:34 -0800)]
st/mesa: Include mtypes.h in st_cb_drawpixels.c.

Include mtypes.h for gl_context symbol.

13 years agointel: Clarify first_level/last_level vs baselevel/maxlevel by deletion.
Eric Anholt [Thu, 6 Jan 2011 00:02:42 +0000 (16:02 -0800)]
intel: Clarify first_level/last_level vs baselevel/maxlevel by deletion.

This has always been ugly about our texture code -- object base/max
level vs intel object first/last level vs image level vs miptree
first/last level.  We now get rid of intelObj->first_level which is
just tObj->BaseLevel, and make intelObj->_MaxLevel clearly based off
of tObj->_MaxLevel instead of duplicating its code (incorrectly, as
image->MaxLog2 only considers width/height and not depth!)

13 years agomesa: Consider textures incomplete when maxlevel < baselevel.
Eric Anholt [Wed, 5 Jan 2011 23:48:31 +0000 (15:48 -0800)]
mesa: Consider textures incomplete when maxlevel < baselevel.

See section 3.8.10 of the GL 2.1 specification.  There's no way to do
anything sane with that, and drivers would get all sorts of angry.

13 years agoi915: Enable LOD preclamping on 8xx like on 915/965.
Eric Anholt [Wed, 5 Jan 2011 22:48:05 +0000 (14:48 -0800)]
i915: Enable LOD preclamping on 8xx like on 915/965.

Fixes lodclamp-between and lodclamp-between-max.

13 years agoi915: Implement min/max lod clamping in hardware on 8xx.
Eric Anholt [Wed, 5 Jan 2011 22:27:41 +0000 (14:27 -0800)]
i915: Implement min/max lod clamping in hardware on 8xx.

This avoids 8xx-specific texture relayout for min/max lod changes.
One step closer to avoiding relayout for base/maxlevel changes!

13 years agointel: Drop TEXTURE_RECTANGLE check in miptree layout setup.
Eric Anholt [Wed, 5 Jan 2011 22:12:34 +0000 (14:12 -0800)]
intel: Drop TEXTURE_RECTANGLE check in miptree layout setup.

It's already handled by our non-mipmapped MinFilter, since
TEXTURE_RECTANGLE is always NEAREST or LINEAR.

13 years agointel: Clean up redundant setup of firstLevel.
Eric Anholt [Wed, 5 Jan 2011 22:04:08 +0000 (14:04 -0800)]
intel: Clean up redundant setup of firstLevel.

It's always BaseLevel (since TEXTURE_RECTANGLE's baselevel can't be
changed from 0), except for 8xx minlod hilarity.

13 years agointel: Drop a check for GL_TEXTURE_4D_SGIS.
Eric Anholt [Wed, 5 Jan 2011 22:00:54 +0000 (14:00 -0800)]
intel: Drop a check for GL_TEXTURE_4D_SGIS.

The SGIS_texture4D extension was thankfully never completed, so we
couldn't implement it if we wanted to.

13 years agoswrast: Remove unnecessary headers.
Vinson Lee [Wed, 5 Jan 2011 21:47:02 +0000 (13:47 -0800)]
swrast: Remove unnecessary headers.

13 years agoi965: Simplify the renderbuffer setup code.
Eric Anholt [Wed, 5 Jan 2011 18:04:34 +0000 (10:04 -0800)]
i965: Simplify the renderbuffer setup code.

It was quite a mess by trying to do NULL renderbuffers and real
renderbuffers in the same function.  This clarifies the common case of
real renderbuffers.

13 years agost/xorg: Flesh out colour map support and support depth 8.
Michel Dänzer [Wed, 5 Jan 2011 10:41:56 +0000 (11:41 +0100)]
st/xorg: Flesh out colour map support and support depth 8.

13 years agoi965: use BLT to clear buffer if possible on Sandybridge
Xiang, Haihao [Wed, 5 Jan 2011 05:32:40 +0000 (13:32 +0800)]
i965: use BLT to clear buffer if possible on Sandybridge

This fixes https://bugs.freedesktop.org/show_bug.cgi?id=32713

13 years agoi965: Add support for SRGB DXT1 formats.
Eric Anholt [Wed, 5 Jan 2011 00:29:26 +0000 (16:29 -0800)]
i965: Add support for SRGB DXT1 formats.

This makes
fbo-generatemipmap-formats GL_EXT_texture_sRGB-s3tc
match
fbo-generatemipmap-formats GL_EXT_texture_compression_s3tc

and swrast in bad DXT1_RGBA alpha=0 handling, but it means we won't
unpack and repack someone's textures into uncompressed SARGB8 format.

13 years agoglcpp: Add test for recursive #define.
Vinson Lee [Wed, 5 Jan 2011 00:39:19 +0000 (16:39 -0800)]
glcpp: Add test for recursive #define.

13 years agomesa: Fix the baseFormat for GL_COMPRESSED_SLUMINANCE_EXT.
Eric Anholt [Tue, 4 Jan 2011 23:25:35 +0000 (15:25 -0800)]
mesa: Fix the baseFormat for GL_COMPRESSED_SLUMINANCE_EXT.

It's just LUMINANCE, not LUMINANCE_ALPHA.  Fixes
fbo-generatemipmap-formats GL_EXT_texture_sRGB-s3tc assertion failure
when it tries to pack the L8 channels into LUMINANCE_ALPHA and wonders
why it's trying to do that.

13 years agointel: Merge our choosetexformat fallbacks into core.
Eric Anholt [Tue, 4 Jan 2011 21:44:34 +0000 (13:44 -0800)]
intel: Merge our choosetexformat fallbacks into core.

We now share the type/format -> MESA_FORMAT_* mappings with software
mesa, and the core supports most of the fallbacks hardware drivers
will want.

13 years agomesa: Make _mesa_choose_tex_format() choose formats out of a supported table.
Eric Anholt [Fri, 24 Sep 2010 00:17:08 +0000 (17:17 -0700)]
mesa: Make _mesa_choose_tex_format() choose formats out of a supported table.

Right now this is just tweaking the current code to look at the table.
Choosing actually supported formats will come later.

13 years agoglcpp: Add division by zero test cases.
Vinson Lee [Tue, 4 Jan 2011 21:18:19 +0000 (13:18 -0800)]
glcpp: Add division by zero test cases.

13 years agomesa: preserve 10 bits of precision in the texstore general path for ARGB2101010
Marek Olšák [Wed, 22 Dec 2010 18:29:56 +0000 (19:29 +0100)]
mesa: preserve 10 bits of precision in the texstore general path for ARGB2101010

Use make_temp_float_image instead of _make_temp_chan_image.
The latter converts the texture to 8 bits/component, losing 2 bits.

13 years agost/mesa: advertise GL_ARB_half_float_pixel
Marek Olšák [Sat, 18 Dec 2010 09:31:33 +0000 (10:31 +0100)]
st/mesa: advertise GL_ARB_half_float_pixel

This extension doesn't appear to need any driver-specific parts.

13 years agor300/compiler: disable the rename_regs pass for loops
Marek Olšák [Tue, 4 Jan 2011 20:54:23 +0000 (21:54 +0100)]
r300/compiler: disable the rename_regs pass for loops

This workaround fixes rendering of kwin thumbnails.

NOTE: This is a candidate for the 7.9 and 7.10 branches.

13 years agor600g: support up to 64 shader constants
Alex Deucher [Tue, 4 Jan 2011 20:37:12 +0000 (15:37 -0500)]
r600g: support up to 64 shader constants

From the r600 ISA:
Each ALU clause can lock up to four sets of constants
into the constant cache.  Each set (one cache line) is
16 128-bit constants. These are split into two groups.
Each group can be from a different constant buffer
(out of 16 buffers). Each group of two constants consists
of either [Line] and [Line+1] or [line + loop_ctr]
and [line + loop_ctr +1].

For supporting more than 64 constants, we need to
break the code into multiple ALU clauses based
on what sets of constants are needed in that clause.

Note: This is a candidate for the 7.10 branch.

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
13 years agor300/compiler: Fix black terrain in Civ4
Tom Stellard [Tue, 4 Jan 2011 18:53:49 +0000 (10:53 -0800)]
r300/compiler: Fix black terrain in Civ4

rc_inst_can_use_presub() wasn't checking for too many RGB sources in
Alpha instructions or too many Alpha sources in RGB instructions.

Note: This is a candidate for the 7.10 branch.

13 years agoglsl: Check that integer vertex outputs are qualified with flat
Chad Versace [Thu, 16 Dec 2010 19:06:19 +0000 (11:06 -0800)]
glsl: Check that integer vertex outputs are qualified with flat

Perform this check in ast_declarator_list::hir().

From section 4.3.6 of the GLSL 1.30 spec:
   "If a vertex output is a signed or unsigned integer or integer
   vector, then it must be qualified with the interpolation
   qualifier
   flat."

13 years agoglsl: Allow redeclaration of gl_Color and its variants in GLSL 1.30
Chad Versace [Thu, 16 Dec 2010 00:32:47 +0000 (16:32 -0800)]
glsl: Allow redeclaration of gl_Color and its variants in GLSL 1.30

Allow redeclaration of the following built-in variables with an
interpolation qualifier in language versions >= 1.30:
   * gl_FrontColor
   * gl_BackColor
   * gl_FrontSecondaryColor
   * gl_BackSecondaryColor
   * gl_Color
   * gl_SecondaryColor

See section 4.3.7 of the GLSL 1.30 spec.

13 years agoglsl: Comment ast_type_qualifier.flags
Chad Versace [Wed, 15 Dec 2010 23:58:49 +0000 (15:58 -0800)]
glsl: Comment ast_type_qualifier.flags

13 years agointel: When validating an FBO's combined depth/stencil, use the given FBO.
Eric Anholt [Tue, 4 Jan 2011 18:00:51 +0000 (10:00 -0800)]
intel: When validating an FBO's combined depth/stencil, use the given FBO.

We were looking at the current draw buffer instead to see whether the
depth/stencil combination matched.  So you'd get told your framebuffer
was complete, until you bound it and went to draw and we decided that
it was incomplete.

13 years agointel: Fix segfaults from trying to use _ColorDrawBuffers in FBO validation.
Eric Anholt [Tue, 4 Jan 2011 17:57:21 +0000 (09:57 -0800)]
intel: Fix segfaults from trying to use _ColorDrawBuffers in FBO validation.

The _ColorDrawBuffers is a piece of computed state that gets for the
current draw/read buffers at _mesa_update_state time.  However, this
function actually gets used for non-current draw/read buffers when
checking if an FBO is complete from the driver's perspective.  So,
instead of trying to just look at the attachment points that are
currently referenced by glDrawBuffers, look at all attachment points
to see if they're driver-supported formats.  This appears to actually
be more in line with the intent of the spec, too.

Fixes a segfault in my upcoming fbo-clear-formats piglit test, and
hopefully bug #30278

13 years agoMerge remote branch 'origin/nvc0'
Christoph Bumiller [Tue, 4 Jan 2011 17:20:05 +0000 (18:20 +0100)]
Merge remote branch 'origin/nvc0'

13 years agost/mesa: skip glDrawPixels/glBitmap-related code for ES build
Brian Paul [Tue, 4 Jan 2011 15:28:16 +0000 (08:28 -0700)]
st/mesa: skip glDrawPixels/glBitmap-related code for ES build

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32560

13 years agonvc0: fix index size method value for u8 indices
Christoph Bumiller [Tue, 4 Jan 2011 15:16:52 +0000 (16:16 +0100)]
nvc0: fix index size method value for u8 indices

13 years agonvc0: set the correct FP header bit for multiple colour outputs
Christoph Bumiller [Tue, 4 Jan 2011 00:52:12 +0000 (01:52 +0100)]
nvc0: set the correct FP header bit for multiple colour outputs

13 years agonvc0: delete memory caches and fence on screen destruction
Christoph Bumiller [Tue, 4 Jan 2011 00:14:00 +0000 (01:14 +0100)]
nvc0: delete memory caches and fence on screen destruction

13 years agonvc0: use mov instead of ld for scalar const loads
Christoph Bumiller [Mon, 3 Jan 2011 00:21:02 +0000 (01:21 +0100)]
nvc0: use mov instead of ld for scalar const loads

13 years agonvc0: fix resource unmap after vertex push
Christoph Bumiller [Sun, 2 Jan 2011 21:39:50 +0000 (22:39 +0100)]
nvc0: fix resource unmap after vertex push

13 years agonvc0: use the proper typed opcodes in constant folding
Christoph Bumiller [Sun, 2 Jan 2011 16:44:06 +0000 (17:44 +0100)]
nvc0: use the proper typed opcodes in constant folding

13 years agonvc0: demagic GP invocation count bitfield
Christoph Bumiller [Sun, 2 Jan 2011 12:25:06 +0000 (13:25 +0100)]
nvc0: demagic GP invocation count bitfield

13 years agonvc0: rewrite the 9097 GRAPH macros
Christoph Bumiller [Tue, 4 Jan 2011 15:13:42 +0000 (16:13 +0100)]
nvc0: rewrite the 9097 GRAPH macros

13 years agoi965g: include brw_types.h instead of GL/gl.h
Brian Paul [Tue, 4 Jan 2011 14:24:36 +0000 (07:24 -0700)]
i965g: include brw_types.h instead of GL/gl.h

Alternately, some search&replace could be used to replace all
occurances of GLint with int, etc. in the driver.

13 years agoosmesa: pass context to _mesa_update_framebuffer_visual()
Brian Paul [Tue, 4 Jan 2011 14:13:40 +0000 (07:13 -0700)]
osmesa: pass context to _mesa_update_framebuffer_visual()

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32814

13 years agollvmpipe: Include p_compiler.h in lp_scene_queue.h.
Vinson Lee [Tue, 4 Jan 2011 09:08:47 +0000 (01:08 -0800)]
llvmpipe: Include p_compiler.h in lp_scene_queue.h.

Include p_compiler.h for boolean symbol.

13 years agollvmpipe: Include p_compiler.h in lp_perf.h.
Vinson Lee [Tue, 4 Jan 2011 09:01:18 +0000 (01:01 -0800)]
llvmpipe: Include p_compiler.h in lp_perf.h.

Include p_compiler.h for int64_t symbol.

13 years agollvmpipe: Include missing headers in lp_bld_depth.h
Vinson Lee [Tue, 4 Jan 2011 08:54:14 +0000 (00:54 -0800)]
llvmpipe: Include missing headers in lp_bld_depth.h

Include p_compiler.h for boolean symbol.
Include p_state.h for pipe_stencil_state symbol.

13 years agollvmpipe: Include p_compiler.h in lp_bld_alpha.h.
Vinson Lee [Tue, 4 Jan 2011 08:50:48 +0000 (00:50 -0800)]
llvmpipe: Include p_compiler.h in lp_bld_alpha.h.

Include p_compiler.h for boolean symbol.
Add forward declaration for gallivm_state struct.

13 years agoi965g: Include p_compiler.h in intel_decode.h.
Vinson Lee [Tue, 4 Jan 2011 08:44:23 +0000 (00:44 -0800)]
i965g: Include p_compiler.h in intel_decode.h.

Include p_compiler.h for uint32_t symbol.

13 years agoi965g: Include gl.h in intel_structs.h.
Vinson Lee [Tue, 4 Jan 2011 08:41:10 +0000 (00:41 -0800)]
i965g: Include gl.h in intel_structs.h.

Include gl.h for OpenGL symbols.

13 years agoi965: Use last vertex convention for quad provoking vertex on sandybridge
Zhenyu Wang [Tue, 4 Jan 2011 07:25:43 +0000 (15:25 +0800)]
i965: Use last vertex convention for quad provoking vertex on sandybridge

Until we know how hw converts quads to polygon in beginning of
3D pipeline, for now unconditionally use last vertex convention.

Fix glean/clipFlat case.

13 years agomesa: Include mtypes.h in renderbuffer.h.
Vinson Lee [Tue, 4 Jan 2011 06:42:12 +0000 (22:42 -0800)]
mesa: Include mtypes.h in renderbuffer.h.

Include mtypes.h for gl_buffer_index symbol.

This is a follow-up to commit 65da73c5f87bc39c76ba9e45945da95fff354308.

13 years agoi965: Correct comment for gen6 fb write control message setting
Zhenyu Wang [Tue, 4 Jan 2011 05:57:16 +0000 (13:57 +0800)]
i965: Correct comment for gen6 fb write control message setting

Remove incorrect headless comment for gen6 fb write message.
Note current SIMD16 mode has already done right for control message.

13 years agoi965: Fix provoking vertex select in clip state for sandybridge
Zhenyu Wang [Tue, 4 Jan 2011 05:46:13 +0000 (13:46 +0800)]
i965: Fix provoking vertex select in clip state for sandybridge

Triangle fan provoking vertex for first convention should be
'vertex 1' in sandybridge clip state.

Partly fix glean/clipFlat case

13 years agomesa: fix AL44 texture fetch function nybble -> float conversion
Brian Paul [Tue, 4 Jan 2011 00:14:21 +0000 (17:14 -0700)]
mesa: fix AL44 texture fetch function nybble -> float conversion

Fixes http://bugs.freedesktop.org/show_bug.cgi?id=32804

13 years agointel: Bump libdrm configure.ac requirement for the gen6 BLT ring support.
Eric Anholt [Mon, 3 Jan 2011 23:04:19 +0000 (15:04 -0800)]
intel: Bump libdrm configure.ac requirement for the gen6 BLT ring support.

13 years agointel: Use tri clears when we don't know how to blit clear the format.
Eric Anholt [Mon, 3 Jan 2011 03:29:20 +0000 (19:29 -0800)]
intel: Use tri clears when we don't know how to blit clear the format.

Bug #32207.  Fixes ARB_texture_rg/fbo-clear-formats (see my
fbo-clear-formats piglit branch currently)

13 years agomesa: Also report the number of renderbuffer alpha bits for GL_LUMINANCE_ALPHA.
Eric Anholt [Mon, 3 Jan 2011 02:12:29 +0000 (18:12 -0800)]
mesa: Also report the number of renderbuffer alpha bits for GL_LUMINANCE_ALPHA.

Noticed by code inspection.

13 years agomesa: Also report renderbuffer red/green size for GL_RED and GL_RG.
Eric Anholt [Mon, 3 Jan 2011 02:11:34 +0000 (18:11 -0800)]
mesa: Also report renderbuffer red/green size for GL_RED and GL_RG.

Noticed by code inspection.

13 years agomesa: Use the common logic for "is this baseformat a color format?"
Eric Anholt [Mon, 3 Jan 2011 01:58:07 +0000 (17:58 -0800)]
mesa: Use the common logic for "is this baseformat a color format?"

When figuring out whether a renderbuffer should be used to set the
visual bits of an FBO, we were missing important baseformats like
GL_RED, GL_RG, and GL_LUMINANCE.

13 years agomesa: Allow color renderbuffers besides just RGB and RGBA.
Eric Anholt [Mon, 3 Jan 2011 02:01:39 +0000 (18:01 -0800)]
mesa: Allow color renderbuffers besides just RGB and RGBA.

We did so already for textures to do ARB_fbo's
GL_ALPHA/GL_LUMINANCE/etc. support and for ARB_texture_rg's GL_RED and
GL_RG, but this path was missed.