mesa.git
13 years agomesa: include teximage.h to silence warning
Brian Paul [Tue, 11 Jan 2011 16:37:35 +0000 (09:37 -0700)]
mesa: include teximage.h to silence warning

13 years agomesa: do a debug check of _mesa_format_to_type_and_comps()
Brian Paul [Tue, 11 Jan 2011 16:26:03 +0000 (09:26 -0700)]
mesa: do a debug check of _mesa_format_to_type_and_comps()

Make sure that all formats are handled in this function.  It's
easy to miss this function when adding new pixel formats.

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

13 years agomesa: fix a few format table mistakes, assertions
Brian Paul [Tue, 11 Jan 2011 16:23:45 +0000 (09:23 -0700)]
mesa: fix a few format table mistakes, assertions

The BaseFormat field was incorrect for a few R and RG formats.
Fix a couple assertions too.

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

13 years agoglsl: Autogenerate builtin_functions.cpp as part of the build process.
Kenneth Graunke [Fri, 7 Jan 2011 22:30:14 +0000 (14:30 -0800)]
glsl: Autogenerate builtin_functions.cpp as part of the build process.

Python is already necessary for other parts of Mesa, so there's no
reason we can't just generate it.  This patch updates both make and
SCons to do so.

13 years agoglsl: Disallow 'in' and 'out' on globals in GLSL 1.20
Ian Romanick [Sat, 8 Jan 2011 00:05:59 +0000 (16:05 -0800)]
glsl: Disallow 'in' and 'out' on globals in GLSL 1.20

Fixes piglit tests glsl-1.20/compiler/qualifiers/in-01.vert and
glsl-1.20/compiler/qualifiers/out-01.vert and bugzilla #32910.

NOTE: This is a candidate for the 7.9 and 7.10 branches.  This patch
also depends on the previous two commits.

13 years agoglsl: Refresh autogenerated parser file.
Ian Romanick [Sat, 8 Jan 2011 00:04:30 +0000 (16:04 -0800)]
glsl: Refresh autogenerated parser file.

For the previous commit.

13 years agoglsl: Add version_string containing properly formatted GLSL version
Ian Romanick [Sat, 8 Jan 2011 00:03:48 +0000 (16:03 -0800)]
glsl: Add version_string containing properly formatted GLSL version

13 years agoglcpp: Refresh autogenerated lexer and parser files.
Ian Romanick [Tue, 11 Jan 2011 01:38:56 +0000 (17:38 -0800)]
glcpp: Refresh autogenerated lexer and parser files.

For the previous commit.

13 years agoglcpp: Generate an error for division by zero
Ian Romanick [Mon, 10 Jan 2011 21:33:07 +0000 (13:33 -0800)]
glcpp: Generate an error for division by zero

When GCC encounters a division by zero in a preprocessor directive, it
generates an error.  Since the GLSL spec says that the GLSL
preprocessor behaves like the C preprocessor, we should generate that
same error.

It's worth noting that I cannot find any text in the C99 spec that
says this should be an error.  The only text that I can find is line 5
on page 82 (section 6.5.5 Multiplicative Opertors), which says,

    "The result of the / operator is the quotient from the division of
    the first operand by the second; the result of the % operator is
    the remainder. In both operations, if the value of the second
    operand is zero, the behavior is undefined."

Fixes 093-divide-by-zero.c test and bugzilla #32831.

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

13 years agoglcpp: Regenerate glcpp-parse.c
Chad Versace [Tue, 11 Jan 2011 01:09:24 +0000 (17:09 -0800)]
glcpp: Regenerate glcpp-parse.c

13 years agoglcpp: Fix segfault when validating macro redefinitions
Chad Versace [Tue, 11 Jan 2011 00:55:17 +0000 (16:55 -0800)]
glcpp: Fix segfault when validating macro redefinitions

In _token_list_equal_ignoring_space(token_list_t*, token_list_t*), add
a guard that prevents dereferncing a null token list.

This fixes test src/glsl/glcpp/tests/092-redefine-macro-error-2.c and
Bugzilla #32695.

