Commit Graph

47539 Commits

Author SHA1 Message Date
Vadim Girlin e532c710c6 r600g: move SPI setup to PS setup
SPI semantic indices for PS/VS are now static, so we don't
need to update spi config for every shaders combination. We can move
the functionality of r600_spi_update to r600(evergreen)_pipe_shader_ps.

Flatshade state is now controlled by the global FLAT_SHADE_ENA flag
instead of updating FLAT_SHADE for all inputs.

Sprite coord still requires the update of spi setup when
sprite_coord_enable is first changed from zero (enabled), and then
only when it's changed to other non-zero value (enabled for other input).
Change to zero (disabling) and back to the same value is handled via
global SPRITE_COORD_ENA.

New field "sprite_coord_enable" added to "struct r600_pipe_shader"
to track current state for the pixel shader. It's checked in the
r600_update_derived_state.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-11-05 17:23:29 -04:00
Vadim Girlin 5b27b63de6 r600g: precalculate semantic indices for SPI setup
There is no need to duplicate semantic mapping which is done in hw, so get
rid of r600_find_vs_semantic_index.

TGSI name/sid pair is mapped to the 8-bit semantic index for SPI.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2011-11-05 17:23:22 -04:00
Matt Turner 9f52b876f4 docs: fix grammar and punctuation in llvmpipe docs. 2011-11-05 17:11:59 -04:00
Dave Airlie 7494c814ef gl3.txt: add not of ARB_texture_storage work started. 2011-11-05 17:18:57 +00:00
José Fonseca 65d0c840b0 docs: Update llvmpipe docs.
Recommend LLVM 2.9, it has been working quite well, and unlike earlier
versions, it works out-of-the-box without patches.

Update Windows instructions.
2011-11-05 11:00:06 +00:00
Chia-I Wu 95ef069e1c configure.ac: gbm_gallium requires DRI_LIB_DEPS to link
gbm_gallium does not depend on DRI, but its build rules depend on DRI_LIB_DEPS
being set.  Output an error when the user enables gbm_gallium but disables
DRI.  This is just a workaround.
2011-11-05 15:15:21 +08:00
Chia-I Wu 0c771e260b shared-glapi: fix a linking error for SELinux
Link with -lselinux when SELinux is enabled.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41571
2011-11-05 14:42:05 +08:00
Alex Deucher df121b868a Revert "r600g: precalculate semantic indices for SPI setup"
This reverts commit c15f8569fd.

This breaks r6xx.
2011-11-04 18:33:31 -04:00
Alex Deucher 9212637f34 Revert "r600g: move SPI setup to PS setup"
This reverts commit 9804cf3118.

This breaks r6xx.
2011-11-04 18:32:42 -04:00
Brian Paul 1ca48b3161 svga: fix varying var remapping for unused FS outputs
If the VS has outputs that aren't consumed by the FS we were mapping
them all to one unused VS output index, but that's illegal.  Instead,
map unused VS outputs to unique indexes.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
2011-11-04 16:05:33 -06:00
Brian Paul 0bc15650c1 svga: add comments and reformat code in svga_tgsi_decl_sm30.c 2011-11-04 16:05:33 -06:00
Marek Olšák d2633af696 st/mesa: set geometry shader to NULL when doing internal drawing
The code expects the geometry shader to be NULL.
We don't have geometry shaders now, but it's good to be prepared.

