summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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: 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-0622-133/+830
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-061-1/+5
| | | | | | | | | | | 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]>
* 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]>
* glsl: Add other missing error location information for switch statements.Eric Anholt2012-02-031-0/+4
| | | | | | NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Add missing location info to case labels.Eric Anholt2012-02-031-0/+2
| | | | | | | | Otherwise, the upcoming error messages said the location was 0:0(0). NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Throw the required error when a case label is a non-constant.Eric Anholt2012-02-031-2/+14
| | | | | | | | | | | | It's not quite spelled out in the spec text, but the grammar indicates that only constant values are allowed as switch() case labels (and only constant values make sense, anyway). Fixes piglit glsl-1.30/compiler/switch-statement/switch-case-uniform-int.vert. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>
* glsl: Save and restore the whole switch state for nesting.Eric Anholt2012-02-033-260/+255
| | | | | | | | | This stuffs them all in a struct for sanity. Fixes piglit glsl-1.30/execution/switch/fs-uniform-nested. NOTE: This is a candidate for the 8.0 branch. Reviewed-by: Ian Romanick <[email protected]>
* dri: Add Unigine Tropics as an app that requires the GLSL warn workaround.Eric Anholt2012-02-031-0/+3
| | | | | | | I wasn't seeing it be needed because of the previous bug. Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eugeni Dodonov <[email protected]>
* dri: Fix typo in xml file that made all applications use the workaround.Eric Anholt2012-02-031-1/+1
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Eugeni Dodonov <[email protected]>
* mesa: Fix the error message function names for glFlushMappedBufferRange().Eric Anholt2012-02-031-7/+7
| | | | Reviewed-by: Brian Paul <[email protected]>
* mesa: Fix bad-enum/no-buffer error handling for buffer object functions.Eric Anholt2012-02-031-87/+39
| | | | | | | | | | | | | | | For all the extension entrypoints using the get_buffer() helper, they wanted the same error handling. In some cases, the error was doing the same error return whether target was a bad enum, or a user buffer wasn't bound. (Actually, GL_ARB_map_buffer_range doesn't specify the error for a zero buffer being bound for MapBufferRange, though it does for FlushMappedBufferRange. This appears to be an oversight). Fixes piglit GL_ARB_copy_buffer/negative-bound-zero. Reviewed-by: Brian Paul <[email protected]>
* glsl: move array_sizing_visitor class outside of link_intrastage_shaders()Brian Paul2012-02-021-16/+22
| | | | | | To silence warnings with gcc 4.4.x on Linux and llvm-g++ 4.2 on Mac. Reviewed-by: Kenneth Graunke <[email protected]>
* gallium/postprocess: move declarations before codeBrian Paul2012-02-021-2/+1
| | | | To fix MSVC build.
* gallium/postprocess: Just to be safe, reference all buffers from outsideLauri Kasanen2012-02-021-0/+10
| | | | | | | | | Even though it should be safe to use them for one frame, better be sure. Suggested by Michael Dänzer. NOTE: This is a candidate for the 8.0 stable branch. Signed-off-by: Lauri Kasanen <[email protected]>
* gallium/postprocess: Fix depth logicLauri Kasanen2012-02-024-11/+4
| | | | | | | | | This prevents a possible lapse of the depth buffer - the situation where the app and pp have different depth buffers. NOTE: This is a candidate for the 8.0 stable branch. Signed-off-by: Lauri Kasanen <[email protected]>
* glsl: Avoid ralloc_stealing a long-lived object to a short-lived parentCarl Worth2012-02-021-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit 6ecee54a9aecc120cb68b02f7e14dcac86b9eca2 a call to talloc_reference was replaced with a call to talloc_steal. This was in preparation for moving to ralloc which doesn't support reference counting. The justification for talloc_steal within token_list_append in that commit is that the tokens are being copied already. But the copies are shallow, so this does not work. Fortunately, the lifetime of these tokens is easy to understand. A token list for "replacements" is created and stored in a hash table when a function-like macro is defined. This list will live until the macro is #undefed (if ever). Meanwhile, a shallow copy of the list is created when the macro is used and the list expanded. This copy is short-lived, so is unsuitable as a new parent. So we can just let the original, longer-lived owner continue to own the underlying objects and things will work. This fixes bug #45082: "ralloc.c:78: get_header: Assertion `info->canary == 0x5A1106' failed." when using a macro in GLSL https://bugs.freedesktop.org/show_bug.cgi?id=45082 Reviewed-by: Kenneth Graunke <[email protected]> NOTE: This is a candidate for stable release branches.
* glsl: Add glcpp tests for a macro used twiceCarl Worth2012-02-022-0/+33
| | | | | | | | | | | | | This test cases exposes a bug as described in this bug report: "ralloc.c:78: get_header: Assertion `info->canary == 0x5A1106' failed." when using a macro in GLSL https://bugs.freedesktop.org/show_bug.cgi?id=45082 Clearly, some memory is getting (incorrectly) freed on the first macro invocation, leading to problems with the second macro invocation. Reviewed-by: Kenneth Graunke <[email protected]>
* glcpp: Fix so that trailing punctuation does not prevent macro expansionCarl Worth2012-02-021-1/+9
| | | | | | | | | | | | | | | | | | | | The trick here is that flex always chooses the rule that matches the most text. So with a input text of "two:" which we want to be lexed as an IDENTIFIER token "two" followed by an OTHER token ":" the previous OTHER rule would match longer as a single token of "two:" which we don't want. We prevent this by forcing the OTHER pattern to never match any characters that appear in other constructs, (no letters, numbers, #, _, whitespace, nor any punctuation that appear in CPP operators). Fixes bug #44764: GLSL preprocessor doesn't replace defines ending with ":" https://bugs.freedesktop.org/show_bug.cgi?id=44764 Reviewed-by: Kenneth Graunke <[email protected]> NOTE: This is a candidate for stable release branches.
* glcpp: Add new test showing bug where a trailing ':' prevents macro expansionCarl Worth2012-02-022-0/+15
| | | | | | | | | | | This demonstrates a bug that was recently triggered in piglit. Here is the original bug report (containing a test case almost identical to this one): https://bugs.freedesktop.org/show_bug.cgi?id=44764 Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix copy-and-paste error in _mesa_pack_rgba_span_floatIan Romanick2012-02-021-3/+2
| | | | | | | | | | | GL_RG_INTEGER only has two components, not three. I'll be surprised if anyone ever tries to glReadPixels(..., GL_SHORT, GL_RG_INTEGER, ...). This was found by inspection. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* mesa: Fix copy-and-paste bug in do_row_3DIan Romanick2012-02-021-3/+3
| | | | | | | | | | | | | Several of the half-float cases used 4 as the texel size when it should have been some smaller value. NOTE: This is a candidate for the 8.0 branch. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43324 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43325