13 years agoi965: Use a new miptree to avoid software fallbacks due to drawing offset.
Eric Anholt [Mon, 10 Jan 2011 23:45:28 +0000 (15:45 -0800)]
i965: Use a new miptree to avoid software fallbacks due to drawing offset.

When attaching a small mipmap level to an FBO, the original gen4
didn't have the bits to support rendering to it.  Instead of falling
back, just blit it to a new little miptree just for it, and let it get
revalidated into the stack later just like any other new teximage.

Bug #30365.

13 years agointel: Drop the speculatively-use-firstImage-mt in validation.
Eric Anholt [Mon, 10 Jan 2011 22:05:20 +0000 (14:05 -0800)]
intel: Drop the speculatively-use-firstImage-mt in validation.

It's been replaced by just setting texObj->mt to image->mt at TexImage
time.

13 years agointel: Don't relayout the texture on maxlevel change.
Eric Anholt [Mon, 10 Jan 2011 22:03:39 +0000 (14:03 -0800)]
intel: Don't relayout the texture on maxlevel change.

This avoids relayouts in the common case of glGenerateMipmap() or
people doing similar things.

Bug #30366.

13 years agointel: When making a new teximage miptree, make a full one.
Eric Anholt [Mon, 10 Jan 2011 20:05:14 +0000 (12:05 -0800)]
intel: When making a new teximage miptree, make a full one.

If we hit this path, we're level 1+ and the base level got allocated
as a single level instead of a full tree (so we don't match
intelObj->mt).  This tries to recover from that so that we end up with
2 allocations and 1 validation blit (old -> new) instead of
allocations equal to number of levels and levels - 1 blits.

13 years agometa: Don't tweak BaseLevel when doing glGenerateMipmap().
Eric Anholt [Mon, 10 Jan 2011 18:50:36 +0000 (10:50 -0800)]
meta: Don't tweak BaseLevel when doing glGenerateMipmap().

We don't need to worry about levels other than MaxLevel because we're
minifying -- the lower levels (higher detail) won't contribute to the
result.  By changing BaseLevel, we forced hardware that doesn't
support BaseLevel != 0 to relayout the texture object.

13 years agoRevert "intel: Always allocate miptrees from level 0, not tObj->BaseLevel."
Eric Anholt [Mon, 10 Jan 2011 18:01:12 +0000 (10:01 -0800)]
Revert "intel: Always allocate miptrees from level 0, not tObj->BaseLevel."

This reverts commit 7ce6517f3ac41bf770ab39aba4509d4f535ef663.
This reverts commit d60145d06d999c5c76000499e6fa9351e11d17fa.

I was wrong about which generations supported baselevel adjustment --
it's just gen4, nothing earlier.  This meant that i915 would have
never used the mag filter when baselevel != 0.  Not a severe bug, but
not an intentional regression.  I think we can fix the performance
issue another way.

13 years agoi965: Add #defines for HiZ and separate stencil buffer commands.
Kenneth Graunke [Mon, 10 Jan 2011 22:31:28 +0000 (14:31 -0800)]
i965: Add #defines for HiZ and separate stencil buffer commands.

13 years agoi965: Add new HiZ related bits to WM_STATE.
Kenneth Graunke [Thu, 21 Oct 2010 23:43:39 +0000 (16:43 -0700)]
i965: Add new HiZ related bits to WM_STATE.

13 years agoi965: Rename more #defines to 3DSTATE rather than CMD or CMD_3D.
Kenneth Graunke [Mon, 10 Jan 2011 22:04:02 +0000 (14:04 -0800)]
i965: Rename more #defines to 3DSTATE rather than CMD or CMD_3D.

Again, this makes it match the documentation.

13 years agoi965: Remove unused #defines which only contain the sub-opcode.
Kenneth Graunke [Mon, 10 Jan 2011 21:36:23 +0000 (13:36 -0800)]
i965: Remove unused #defines which only contain the sub-opcode.