v2: check for support in the cso context
2011-11-04 23:01:47 +01:00
José Fonseca 794c5158b0 mesa/st: Be nice with the stack -- use malloc for large structures/arrays.
st_translate_program's data was taking 51K off the stack, causing stack
overflow on Windows.
2011-11-04 22:01:17 +00:00
George Sapountzis cd86a5d2f8 dri: cosmetic
To smooth minor diff between dri_util & drisw_util
2011-11-04 23:33:06 +02:00
George Sapountzis 2fbba6bb90 dri_util: move drawable functions 2011-11-04 23:33:06 +02:00
George Sapountzis 2314021d60 dri_util: move context functions 2011-11-04 23:33:06 +02:00
George Sapountzis 9292ab7190 dri_util: move context functions 2011-11-04 23:33:05 +02:00
George Sapountzis c98d15c9f5 dri_util: move screen functions
This is to reorder as screen/context/drawable similar to drisw_util
2011-11-04 23:33:05 +02:00
George Sapountzis 3e80a34315 dri: drop stray includes and typedef 2011-11-04 23:33:05 +02:00
George Sapountzis ceda4da857 dri: move __driUtilMessage to xmlconfig.c
__driUtilMessage seems to have fallen out of favor and is only used by xmlconfig.c now
2011-11-04 23:33:05 +02:00
George Sapountzis 78c076e654 dri: drop drisw_util.h 2011-11-04 23:33:04 +02:00
George Sapountzis 96bd41b315 dri: reorder as driver,screen,context,drawable 2011-11-04 23:33:04 +02:00
George Sapountzis e438a36d83 dri: unify __DRIcontextRec, __DRIdrawableRec 2011-11-04 23:33:04 +02:00
George Sapountzis 875a757ddd dri: unify __DRIscreenRec
Also drop DriverAPI field, this is a static symbol and I don't see why it
should be accessed through __DRIscreenRec
2011-11-04 23:33:04 +02:00
George Sapountzis 7192c37294 dri: unify __DriverAPIRec
I dropped the comments because they don't add much.
2011-11-04 23:33:04 +02:00
George Sapountzis fc9e80fab9 dri: drop drmLock remnants 2011-11-04 23:33:03 +02:00
George Sapountzis 721669d078 dri: drop DRI_VALIDATE macros 2011-11-04 23:33:03 +02:00
Marek Olšák c5e48025ed gallium/cso_cache: remove one call to pipe_sampler_view_reference 2011-11-04 21:56:56 +01:00
Vadim Girlin 9804cf3118 r600g: move SPI setup to PS setup
SPI semantic indices for PS/VS are now static, so we don't
need to update spi config for every shaders combination. We can move
the functionality of r600_spi_update to r600(evergreen)_pipe_shader_ps.

Flatshade state is now controlled by the global FLAT_SHADE_ENA flag
instead of updating FLAT_SHADE for all inputs.

Sprite coord still requires the update of spi setup when
sprite_coord_enable is first changed from zero (enabled), and then
only when it's changed to other non-zero value (enabled for other input).
Change to zero (disabling) and back to the same value is handled via
global SPRITE_COORD_ENA.

New field "sprite_coord_enable" added to "struct r600_pipe_shader"
to track current state for the pixel shader. It's checked in the
r600_update_derived_state.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-11-04 16:23:24 -04:00
Vadim Girlin c15f8569fd r600g: precalculate semantic indices for SPI setup
There is no need to duplicate semantic mapping which is done in hw, so get
rid of r600_find_vs_semantic_index.

