Commit Graph

41786 Commits

Author SHA1 Message Date
Kenneth Graunke 6c5e6cd130 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.
2011-01-10 15:44:32 -08:00
Chad Versace 61428dd2ab glsl: At link-time, check that globals have matching centroid qualifiers
Fixes bug 31923: http://bugs.freedesktop.org/show_bug.cgi?id=31923
2011-01-10 15:29:30 -08:00
Tom Fogal 0e3ff159f9 Add GLX_TLS setting to configs/default.
Should have gone in with 31351dc029,
thanks to Dan Nicholson for noticing.
2011-01-10 15:39:21 -07:00
Dave Airlie a988ddf379 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>
2011-01-11 08:32:33 +10:00
Tom Fogal 31351dc029 Export TLS support in gl.pc. 2011-01-10 12:34:02 -07:00
Marek Olšák 9d33e4e16c r300g: add debug option for buffer upload logging 2011-01-10 05:45:10 +01:00
Chia-I Wu 97e9a0e23f st/egl: Fix a void pointer arithmetic warning. 2011-01-10 11:51:13 +08:00
Chia-I Wu 12583174c5 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.
2011-01-10 11:50:35 +08:00
Chia-I Wu c98ea26e16 egl: Make egl_dri2 and egl_glx built-in drivers.
These two drivers are small in size.  Making them built-in should
simplify packaging.
2011-01-10 11:50:34 +08:00
Chia-I Wu 15f0223931 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.
2011-01-10 11:25:31 +08:00
Chia-I Wu fef5d14494 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.
2011-01-10 11:23:24 +08:00
Vinson Lee 231ca0ec85 r600: Include mfeatures.h in files that perform feature tests. 2011-01-09 18:29:02 -08:00
Vinson Lee c45814d6d3 r300: Include mfeatures.h in files that perform feature tests. 2011-01-09 18:25:36 -08:00
Vinson Lee 7a1cdef6c4 r200: Include mfeatures.h in files that perform feature tests. 2011-01-09 18:22:07 -08:00
Jerome Glisse 3349517351 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>
2011-01-09 21:04:41 -05:00
Marek Olšák ac6306e9ca r300g: do not upload the same user buffer several times
Performance++.
2011-01-09 22:43:41 +01:00
Christoph Bumiller b3d8e1fb3b nvc0: implement queries 2011-01-09 21:50:06 +01:00
Juan Zhao e59fa4c46c 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.
2011-01-09 14:55:16 -05:00
Vinson Lee fb9c6e681f radeon: Include mfeatures.h in files that perform feature tests. 2011-01-09 01:45:04 -08:00
Vinson Lee 1933e97034 dri/nouveau: Include mfeatures.h in files that perform feature tests. 2011-01-09 01:33:14 -08:00
Vinson Lee 45a56e4730 intel: Include mfeatures.h in files that perform feature tests. 2011-01-09 01:25:54 -08:00
Vinson Lee 14b36cd568 vbo: Include mfeatures.h in files that perform feature tests. 2011-01-09 01:18:23 -08:00
Vinson Lee edc09358f7 st/mesa: Include mfeatures.h in files that perform feature tests. 2011-01-09 01:04:19 -08:00
Vinson Lee 21750a2d9d mesa: Include mfeatures.h in program.c.
Include mfeatures.h for feature tests.
2011-01-09 00:47:33 -08:00
Dave Airlie 97195d04fd i965g: fix warnings 2011-01-09 17:25:12 +10:00
Dave Airlie 5e044e3900 i965g: update intel_decode from upstream. 2011-01-09 17:21:52 +10:00
Dave Airlie 3ee8d13c00 i965g: update disassembler code from classic.
still a bit of work to do, the winsys gen setting is a bit of a hack.
2011-01-09 17:21:10 +10:00
Dave Airlie 9562284114 i965g: update brw_defines.h from classic driver 2011-01-09 17:21:10 +10:00
Dave Airlie 571b317d02 i965g: update brw_structs.h from classic driver. 2011-01-09 17:21:10 +10:00
Dave Airlie 5826967d2e i965g: update to similiar gen stuff as i965 2011-01-09 17:21:10 +10:00
Marek Olšák 3332229b3b 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.
2011-01-09 06:14:23 +01:00
Marcin Slusarz 69191d4123 targets/egl: add libnvc0.a to nouveau libs 2011-01-09 00:46:35 +01:00
Christoph Bumiller 90e29afcb6 nvfx,nv50: pipe_reference the constant buffers 2011-01-08 15:40:14 +01:00
Christoph Bumiller 703f3597ad nvc0: fix primitive restart in immediate mode 2011-01-08 14:25:20 +01:00
Vinson Lee d8cfe46442 mesa: Clean up header file inclusion in cpuinfo.c. 2011-01-08 03:03:17 -08:00
Marek Olšák 7c16a77b00 r300g: fix a surface leak when flushing ZMASK 2011-01-08 09:42:17 +01:00
Marek Olšák 1f0348c4a2 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.
2011-01-08 07:05:42 +01:00
Eric Anholt 29c4f95cbc 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.
2011-01-07 18:25:54 -08:00
Eric Anholt 8f593597fc intel: Use the _BaseFormat from MESA_FORMAT_* in renderbuffer setup. 2011-01-07 18:25:54 -08:00
Marek Olšák aa6456dcd1 docs: fix messed up names with special characters in relnotes-7.9.1
(cherry picked from commit 67aeab0b77fb6be864088e69ea74a010b6543fa1)
2011-01-08 03:10:18 +01:00
Marek Olšák 8d61a3f408 docs: fix messed up names with special characters in relnotes-7.10
(cherry picked from commit 36009724fdd652ab29aa928ba78891afd650e768)
2011-01-08 03:09:47 +01:00
Eric Anholt 5df51c2bb0 i915: Drop old checks for the settexoffset hack. 2011-01-07 17:49:03 -08:00
Eric Anholt 372dc4cd6c i915: Don't claim to support AL1616 when neither 830 nor 915 does it.
Fixes an abort in fbo-generatemipmap-formats.
2011-01-07 17:49:03 -08:00
Eric Anholt a7bf723056 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.
2011-01-07 17:49:03 -08:00
Eric Anholt f3240547f9 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.
2011-01-07 17:49:03 -08:00
Christoph Bumiller 8b2a46c0de nvc0: fix reloc domain conflict on buffer migration
Occurred because the code assumed that buf->domain would remain
equal to old_domain.
2011-01-08 02:14:00 +01:00
Christoph Bumiller b2a79953a6 nvc0: upload user buffers only from draw info min to max index
There are actually applications that profit immensely from this.
2011-01-08 02:13:54 +01:00
Christoph Bumiller 64b639959f nvc0: fix emission of first 3 u8 indices to RING_NI 2011-01-08 02:13:10 +01:00
Christoph Bumiller f5f086ca92 nvc0: reset mt transfer address after read loop over layers 2011-01-08 02:12:56 +01:00
Christoph Bumiller bd301dfc12 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.
2011-01-08 02:12:20 +01:00