Most _3DSTATE defines contain the command type, sub-type, opcode, and
sub-opcode (i.e. 0x7905).  These, however, contain only the sub-opcode
(i.e. 0x05).  Since they are inconsistent with the rest of the code and
nothing uses them, simply delete them.

The _3DOP and _3DCONTROL defines seemed similar, and were also unused.

13 years agoglsl: At link-time, check that globals have matching centroid qualifiers
Chad Versace [Mon, 10 Jan 2011 23:29:30 +0000 (15:29 -0800)]
glsl: At link-time, check that globals have matching centroid qualifiers

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

13 years agoAdd GLX_TLS setting to configs/default.
Tom Fogal [Mon, 10 Jan 2011 22:37:26 +0000 (15:37 -0700)]
Add GLX_TLS setting to configs/default.

Should have gone in with 31351dc029ff0e12a250e3ffc509f4f01e025a24,
thanks to Dan Nicholson for noticing.

13 years agomesa/swrast: handle sRGB FBOs correctly (v2)
Dave Airlie [Mon, 10 Jan 2011 03:37:38 +0000 (13:37 +1000)]
mesa/swrast: handle sRGB FBOs correctly (v2)

From reading EXT_texture_sRGB and EXT_framebuffer_sRGB and interactions
with FBO I've found that swrast is converting the sRGB values to linear for
blending when an sRGB texture is bound as an FBO. According to the spec
and further explained in the framebuffer_sRGB spec this behaviour is not
required unless the GL_FRAMEBUFFER_SRGB is enabled and the Visual/config
exposes GL_FRAMEBUFFER_SRGB_CAPABLE_EXT.

This patch fixes swrast to use a separate Fetch call for FBOs bound to
SRGB and avoid the conversions.

v2: export _mesa_get_texture_dimensions as per Brian's comments.

Signed-off-by: Dave Airlie <airlied@redhat.com>
13 years agoExport TLS support in gl.pc.
Tom Fogal [Mon, 6 Dec 2010 00:58:32 +0000 (17:58 -0700)]
Export TLS support in gl.pc.

13 years agor300g: add debug option for buffer upload logging
Marek Olšák [Sun, 9 Jan 2011 21:40:50 +0000 (22:40 +0100)]
r300g: add debug option for buffer upload logging

13 years agost/egl: Fix a void pointer arithmetic warning.
Chia-I Wu [Sun, 9 Jan 2011 10:18:03 +0000 (18:18 +0800)]
st/egl: Fix a void pointer arithmetic warning.

13 years agomesa: Remove GLES overlay.
Chia-I Wu [Fri, 7 Jan 2011 09:24:16 +0000 (17:24 +0800)]
mesa: Remove GLES overlay.

With core mesa doing runtime API checks, GLES overlay is no longer
needed.  Make --enable-gles-overlay equivalent to --enable-gles[12].
There may still be places where compile-time checks are done.  They
could be fixed case by case.

13 years agoegl: Make egl_dri2 and egl_glx built-in drivers.
Chia-I Wu [Fri, 7 Jan 2011 08:30:08 +0000 (16:30 +0800)]
egl: Make egl_dri2 and egl_glx built-in drivers.

These two drivers are small in size.  Making them built-in should
simplify packaging.

13 years agoegl_glx: Load libGL dynamically.
Chia-I Wu [Fri, 7 Jan 2011 05:42:15 +0000 (13:42 +0800)]
egl_glx: Load libGL dynamically.

This is a step forward for compatibility with really old GLX.  But the
real reason for making this change now is so that we can make egl_glx a
built-in driver without having to link to libGL.

13 years agoegl_dri2: Look up _glapi_get_proc_address dynamically.
Chia-I Wu [Fri, 7 Jan 2011 07:02:41 +0000 (15:02 +0800)]
egl_dri2: Look up _glapi_get_proc_address dynamically.

In preparation for making egl_dri2 built-in.  It also handles

  symbol lookup error: /usr/local/lib/egl/egl_dri2.so: undefined symbol:
  _glapi_get_proc_address

more gracefully.