TGSI name/sid pair is mapped to the 8-bit semantic index for SPI.

Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com>
2011-11-04 16:23:19 -04:00
José Fonseca 2df15d07c0 svga: Tighten the register file assertions.
Untested. But should fix fdo 42576.
2011-11-04 20:10:01 +00:00
Dave Airlie 26ebf9c5e1 radeon/r200: strip texture borders.
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-04 17:17:17 +00:00
Dave Airlie 71f1d468b4 radeon/r200: fix r100/r200 blit to use the offsets.
This is needed to do proper renderbuffer operation on mipmaps.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-04 17:17:17 +00:00
Dave Airlie 2431c992cb radeon: drop mtface/mtlevel, use ones in base class.
This just uses the base class copies.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-11-04 17:17:17 +00:00
Marek Olšák 85c151f3d9 u_vbuf_mgr: avoid one call to pipe_resource_reference in most cases 2011-11-04 18:11:01 +01:00
José Fonseca f800a29ee2 swrast: Avoid void * arithmetic.
An error with MSVC.
2011-11-04 08:54:55 +00:00
Eric Anholt eab201bad4 i965/gen6: Improve glReadPixels() performance by blitting to a linear temp.
The readpixels microbenchmark in mesa-demos goes from 47Mpix/sec at
1000x1000 to 450Mpix/sec.  The 10x10 sizes stay about the same.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:48:07 -07:00
Eric Anholt a1488eec38 intel: Add safety asserts for the blit engine's pitch alignment requirements.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:29:53 -07:00
Eric Anholt ac6a376f52 intel: Don't force a batchbuffer flush in readpixels.
Renderbuffer mapping handles flushing the batchbuffer if required, so
all we need to do is make sure any pending rendering has reached the
batchbuffer.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:29:53 -07:00
Eric Anholt e7349a55f7 radeon: Remove early dereference of src/dst width in glCopyTexSubImage.
There doesn't appear to be any particular reason for this -- it's not
like the width is changing between the deref and the use.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:29:53 -07:00
Eric Anholt d9f2add181 swrast: Drop the global mapping of buffers across glReadPixels().
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:29:53 -07:00
Eric Anholt 5b1ad74824 swrast: Drop the remaining GetRow-based glReadPixels() fast-path.
In all of piglit, only two tests hit it (reading to RGBA float, where
GetRow would drop floats into place from R, RG, or RGB).  Mostly this
is because _ColorReadClamp has been causing transferOps to always be
set, skipping any fast-paths anyway.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:29:53 -07:00
Eric Anholt 91b2ce85d1 swrast: Remove dead _swrast_read_depth_span_uint().
All the code using it is converted to MapRenderbuffer and the core
unpack functions.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:29:53 -07:00
Eric Anholt 345fc41619 swrast: Convert color glReadPixels slow path to using MapRenderbuffer.
This may be a bit slower than before because we're switching from
per-format compiled loops in GetRow to
_mesa_unpack_rgba_block_unpack's loop around a callback to unpack a
pixel.  The solution there would be to make _mesa_unpack_rgba_block
fold the span loop into the format handlers.

(On the other hand, function call overhead will hardly matter if
MapRenderbuffer means the driver gets the data into cacheable memory
instead of uncached).

The adjust_colors code should no longer be required, since the unpack
function does the 565 to float conversion in a single pass instead of
converting it (poorly) through 8888 as apparently happened in the
past.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:29:52 -07:00
Eric Anholt 3e51ef0990 swrast: Skip _swrast_validate_derived in _swrast_ReadPixels().
None of the callgraph below this uses derived state (almost nothing
even dereferences the swrast context).

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:29:52 -07:00
Eric Anholt 2e82daa31b swrast: Add a readpixels fast-path based on memcpy and MapRenderbuffer.
v2: Move _mesa_get_format_bytes out of the loop.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:29:52 -07:00
Eric Anholt 5f140bceda mesa: Add a function for comparing gl_format to format/type.
This should be useful in making more generic fast paths in the pixel
paths.

v2: Add note about PACK_SWAP_BYTES, and fix up for endianness by
    synchronizing with memcpy_texture paths in texstore.c.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:29:52 -07:00
Eric Anholt e887df9bf5 swrast: Switch the remaining depth readpixels to MapRenderbuffer.
This avoids the wrapper, which should improve performance on packed
depth/stencil drivers.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:29:52 -07:00
Eric Anholt d072a5f545 swrast: Switch the remaining depth/stencil readpixels path to MapRenderbuffer.
Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:29:52 -07:00
Eric Anholt f53680857a swrast: MapRenderbuffer in separate depth/stencil readpixels fastpath
This introduces two new span helper functions we'll want to use in
several places as we move to MapRenderbuffer, which pull out integer
depth and stencil values from a renderbuffer mapping based on the
renderbuffer format.

v2: Use format_unpack helper for stencil read.
v3: Clean up comment after conversion to format_unpack.

Reviewed-by: Brian Paul <brianp@vmware.com>
2011-11-03 23:29:52 -07:00