summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* r300g/tests: Exit test runner with a valid status codeTom Stellard2013-02-215-6/+22
| | | | | | | | This way make check can report whether or not the tests pass. NOTE: This is a candidate for the stable branches. Reviewed-by: Marek Olšák <[email protected]>
* r300g/complier: Make r300_vertprog_swizzle_caps visible in other filesTom Stellard2013-02-212-1/+3
| | | | | | | | This will be used by the test suite in later commits. NOTE: This is a candidate for the stable branches. Reviewed-by: Marek Olšák <[email protected]>
* r300g/compiler: Fix typo in commentTom Stellard2013-02-211-1/+1
| | | | Reviewed-by: Marek Olšák <[email protected]>
* r300g/compiler: Add missing license headersTom Stellard2013-02-2113-1/+339
| | | | | | | | | | These are all files that I authored, but forgot to add the license headers. NOTE: This is a candidate for the stable branches. Signed-off-by: Tom Stellard <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: don't enable ReZ mode on evergreenAlex Deucher2013-02-211-1/+4
| | | | | | | | | | | | | | | Can cause lockups in certain cases when zfunc/zenable/zwrite change without a flush in between. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=60969 and lockups on Civ4 with wine. This is a candidate for the 9.1 branch. Signed-off-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: Don't match TGSI_SEMANTIC_POSITION fs inputs to vs outputsMichel Dänzer2013-02-211-2/+5
|
* radeonsi: Fix w component of TGSI_SEMANTIC_POSITION fragment shader inputs.Michel Dänzer2013-02-211-0/+8
| | | | | | | | It's the reciprocal of the register value. Fixes piglit fragcoord_w and glsl-fs-fragcoord-zw-perspective. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: Fix up and enable flat shading.Michel Dänzer2013-02-214-22/+5
| | | | | | | | | | | Requires corresponding LLVM R600 backend fix to work correctly, but even without that it doesn't hang anymore. 13 more little piglits. Depends on LLVM: r175193, r175733 NOTE: This is a candidate for the 9.1 branch.
* radeonsi: Fix memory leak in si_shader_select.Vinson Lee2013-02-201-0/+1
| | | | | | | Fixes resource leak defect reported by Coverity. Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* gallivm: fix indirect src register fetches requiring bitcastRoland Scheidegger2013-02-201-21/+16
| | | | | | | | | | | For constant and temporary register fetches, the bitcasts weren't done correctly for the indirect case, leading to crashes due to type mismatches. Simply do the bitcasts after fetching (much simpler than fixing up the load pointer for the various cases). This fixes https://bugs.freedesktop.org/show_bug.cgi?id=61036 Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: lp_resource_copy cleanupRoland Scheidegger2013-02-205-49/+47
| | | | | | | | We don't need to flush resources for each layer, and since we don't actually care about layer at all in the flush function just drop the parameter. Also we can use util_copy_box instead of repeated util_copy_rect. Reviewed-by: Jose Fonseca <[email protected]>
* llvmpipe: fix lp_resource_copy using more than one 3d sliceRoland Scheidegger2013-02-201-84/+86
| | | | | | | | | | | | These used to be illegal a very long time ago, then for some more time nothing really emitted these so this code path wasn't hit. Just trivially iterate over box->depth. (Might be worth refactoring at some point since nowadays all the code doesn't really do much except for depth textures.) This fixes https://bugs.freedesktop.org/show_bug.cgi?id=61093 Reviewed-by: Jose Fonseca <[email protected]>
* r600g/Cayman: Fix blending using destination alpha factor but non-alpha destMichel Dänzer2013-02-201-4/+9
| | | | | | | | Only compile tested, but should fix at least some piglit fbo-blending tests. NOTE: This is a candidate for the stable branches. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: Fix blending using destination alpha factor but non-alpha destinationMichel Dänzer2013-02-201-3/+5
| | | | | | | | 11 more little piglits. NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: implement 3D transfersMarek Olšák2013-02-201-20/+29
| | | | | | | | | | | | | That means we can map and read multiple slices with one transfer_map call. [ Cherry-picked from r600g commit 1aebb6911e9aa1bd8900868b58d1750ca83a20c7 ] 11 more little piglits on master, 1 more on the 9.1 branch (Marek's glTex(Sub)Image improvements on master broke the other 10). NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: add assertions to prevent creation of invalid surfacesMarek Olšák2013-02-203-15/+18
| | | | | | | | [ Cherry-picked from r600g commit ef11ed61a0414d0405c3faf7f48fa3f1d083f82e ] NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Alex Deucher <[email protected]>
* radeonsi: use u_box_origin_2d helper functionMarek Olšák2013-02-201-5/+2
| | | | | | | | [ Cherry-picked from r600g commit b278aba42310e8fa30f2408b9dcd58dbb4901724 ] NOTE: This is a candidate for the 9.1 branch. Reviewed-by: Alex Deucher <[email protected]>
* radeon/llvm: Fix build with LLVM 3.3Tom Stellard2013-02-192-1/+12
|
* r600g: Add $(DEFINES) to AM_CXXFLAGSTom Stellard2013-02-191-1/+2
| | | | This way llvm_wrapper.cpp is compiled with -DHAVE_LLVM=0x....
* llvmpipe: fix handling of 0 x 0 framebuffer sizeBrian Paul2013-02-191-2/+2
| | | | | | | Bump up the size to 1 x 1. This fixes a number of potential failure points in the code. See also http://bugs.freedesktop.org/show_bug.cgi?id=61012
* st/xlib: initialize the drawable size in create_xmesa_buffer()Brian Paul2013-02-191-2/+1
| | | | | | | | | Otherwise, the PBuffer's size was never set. This also initializes the buffer size for windows, pixmaps, etc. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=61012 Note: This is a candidate for the stable branches.
* draw: fix non-perspective interpolation in interp()Brian Paul2013-02-191-3/+8
| | | | | | | | | | | This fixes a regression from ab74fee5e1a3fc3323b7238278637b232c2d0d95. When we use the clip coordinate to compute the screen-space interpolation factor, we need to first apply the divide-by-W step to the clip coordinate. Fixes http://bugs.freedesktop.org/show_bug.cgi?id=60938 Note: This is a candidate for the 9.1 branch.
* radeonsi: Fix PIPE_FORMAT_X32_S8X24_UINT sampler hardware formatMichel Dänzer2013-02-181-1/+1
| | | | | | 4 more little piglits. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: Use stencil surface level information for stencil texturingMichel Dänzer2013-02-182-7/+10
| | | | | | 7 more little dwarves^W piglits. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: properly implement S8Z24 depth-stencil formatMichel Dänzer2013-02-181-29/+66
| | | | | | | | Based on r600g commit 2b9659c9e627ad03160899b8be04f96307d098eb . Fixes crashes with 4 piglit tests which are now hitting these formats. NOTE: This is a candidate for the 9.1 branch.
* r600g/llvm: Support for TBOVincent Lejeune2013-02-181-0/+28
| | | | Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* r600g/llvm: Set Inputs/Outputs count to 32 (api reported value)Vincent Lejeune2013-02-181-2/+2
| | | | Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* r600g/llvm: Fix alpha_to_one piglit testsVincent Lejeune2013-02-183-0/+4
| | | | Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* r600g/llvm: Add support for UBOVincent Lejeune2013-02-182-1/+22
| | | | | | NOTE: This is a candidate for the Mesa stable branch. Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
* gallivm/tgsi: fix issues with sample opcodesRoland Scheidegger2013-02-167-95/+247
| | | | | | | | We need to encode them as Texture instructions since the NumOffsets field is encoded there. However, we don't encode the actual target in there, this is derived from the sampler view src later. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm/tgsi: fix src modifier fetching with non-float types.Roland Scheidegger2013-02-164-5/+54
| | | | | | | | | | | | | | Need to take the type into account. Also, if we want to allow mov's with modifiers we need to pick a type (assume float). v2: don't allow all modifiers on all type, in particular don't allow absolute on non-float types and don't allow negate on unsigned. Also treat UADD as signed (despite the name) since it is used for handling both signed and unsigned integer arguments and otherwise modifiers don't work. Also add tgsi docs clarifying this. Reviewed-by: Jose Fonseca <[email protected]>
* gallivm: fix issues with trunc/round/floor/ceil with no arch roundingRoland Scheidegger2013-02-162-66/+199
| | | | | | | | | | | | | | | | | | | | The emulation of these if there's no rounding instruction available is a bit more complicated than what the code did. In particular, doing fp-to-int/int-to-fp will not work if the exponent is large enough (and with NaNs, Infs). Hence such values need to be filtered out and the original value returned in this case (which fortunately should always be exact). This comes at the expense of performance (if your cpu doesn't support rounding instructions). Furthermore, floor/ifloor/ceil/iceil were affected by precision issues for values near negative (for floor) or positive (for ceil) zero, fix that as well (fixing this issue might not actually be slower except for ceil/iceil if the type is not signed which is probably rare - note iceil has no callers left in any case). Also add some new rounding test values in lp_test_arit to actually test for that stuff (which previously would have failed without sse41). This fixes https://bugs.freedesktop.org/show_bug.cgi?id=59701.
* gallivm: DIV shouldn't be deprecated.Roland Scheidegger2013-02-161-1/+0
| | | | | | (Though it looks glsl won't emit it.) Reviewed-by: Jose Fonseca <[email protected]>
* trace: add context pointer sanity checkingBrian Paul2013-02-153-0/+23
| | | | | | | To help catch mixed up context pointer bugs in the future, add a trace_context_check() function and some new assertions. Reviewed-by: Jose Fonseca <[email protected]>
* trace: fix incorrect trace_surface::base.context pointerBrian Paul2013-02-153-4/+7
| | | | | | | | | When a trace_surface object is created in trace_surf_create() we weren't correctly setting the surface's context pointer. Instead of it being the trace context, it was the wrapped driver's context. This caused things to blow up sometimes during surface deallocation. Reviewed-by: Jose Fonseca <[email protected]>
* trace: whitespace, comment clean-upsBrian Paul2013-02-151-6/+2
|
* trace: move struct tr_list to tr_texture.hBrian Paul2013-02-152-5/+8
| | | | That's the only place it's used.
* egl-wayland: Fix left-over wl_display_roundtrip() usageKristian Høgsberg2013-02-141-1/+1
| | | | | We have to use the EGL wayland event queue for roundtrip, so use the wayland_roundtrip() helper, which does just that.
* r600g: add support for red-alpha render targetsMarek Olšák2013-02-142-0/+44
|
* r300g: add support for red-alpha render targetsMarek Olšák2013-02-143-0/+20
|
* r600g: properly implement S8Z24 depth-stencil format for EvergreenMarek Olšák2013-02-143-18/+47
| | | | | | | | | | | | | | | | | | | | I should say "fix", but it has never been used until now. S8Z24 is the format equivalent to the GL_UNSIGNED_INT_24_8 packing, so we'll start to see it more often with st/mesa now making smart decisions about formats. The DB<->CB copy can change the channel ordering for transfers, other than that, the internal DB format doesn't really matter. R600-R700 support is possible except shadow mapping. FMT_24_8 is broken if the SAMPLE_C instruction is used (no idea why). Also the sampler swizzling was broken in theory and the fact it worked was a lucky coincidence. radeonsi might need to port this. Reviewed-by: Jerome Glisse <[email protected]>
* radeonsi: Handle TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFSMichel Dänzer2013-02-141-0/+29
| | | | | | 8 more little piglits. NOTE: This is a candidate for the 9.1 branch.
* radeonsi: Fix array indices for detecting integer vertex formatsMichel Dänzer2013-02-141-2/+2
|
* gallium: add red-alpha texture formats and a couple of util functionsMarek Olšák2013-02-133-0/+141
| | | | | | | | | This is for glGetTexImage and it will be used for samplers only (which some drivers already implement by reading util_format_description). v2: incorporate Brian's suggestion Reviewed-by: Brian Paul <[email protected]>
* r600g: fix lockup when hyperz & alpha test are enabled together. v3Jerome Glisse2013-02-123-3/+49
| | | | | | | | | | | | Seems that alpha test being enabled confuse the GPU on the order in which it should perform the Z testing. So force the order programmed throught db shader control. v2: Only force z order when alpha test is enabled v3: Update db shader when binding new dsa + spelling fix Signed-off-by: Jerome Glisse <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: remove constant index limitation v3Christian König2013-02-122-7/+1
| | | | | | | | | | With the llvm patches, fixing 14 piglit tests in total. v2: increase the const limit v3: document the const limit Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* radeonsi: support constants as TEX coordinatesChristian König2013-02-121-0/+9
| | | | | Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* gallium/docs: fix typos in sample opcode descriptionsRoland Scheidegger2013-02-121-2/+3
|
* nv50: fix bogus parameters when processing sample instructionsRoland Scheidegger2013-02-121-1/+1
| | | | | | | | Discovered accidentally when changing SAMPLE_L definition. Turns out the lod arguments were already correct for the new definition but the compare and derivs were not. Reviewed-by: Christoph Bumiller <[email protected]>
* gallium: fix tgsi SAMPLE_L opcode to use separate source for explicit lodRoland Scheidegger2013-02-127-20/+10
| | | | | | | | | | | | | | | | | | | | | It looks like using coord.w as explicit lod value is a mistake, most likely because some dx10 docs had it specified that way. Seems this was changed though: http://msdn.microsoft.com/en-us/library/windows/desktop/hh447229%28v=vs.85%29.aspx - let's just hope it doesn't depend on runtime build version or something. Not only would this need translation (so go against the stated goal these opcodes should be close to dx10 semantics) but it would prevent usage of this opcode with cube arrays, which is apparently possible: http://msdn.microsoft.com/en-us/library/windows/desktop/bb509699%28v=vs.85%29.aspx (Note not only does this show cube arrays using explicit lod, but also the confusion with this opcode: it lists an explicit lod parameter value, but then states last component of location is used as lod). (For "true" hw drivers, only nv50 had code to handle it, and it appears the code was already right for the new semantics, though fix up the seemingly wrong c/d arguments while there.) v2: fix comment, separate out other changes. Reviewed-by: Jose Fonseca <[email protected]>