13 years agor600: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Mon, 10 Jan 2011 02:29:02 +0000 (18:29 -0800)]
r600: Include mfeatures.h in files that perform feature tests.

13 years agor300: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Mon, 10 Jan 2011 02:25:36 +0000 (18:25 -0800)]
r300: Include mfeatures.h in files that perform feature tests.

13 years agor200: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Mon, 10 Jan 2011 02:22:07 +0000 (18:22 -0800)]
r200: Include mfeatures.h in files that perform feature tests.

13 years agonoop: make noop useable like trace or rbug
Jerome Glisse [Mon, 10 Jan 2011 02:04:41 +0000 (21:04 -0500)]
noop: make noop useable like trace or rbug

If you want to enable noop set GALLIUM_NOOP=1 as an env variable.
You need first to enable noop wrapping for your driver see change
to src/gallium/targets/dri-r600/ in this commit as an example.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
13 years agor300g: do not upload the same user buffer several times
Marek Olšák [Sun, 9 Jan 2011 11:15:15 +0000 (12:15 +0100)]
r300g: do not upload the same user buffer several times

Performance++.

13 years agonvc0: implement queries
Christoph Bumiller [Sun, 9 Jan 2011 20:50:06 +0000 (21:50 +0100)]
nvc0: implement queries

13 years agodri2: release texture image.
Juan Zhao [Sun, 9 Jan 2011 17:03:02 +0000 (12:03 -0500)]
dri2: release texture image.

Add release function for texture_from_pixmap extension.
Some platform need to release texture image for texture_from_pixmap
extension, add this interface for those platforms.

13 years agoradeon: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Sun, 9 Jan 2011 09:45:04 +0000 (01:45 -0800)]
radeon: Include mfeatures.h in files that perform feature tests.

13 years agodri/nouveau: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Sun, 9 Jan 2011 09:33:14 +0000 (01:33 -0800)]
dri/nouveau: Include mfeatures.h in files that perform feature tests.

13 years agointel: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Sun, 9 Jan 2011 09:25:54 +0000 (01:25 -0800)]
intel: Include mfeatures.h in files that perform feature tests.

13 years agovbo: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Sun, 9 Jan 2011 09:18:23 +0000 (01:18 -0800)]
vbo: Include mfeatures.h in files that perform feature tests.

13 years agost/mesa: Include mfeatures.h in files that perform feature tests.
Vinson Lee [Sun, 9 Jan 2011 09:04:19 +0000 (01:04 -0800)]
st/mesa: Include mfeatures.h in files that perform feature tests.

13 years agomesa: Include mfeatures.h in program.c.
Vinson Lee [Sun, 9 Jan 2011 08:47:33 +0000 (00:47 -0800)]
mesa: Include mfeatures.h in program.c.

Include mfeatures.h for feature tests.

13 years agoi965g: fix warnings
Dave Airlie [Sun, 9 Jan 2011 07:25:12 +0000 (17:25 +1000)]
i965g: fix warnings

13 years agoi965g: update intel_decode from upstream.
Dave Airlie [Sat, 1 Jan 2011 05:03:45 +0000 (15:03 +1000)]
i965g: update intel_decode from upstream.

13 years agoi965g: update disassembler code from classic.
Dave Airlie [Fri, 31 Dec 2010 02:24:35 +0000 (12:24 +1000)]
i965g: update disassembler code from classic.

still a bit of work to do, the winsys gen setting is a bit of a hack.

13 years agoi965g: update brw_defines.h from classic driver
Dave Airlie [Fri, 31 Dec 2010 02:01:45 +0000 (12:01 +1000)]
i965g: update brw_defines.h from classic driver

13 years agoi965g: update brw_structs.h from classic driver.
Dave Airlie [Thu, 30 Dec 2010 09:26:14 +0000 (19:26 +1000)]
i965g: update brw_structs.h from classic driver.

13 years agoi965g: update to similiar gen stuff as i965
Dave Airlie [Thu, 30 Dec 2010 09:16:16 +0000 (19:16 +1000)]
i965g: update to similiar gen stuff as i965

