summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* i965: Remove broken symlink to intel_decode.c.Kenneth Graunke2012-02-071-1/+0
| | | | Eric removed intel_decode.c in 61b9ccd9e298ca1d3db55aee0cb2ff78662d6fa6.
* i965/fs: Implement GL_CLAMP behavior on texture rectangles on gen6+.Eric Anholt2012-02-071-5/+49
| | | | | | | | | | | We were doing saturate-based clamping on the [0,width] or [0,height] coordinate, which meant only the first pixel was addressable. Fixes piglit ARB_texture_rectangle/texwrap-RECT-bordercolor NOTE: This is a candidate for the 8.0 release branch. Reviewed-by: Ian Romanick <[email protected]>
* i965/fs: Move GL_CLAMP handling to coordinate setup.Eric Anholt2012-02-071-29/+21
| | | | | | | | | We should be able to merge self-move instruction into the MRF move anyway, and this simplifies things for the next commit. NOTE: This is a candidate for the 8.0 release branch. Reviewed-by: Ian Romanick <[email protected]>
* i965: Fix HiZ change compiler warning.Eric Anholt2012-02-071-1/+0
|
* i965: Rewrite the HiZ opChad Versace2012-02-0719-517/+1146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The HiZ op was implemented as a meta-op. This patch reimplements it by emitting a special HiZ batch. This fixes several known bugs, and likely a lot of undiscovered ones too. ==== Why the HiZ meta-op needed to die ==== The HiZ op was implemented as a meta-op, which caused lots of trouble. All other meta-ops occur as a result of some GL call (for example, glClear and glGenerateMipmap), but the HiZ meta-op was special. It was called in places that Mesa (in particular, the vbo and swrast modules) did not expect---and were not prepared for---state changes to occur (for example: glDraw; glCallList; within glBegin/End blocks; and within swrast_prepare_render as a result of intel_miptree_map). In an attempt to work around these unexpected state changes, I added two hooks in i965: - A hook for glDraw, located in brw_predraw_resolve_buffers (which is called in the glDraw path). This hook detected if a predraw resolve meta-op had occurred, and would hackishly repropagate some GL state if necessary. This ensured that the meta-op state changes would not intefere with the vbo module's subsequent execution of glDraw. - A hook for glBegin, implemented by brwPrepareExecBegin. This hook resolved all buffers before entering a glBegin/End block, thus preventing an infinitely recurring call to vbo_exec_FlushVertices. The vbo module calls vbo_exec_FlushVertices to flush its vertex queue in response to GL state changes. Unfortunately, these hooks were not sufficient. The meta-op state changes still interacted badly with glPopAttrib (as discovered in bug 44927) and with swrast rendering (as discovered by debugging gen6's swrast fallback for glBitmap). I expect there are more undiscovered bugs. Rather than play whack-a-mole in a minefield, the sane approach is to replace the HiZ meta-op with something safer. ==== How it was killed ==== This patch consists of several logical components: 1. Rewrite the HiZ op by replacing function gen6_resolve_slice with gen6_hiz_exec and gen7_hiz_exec. The new functions do not call a meta-op, but instead manually construct and emit a batch to "draw" the HiZ op's rectangle primitive. The new functions alter no GL state. 2. Add fields to brw_context::hiz for the new HiZ op. 3. Emit a workaround flush when toggling 3DSTATE_VS.VsFunctionEnable. 4. Kill all dead HiZ code: - the function gen6_resolve_slice - the dirty flag BRW_NEW_HIZ - the dead fields in brw_context::hiz - the state packet manipulation triggered by the now removed brw_context::hiz::op - the meta-op workaround in brw_predraw_resolve_buffers (discussed above) - the meta-op workaround brwPrepareExecBegin (discussed above) Note: This is a candidate for the 8.0 branch. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Acked-by: Paul Berry <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43327 Reported-by: [email protected] Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44927 Reported-by: [email protected] Signed-off-by: Chad Versace <[email protected]>
* intel: Avoid divide by zero for very small linear blitsIan Romanick2012-02-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | If size is small (such as 1), pitch = ROUND_DOWN_TO(MIN2(size, (1 << 15) - 1), 4); makes pitch = 0. Then height = size / pitch; causes a division-by-zero exception. If pitch is zero, set height to 1 and avoid the division. This fixes piglit's bin/getteximage-formats test and glean's bufferObject test. NOTE: This is a candidate for the 8.0 release branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44971
* intel: Remove num_mapped_regions assertion from _intel_batchbuffer_flushIan Romanick2012-02-071-7/+0
| | | | | | | | | | | | | | There are cases where a buffer can be mapped while another buffer is flushed. This can happen in the CopyPixels meta-op path for piglit's fbo-mipmap-copypix. After some discussion with Eric, it seems this assertion is no longer necessary, and it has always been too strict. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43328 Cc: Eric Anholt <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* gallium/gbm: r300 and r600 now depend on libdrmTobias Droste2012-02-071-0/+2
| | | | | | fixes undefined references in libradeonwinsys.a when linking Signed-off-by: Tobias Droste <[email protected]>
* r600g: remove unused vars to silence warningsBrian Paul2012-02-071-2/+0
|
* mesa: remove unused _mesa_error_check_format_type() functionBrian Paul2012-02-072-121/+0
| | | | | | | This was only used by glReadPixels and glDrawPixels. Now those functions do the corresponding error checks. Signed-off-by: Brian Paul <[email protected]>
* mesa: stop using _mesa_error_check_format_type() in glReadPixelsBrian Paul2012-02-071-2/+7
| | | | | | | | Basically the same story as the previous commit. But we were already calling _mesa_source_buffer_exists() in ReadPixels(). Yeah, we were calling it twice. Signed-off-by: Brian Paul <[email protected]>
* mesa: stop using _mesa_error_check_format_type() in glDrawPixelsBrian Paul2012-02-071-3/+35
| | | | | | | | | | | | The _mesa_error_check_format_type() function does two things: check that format/type is legal and check that the destination (or source buffer for glReadPixels) actually exists. Just move the relevant parts of that into _mesa_DrawPixels(). We'll do a similar change in glReadPixels then get rid of the function altogether. Signed-off-by: Brian Paul <[email protected]>
* mesa: remove redundant format/type checks in glReadPixels()Brian Paul2012-02-071-35/+0
| | | | | | These are done in _mesa_error_check_format_and_type(). Signed-off-by: Brian Paul <[email protected]>
* mesa: remove redundant format/type checks in glGetTexImage()Brian Paul2012-02-071-34/+0
| | | | | | | The _mesa_error_check_format_and_type() function will catch all those cases now. Signed-off-by: Brian Paul <[email protected]>
* mesa: new _mesa_error_check_format_and_type() functionBrian Paul2012-02-075-94/+178
| | | | | | | | | | | | | | | | | | | | This replaces the _mesa_is_legal_format_and_type() function. According to the spec, some invalid format/type combinations to glDrawPixels, ReadPixels and glTexImage should generate GL_INVALID_ENUM but others should generate GL_INVALID_OPERATION. With the old function we didn't make that distinction and generated GL_INVALID_ENUM errors instead of GL_INVALID_OPERATION. The new function returns one of those errors or GL_NO_ERROR. This will also let us remove some redundant format/type checks in follow-on commit. v2: add more checks for ARB_texture_rgb10_a2ui at the top of _mesa_error_check_format_and_type() per Ian. Signed-off-by: Brian Paul <[email protected]>
* scons: fix typo in package versionDave Airlie2012-02-071-1/+1
| | | | | | pointed out on irc by GArik_ Signed-off-by: Dave Airlie <[email protected]>
* radeon: only init surface manage on r600Dave Airlie2012-02-071-4/+8
| | | | | | r300 fails to init the manager and then fails to init. Signed-off-by: Dave Airlie <[email protected]>
* scons: Require same pkg-config versions as configure.José Fonseca2012-02-072-7/+10
|
* scons: r300/r600 now depends on libdrm.José Fonseca2012-02-075-38/+44
| | | | As they now indirectly include on libdrm/radeon_surface.h.
* mesa: support more format/type combos in _mesa_dump_image()Brian Paul2012-02-061-1/+28
|
* util: fix typo in debug_printf_once commentBrian Paul2012-02-061-1/+1
|
* r600g: add support for common surface allocator for tiling v13Jerome Glisse2012-02-0623-134/+833
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tiled surface have all kind of alignment constraint that needs to be met. Instead of having all this code duplicated btw ddx and mesa use common code in libdrm_radeon this also ensure that both ddx and mesa compute those alignment in the same way. v2 fix evergreen v3 fix compressed texture and workaround cube texture issue by disabling 2D array mode for cubemap (need to check if r7xx and newer are also affected by the issue) v4 fix texture array v5 fix evergreen and newer, split surface values computation from mipmap tree generation so that we can get them directly from the ddx v6 final fix to evergreen tile split value v7 fix mipmap offset to avoid to use random value, use color view depth view to address different layer as hardware is doing some magic rotation depending on the layer v8 fix COLOR_VIEW on r6xx for linear array mode, use COLOR_VIEW on evergreen, align bytes per pixel to a multiple of a dword v9 fix handling of stencil on evergreen, half fix for compressed texture v10 fix evergreen compressed texture proper support for stencil tile split. Fix stencil issue when array mode was clear by the kernel, always program stencil bo. On evergreen depth buffer bo need to be big enough to hold depth buffer + stencil buffer as even with stencil disabled things get written there. v11 rebase on top of mesa, fix pitch issue with 1d surface on evergreen, old ddx overestimate those. Fix linear case when pitch*height < 64. Fix r300g. v12 Fix linear case when pitch*height < 64 for old path, adapt to libdrm API change v13 add libdrm check Signed-off-by: Jerome Glisse <[email protected]>
* Have __glImageSize handle format GL_DEPTH_STENCIL_NV the same way as the ↵Jon TURNEY2012-02-061-0/+1
| | | | | | | | | | | server does There is a mismatch between the way the X server and GLX library calculates the image size for format GL_DEPTH_STENCIL(|_NV|_EXT) See https://bugs.freedesktop.org/show_bug.cgi?id=30102 Signed-off-by: Jon TURNEY <[email protected]>
* st/vdpau: use dst surface size if clip width/height is zeroChristian König2012-02-061-2/+2
| | | | | | Just another fix for gstreamer. Signed-off-by: Christian König <[email protected]>
* st/vdpau: implement vlVdpOutputSurfaceQueryCapabilitiesChristian König2012-02-061-2/+36
| | | | | | | Fixing some problems with gstreamer. Signed-off-by: Christian König <[email protected]> Reviewed-by: Maarten Lankhorst <[email protected]>
* nv50: fix bad assertion on Elements(phi->src) in regallocChristoph Bumiller2012-02-061-1/+1
| | | | The array is phi->src, phi->src[i] is just a pointer.
* dri: Don't build libdricommon.la if we don't need itJon TURNEY2012-02-062-2/+10
| | | | | | | | | | | Refine 80aa78142d12b21dd7d4f0edc786af98a159a80f "dri: make sure to build libdricommon.la" so we don't build libdricommon if we aren't building a dri driver which needs it (i.e. if we are just building swrast) In particular, this restores the ability to build the swrast dri driver without having to have a xf86drm.h Signed-off-by: Jon TURNEY <[email protected]>
* vl: add VL_MAX_SURFACES defineChristian König2012-02-063-2/+4
| | | | Signed-off-by: Christian König <[email protected]>
* vl: rename VL_MAX_PLANES to VL_NUM_COMPONENTSChristian König2012-02-069-44/+44
| | | | Signed-off-by: Christian König <[email protected]>
* vl: prefix size defines with VL_Christian König2012-02-067-64/+65
| | | | Signed-off-by: Christian König <[email protected]>
* vl: remove assert on unknown video profileChristian König2012-02-061-1/+0
| | | | | | | It's perfectly valid to ask for an unknown profile and get unknown code as a result. Signed-off-by: Christian König <[email protected]>
* st/xvmc: respect caps when creating video buffersChristian König2012-02-061-0/+6
| | | | Signed-off-by: Christian König <[email protected]>
* st/vdpau: use interlacing capabilitiesChristian König2012-02-062-1/+15
| | | | | | Recreate video buffer if need arises. Signed-off-by: Christian König <[email protected]>
* st/vdpau: implement uploads to interlaced video buffersChristian König2012-02-061-21/+27
| | | | Signed-off-by: Christian König <[email protected]>
* vl: add interlacing capabilitiesChristian König2012-02-066-1/+34
| | | | | | | Let the driver control interlaced or progressive format of video buffers. Signed-off-by: Christian König <[email protected]>
* vl: add a simple weave deinterlacerChristian König2012-02-062-33/+173
| | | | | | | Well it's not so simple, since it does deinterlacing and scaling at the same time. Signed-off-by: Christian König <[email protected]>
* vl/video_buffer: fix interlaced surface orderingChristian König2012-02-061-7/+13
| | | | Signed-off-by: Christian König <[email protected]>
* vl/video_buffer: fix height of interlaced video buffersChristian König2012-02-061-2/+8
| | | | Signed-off-by: Christian König <[email protected]>
* mesa: check_index_bounds off-by-one fixRoland Scheidegger2012-02-061-1/+1
| | | | | | | | in check_index_bounds the comparison needs to be "greater equal" since contrary to the name _MaxElement is the count of the array (this matches similar code in vbo_exec_DrawRangeElementsBaseVertex). Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix xcb-dri2 link flags leaking into LIBS.Eric Anholt2012-02-041-0/+2
| | | | | | | | Fixes the build of builtin_compiler on my 32-bit build where xcb-dri2 is in a custom prefix but the custom prefix flags weren't available. It shouldn't have been in LIBS anyway. Reviewed-by: Kenneth Graunke <[email protected]>
* intel: check for LLC support when reading mapsEugeni Dodonov2012-02-041-1/+1
| | | | | | | | This checks for advertised LLC support by the GPU instead of relying on the GPU generation for detection. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Eugeni Dodonov <[email protected]>
* intel: verify if hardware has LLC supportEugeni Dodonov2012-02-044-0/+12
| | | | | | | | | Rely on libdrm HAS_LLC parameter to verify if hardware supports it. In case the libdrm version does not supports this check, fallback to older way of detecting it which assumed that GPUs newer than GEN6 have it. Reviewed-by: Kenneth Graunke <[email protected]> Signed-off-by: Eugeni Dodonov <[email protected]>
* draw: fix fog coord export.Dave Airlie2012-02-041-1/+6
| | | | | | | | This does what we do in the hw drivers, and only export the X. fixes the fogcoord.dp* tests. Signed-off-by: Dave Airlie <[email protected]>
* vbo: fix a building errorChih-Wei Huang2012-02-041-0/+2
| | | | | | Signed-off-by: Marek Olšák <[email protected]> NOTE: This is a candidate for the 8.0 branch.
* llvmpipe: Make more resilient to out-of-memory situations.José Fonseca2012-02-031-2/+6
| | | | | | Most of the code was alright, but we were missing a few paths. Reviewed-by: Brian Paul <[email protected]>
* llvmpipe: clear storage for newly allocated resourcesKeith Whitwell2012-02-031-2/+20
| | | | | | Was previously being done in a state-tracker, but in a way which was difficult for some drivers to optimize. Push down to this level and make it the individual drivers responsibility.
* intel: FBOs with texture border are unsupportedIan Romanick2012-02-031-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FBOs differ from textures in a significant way. With textures, we can strip the border and get correct rendering except when the application fetches texels outside [0,1]. With an FBO, the pixel at (0,0) is in the border. The ARB_framebuffer_object spec says: "If the attached image is a texture image, then the window coordinates (x[w], y[w]) correspond to the texel (i, j, k), from figure 3.10 as follows: i = (x[w] - b) j = (y[w] - b) k = (layer - b) where <b> is the texture image's border width..." Since the border doesn't exist, we can never render any pixels in the correct location. Just mark these FBOs FRAMEBUFFER_UNSUPPORTED. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42336
* gallium/dri: Handle xserver that doesn't send needless DRI2 invalidate eventsVille Syrjala2012-02-031-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | Ever since xserver commit 531869448d07e00ae241120b59f3aaaa5709d59c, the server no longer sends invalidate events to clients, unless they have performed a GetBuffers request since the drawable was last invalidated. If the drawable gets invalidated immediately after the GetBuffers request was processed by the X server, it's possible that Xlib will process the invalidate event while waiting for the GetBuffers reply. So the server, thinking the client knows that the buffers are invalid, is waiting for another GetBuffers request before sending any more invalidate events. The client, on the other hand, believes the buffers to be valid, and thus is expecting to receive another invalidate event before it has to send another GetBuffers request. The end result is that the client never again sends a GetBuffers request. To avoid this problem, take a snapshot of the lastStamp before doing GetBuffers, and retry if the snapshot and the current lastStamp no longer match after the GetBuffers reply has been processed. Signed-off-by: Ville Syrjälä <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: Add error case for switch() with two default cases.Eric Anholt2012-02-032-0/+16
| | | | | | | | Fixes piglit switch-case-duplicated.vert. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Throw an error when faced with a duplicated switch() case label.Eric Anholt2012-02-032-0/+27
| | | | | | | | | The error message I chose matches gcc's error. Fixes piglit switch-case-duplicated.vert. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>