summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* meta: replace abort() with _mesa_problem()Brian Paul2012-02-101-1/+2
| | | | Reviewed-by: José Fonseca <[email protected]>
* mesa: fix comment typoBrian Paul2012-02-101-1/+1
|
* st/vdpau: use matrix filter to blur/sharpen videoChristian König2012-02-103-7/+81
| | | | Signed-off-by: Christian König <[email protected]>
* vl: add a matrix/convolution filterChristian König2012-02-103-0/+379
| | | | | | Can be used for gaussian, mean, laplacian, emboss, sharpness... Signed-off-by: Christian König <[email protected]>
* st/vdpau: use median filter for noise reductionChristian König2012-02-103-60/+248
| | | | | | | And while at it implement the rest of the feature querying also. Signed-off-by: Christian König <[email protected]>
* vl: add a median filter for noise reductionChristian König2012-02-103-0/+469
| | | | | | | | This is a shader based median filter, generally used for noise reduction, it could still need some improvements, but should usually work out of the box. Signed-off-by: Christian König <[email protected]>
* i965/gen7: Fix the length of the MULTISAMPLE state packet in the HiZ op.Eric Anholt2012-02-091-1/+1
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/gen7: Fix the length of the DS state packet in the HiZ op.Eric Anholt2012-02-091-1/+1
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* i965/gen7: Fix GPU hangs from the HiZ op.Eric Anholt2012-02-091-2/+3
| | | | | | The wm max threads is in the same dword as the dispatch enable. The hardware gets super angry if you set max threads to 0, even if you aren't dispatching threads.
* glsl: Avoid excessive loop unrolling.Mathias Fröhlich2012-02-091-0/+15
| | | | | | | | | | | | | | | | | | | Avoid unrollong loops that are either nested loops or where the loop body times the unroll count is huge. The change is far from being perfect but it extends the loop unrolling decision heuristic by some additional safeguard. In particular this cuts down compilation of a shader precomputing atmospheric scattering integral tables containing two nesting levels in a loop from something way beyond some minutes (I never waited for it to finish) to some fractions of a second. This fixes piglit tests glsl-fs-unroll-explosion and glsl-vs-unroll-explosion on r600g. Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Mathias Fröhlich <[email protected]>
* mesa: fix maximum allowed proxy texture size conditionAnuj Phogat2012-02-091-11/+11
| | | | | | | | | | | | | | | | | | | | | width, height parameter in glTexImage2D() includes: texture image width + 2 * border (if any). So when doing the texture size check in _mesa_test_proxy_teximage() width and height should not exceed maximum supported size for target texture type + 2 * border. i.e. 1 << (ctx->Const.MaxTextureLevels - 1) + 2 * border Texture border is anyway stripped out before it is given to intel or gallium drivers. This patch fixes Intel oglconform test case: max_values negative.textureSize.textureCube Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44970 Note: This is a candidate for mesa 8.0 branch. Signed-off-by: Anuj Phogat <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: exit the update fragment samplers/textures loops early.Dave Airlie2012-02-092-12/+23
| | | | | | | | | | If we have no more enabled samplers and we've reset all the previously used ones, no need to keep going around this loop. (just moved some stuff around to clean it up a bit). Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/mesa: fixup NDEBUG vs DEBUG causing debug path to get taken.Dave Airlie2012-02-091-3/+3
| | | | | | | From what I can see we were taking the debug path all the time, when we probably only want it for enable debug path. Signed-off-by: Dave Airlie <[email protected]>
* mesa: enable remap table when --enable-shared-glapiChia-I Wu2012-02-091-0/+3
| | | | | | | | | As libGL will use libglapi for function lookups, we need to enable the remap table. Tested-by: Brian Paul <[email protected]> Tested-by: Matt Turner <[email protected]> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45660
* vbo: unmap vertex store before executing listsBrian Paul2012-02-093-12/+40
| | | | | | | | | We don't want our VBOs mapped when we're drawing. This change checks if the vertex store VBO is mapped before we execute a list, unmaps it, then remaps it after drawing. This situation pops up when building a nested display list in GL_COMPILE_AND_EXECUTE mode. Reviewed-by: Eric Anholt <[email protected]>
* gallium: add PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTIONChristoph Bumiller2012-02-0919-16/+52
| | | | | | | Just let the hardware do it if it can and avoid drivers having to check for the special case on each draw call. v2: update the draw module
* dri: Emit a critical error if the swrast driver fails to load.Carl Worth2012-02-081-2/+4
| | | | | | | | | | | | | | | | Something has gone wrong if swrast is requested but cannot be loaded. The user really should be made aware of this, (and instructed to set LIBGL_DEBUG for more details). The wording of this error message is updated from "reverting to indirect rendering" to the more objectively descriptive "failed to load driver: swrast". The former wording makes assumptions about what the calling code will decide to do next, rather than simply describing what went wrong within the current function. The new wording is consistent with the critical errors recently added for hardware drivers that fail to load. Reviewed-by: Eugeni Dodonov <[email protected]>
* dri: Emit a critical error if a named driver fails to load.Carl Worth2012-02-082-0/+4
| | | | | | | | | Something has gone wrong if we were asked to load a driver of a specific name, but it failed to load for some reason. The user really should be made aware of this, (and instructed to set LIBGL_DEBUG for more details). Reviewed-by: Eugeni Dodonov <[email protected]>
* dri: Add a CriticalErrorMessageF macro.Carl Worth2012-02-082-0/+26
| | | | | | | | | | | | | Sometimes an error is so sever that we want to print it even when the user hasn't specifically requested debugging by setting LIBGL_DEBUG. Add a CriticalErrorMessageF macro to be used for this case. (The error message can still be slienced with the existing LIBGL_DEBUG=quiet). For critical error messages we also direct the user to set the LIBGL_DEBUG environment variable for more details. Reviewed-by: Eugeni Dodonov <[email protected]>
* dri: Clarify comments on InfoMessageF and ErrorMessageF macros.Carl Worth2012-02-081-1/+6
| | | | | | | | | | | The description of ErrorMessageF was misleading in the case of LIBGL_DEBUG being unset, (the previous comment could be understood to mean the error should be printed, but the code does not print in this case). InfoMessageF previously had no comment at all. Reviewed-by: Eugeni Dodonov <[email protected]>
* glsl: Fix Android buildChad Versace2012-02-081-0/+1
| | | | | | | | | | | | The build was broken by the line below, added in commit 4f82fed4. s_expression.cpp:26: #include <limits> Mesa's half of the fix is to add 'external/astl/include' to the include path. The other half of the fix requires implementing numeric_limits<float>::infinity() in astl, for which I have patches submitted upstream for review. Signed-off-by: Chad Versace <[email protected]>
* r600g: fix handling of outputs as TEX addr sourcesChristian König2012-02-081-1/+2
| | | | | | | | Outputs should be treated in the same way as inputs and temporaries here. Signed-off-by: Christian König <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* i965: Remove file i965/junk, accidentally added in 7b36c68Chad Versace2012-02-081-0/+0
|
* st/mesa: avoid vertex texture and sampler updates for 0 caseDave Airlie2012-02-082-0/+5
| | | | | | | | | | | If we had no vertex textures or samplers previously and we have none now, don't bother doing the enables dance. I was profiling nexuiz on noop and noticed these two functions in the profile, this drops their usage from 0.86% to 0.03% and 0.23% to 0.03% for texture and samplers. Signed-off-by: Dave Airlie <[email protected]>
* 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.