13 years agor300g: fix crash when flushing ZMASK
Marek Olšák [Sun, 9 Jan 2011 04:34:36 +0000 (05:34 +0100)]
r300g: fix crash when flushing ZMASK

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

The fix is to call update_derived_state before user buffer uploads.
I've also moved some code around.

Unfortunately, there are still some ZMASK-related bugs which cause
misrendering, i.e. flushing doesn't always work and glean/fbo fails.

13 years agotargets/egl: add libnvc0.a to nouveau libs
Marcin Slusarz [Sat, 8 Jan 2011 23:46:35 +0000 (00:46 +0100)]
targets/egl: add libnvc0.a to nouveau libs

13 years agonvfx,nv50: pipe_reference the constant buffers
Christoph Bumiller [Sat, 8 Jan 2011 14:40:14 +0000 (15:40 +0100)]
nvfx,nv50: pipe_reference the constant buffers

13 years agonvc0: fix primitive restart in immediate mode
Christoph Bumiller [Sat, 8 Jan 2011 13:24:14 +0000 (14:24 +0100)]
nvc0: fix primitive restart in immediate mode

13 years agomesa: Clean up header file inclusion in cpuinfo.c.
Vinson Lee [Sat, 8 Jan 2011 11:03:17 +0000 (03:03 -0800)]
mesa: Clean up header file inclusion in cpuinfo.c.

13 years agor300g: fix a surface leak when flushing ZMASK
Marek Olšák [Sat, 8 Jan 2011 08:42:17 +0000 (09:42 +0100)]
r300g: fix a surface leak when flushing ZMASK

13 years agor300g: rework command submission and resource space checking
Marek Olšák [Sat, 4 Dec 2010 03:38:15 +0000 (04:38 +0100)]
r300g: rework command submission and resource space checking

The motivation behind this rework is to get some speed by reducing
CPU overhead. The performance increase depends on many factors,
but it's measurable (I think it's about 10% increase in Torcs).

This commit replaces libdrm's radeon_cs_gem with our own implemention.
It's optimized specifically for r300g, but r600g could use it as well.
Reloc writes and space checking are faster and simpler than their
counterparts in libdrm (the time complexity of all the functions
is O(1) in nearly all scenarios, thanks to hashing).
(libdrm's radeon_bo_gem is still being used in the driver.)

It works like this:

cs_add_reloc(cs, buf, read_domain, write_domain) adds a new relocation and
also adds the size of 'buf' to the used_gart and used_vram winsys variables
based on the domains, which are simply or'd for the accounting purposes.
The adding is skipped if the reloc is already present in the list, but it
accounts any newly-referenced domains.

cs_validate is then called, which just checks:
    used_vram/gart < vram/gart_size * 0.8
The 0.8 number allows for some memory fragmentation. If the validation
fails, the pipe driver flushes CS and tries do the validation again,
i.e. it validates only that one operation. If it fails again, it drops
the operation on the floor and prints some nasty message to stderr.

cs_write_reloc(cs, buf) just writes a reloc that has been added using
cs_add_reloc. The read_domain and write_domain parameters have been removed,
because we already specify them in cs_add_reloc.

The space checking has been tested by putting small values in vram/gart_size
variables.

13 years agointel: Make renderbuffer tiling choice match texture tiling choice.
Eric Anholt [Sat, 8 Jan 2011 02:18:50 +0000 (18:18 -0800)]
intel: Make renderbuffer tiling choice match texture tiling choice.

There really shouldn't be any difference between the two for us.
Fixes a bug where Z16 renderbuffers would be untiled on gen6, likely
leading to hangs.

13 years agointel: Use the _BaseFormat from MESA_FORMAT_* in renderbuffer setup.
Eric Anholt [Sat, 8 Jan 2011 02:14:37 +0000 (18:14 -0800)]
intel: Use the _BaseFormat from MESA_FORMAT_* in renderbuffer setup.

13 years agodocs: fix messed up names with special characters in relnotes-7.9.1
Marek Olšák [Sat, 8 Jan 2011 01:54:51 +0000 (02:54 +0100)]
docs: fix messed up names with special characters in relnotes-7.9.1
(cherry picked from commit 67aeab0b77fb6be864088e69ea74a010b6543fa1)

13 years agodocs: fix messed up names with special characters in relnotes-7.10
Marek Olšák [Sat, 8 Jan 2011 02:06:04 +0000 (03:06 +0100)]
docs: fix messed up names with special characters in relnotes-7.10
(cherry picked from commit 36009724fdd652ab29aa928ba78891afd650e768)

13 years agoi915: Drop old checks for the settexoffset hack.
Eric Anholt [Sat, 8 Jan 2011 00:37:17 +0000 (16:37 -0800)]
i915: Drop old checks for the settexoffset hack.

13 years agoi915: Don't claim to support AL1616 when neither 830 nor 915 does it.
Eric Anholt [Sat, 8 Jan 2011 00:13:12 +0000 (16:13 -0800)]
i915: Don't claim to support AL1616 when neither 830 nor 915 does it.

Fixes an abort in fbo-generatemipmap-formats.

13 years agointel: Add a vtbl hook for determining if a format is renderable.
Eric Anholt [Fri, 7 Jan 2011 23:45:33 +0000 (15:45 -0800)]
intel: Add a vtbl hook for determining if a format is renderable.

By relying on just intel_span_supports_format, some formats that
aren't supported pre-gen4 were not reporting FBO incomplete.  And we
also complained in stderr when it happened on i915 because draw_region
gets called before framebuffer completeness validation.

13 years agointel: expose ARB_framebuffer_object in the i915 driver.
Eric Anholt [Fri, 7 Jan 2011 23:15:49 +0000 (15:15 -0800)]
intel: expose ARB_framebuffer_object in the i915 driver.

ARB_fbo no longer disallows mismatched width/height on attachments
(shouldn't be any problem), mixed format color attachments (we only
support 1), and L/A/LA/I color attachments (we already reject them on
965 too).  It requires Gen'ed names (driver doesn't care), and adds
FramebufferTextureLayer (we don't do texture arrays).  So it looks
like we're already in the position we need to be for this extension.

Bug #27468, #32381.

13 years agonvc0: fix reloc domain conflict on buffer migration
Christoph Bumiller [Fri, 7 Jan 2011 23:29:41 +0000 (00:29 +0100)]
nvc0: fix reloc domain conflict on buffer migration

Occurred because the code assumed that buf->domain would remain
equal to old_domain.

13 years agonvc0: upload user buffers only from draw info min to max index
Christoph Bumiller [Fri, 7 Jan 2011 23:49:17 +0000 (00:49 +0100)]
nvc0: upload user buffers only from draw info min to max index

There are actually applications that profit immensely from this.

13 years agonvc0: fix emission of first 3 u8 indices to RING_NI
Christoph Bumiller [Fri, 7 Jan 2011 23:20:53 +0000 (00:20 +0100)]
nvc0: fix emission of first 3 u8 indices to RING_NI

13 years agonvc0: reset mt transfer address after read loop over layers
Christoph Bumiller [Thu, 6 Jan 2011 15:11:36 +0000 (16:11 +0100)]
nvc0: reset mt transfer address after read loop over layers

13 years agonvc0: tie buffer memory release to the buffer fence
Christoph Bumiller [Wed, 5 Jan 2011 00:41:49 +0000 (01:41 +0100)]
nvc0: tie buffer memory release to the buffer fence

... instead of the next fence to be emitted. This way we have a
chance to reclaim the storage earlier.

13 years agor300g: Remove invalid assertion.
Łukasz Krotowski [Fri, 7 Jan 2011 23:46:38 +0000 (00:46 +0100)]
r300g: Remove invalid assertion.

Invalid after be1af4394e060677b7db6bbb8e3301e38a3363da (user buffer
creation with width0 == ~0).

Signed-off-by: Marek Olšák <maraeo@gmail.com>
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.