summaryrefslogtreecommitdiff
path: root/src/gallium
AgeCommit message (Collapse)AuthorFilesLines
2014-01-25st/dri: prevent leak of dri option default valuesAaron Watry1-0/+6
v2: Change comment style CC: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit ce3528896b37c7d8ef051780e29ea9588fada9da)
2014-01-25radeon: Move gfx/dma cs cleanup to r600_common_context_cleanupAaron Watry2-7/+7
The radeonsi code was not cleaning up either of these items leading to leaked memory. v2: Move cleanup to r600_common_context_cleanup instead of duplicating the logic for SI CC: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Marek Olšák <marek.olsak@amd.com> (cherry picked from commit 5ac3229f76f02453ae7e971d515b01fb56ad3fa5) Conflicts: src/gallium/drivers/radeon/r600_pipe_common.c
2014-01-09mesa: Work around internal compiler errorThomas Sondergaard1-2/+2
This small rearrangement avoids MSVC 2013 ICE. Also, this should be a better memory access order. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (cherry picked from commit 8fcddd325ce3dc5dfdafc95767542590ae860c45)
2014-01-02nv50: fix a small leak on context destroyIlia Mirkin1-0/+2
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> (cherry picked from commit f50a45452a4fd4f7cece8fe37c394edac0808136)
2014-01-02r600/pipe: Stop leaking context->start_compute_cs_cmd.buf on EG/CMAaron Watry1-0/+2
Found while tracking down memory leaks in VDPAU playback Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 3ddabe0d523416693f28e293d8d3d918bdb612ca)
2014-01-02st/vdpau: Destroy context when initialization failsAaron Watry1-0/+1
Prevents a potential memory leak found when tracking down something else. Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 20446d0e535c0735489c8944e8d767e0fc74fc6e)
2014-01-02radeon/llvm: Free target data at end of optimizationAaron Watry1-0/+1
Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 767b0f82c37f0370c05335120e50f0a534549109)
2014-01-02r600/compute: Use the correct FREE macro when deleting compute stateAaron Watry1-1/+1
Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 0bd858d7ff4a16228164e3157aca846edeb6c228)
2014-01-02r600/compute: Free compiled kernels when deleting compute stateAaron Watry1-0/+2
v2: Remove unnecessary null pointer check CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit e19717d075bd26c16e12564ed578ff519a5ce57a)
2014-01-02radeon/compute: Stop leaking LLVMContexts in radeon_llvm_parse_bitcodeAaron Watry5-18/+41
Previously we were creating a new LLVMContext every time that we called radeon_llvm_parse_bitcode, which caused us to leak the context every time that we compiled a CL program. Sadly, we can't dispose of the LLVMContext at the point that it was being created because evergreen_launch_grid (and possibly the SI equivalent) was assuming that the context used to compile the kernels was still available. Now, we'll create a new LLVMContext when creating EG/SI compute state, store it there, and pass it to all of the places that need it. The LLVM Context gets destroyed when we delete the EG/SI compute state. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 8c9a9205d96b5ac0718218bfa952a5b4b6ad939c)
2014-01-02pipe_loader/sw: close dev->lib when initialization failsAaron Watry1-1/+4
Prevents a memory leak. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit a7653c19a3b1adae162864587a7ab1c17ab256e6)
2014-01-02clover: Remove unused variableAaron Watry1-1/+0
Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 862f55c29c50798942e58ea75c5294921c0489f8)
2014-01-02llvmpipe: use pipe_sampler_view_release() to avoid segfaultJonathan Liu1-0/+6
This fixes another case of faulting when freeing a pipe_sampler_view that belongs to a previously destroyed context. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Jonathan Liu <net147@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com> (cherry picked from commit 7990ab58fa01cbebcefd63dd25af5fd6fdddf019)
2014-01-02r600g/sb: fix stack size computation on evergreenVadim Girlin1-4/+12
On evergreen we have to reserve 1 stack element in some additional cases besides the ones mentioned in the docs, but stack size computation was recently reimplemented exactly as described in the docs by the patch that added workarounds for stack issues on EG/CM, resulting in regressions with some apps (Serious Sam 3). This patch fixes it by restoring previous behavior. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=72369 Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com> Cc: "10.0" <mesa-stable@lists.freedesktop.org> Tested-by: Andre Heider <a.heider@gmail.com> (cherry picked from commit 00faf82832f3e6ef886abad246b50cc47b901c1f)
2013-12-12nv50: report 15 max inputs for fragment programsIlia Mirkin1-1/+1
First off, nv50_program only has 16 in/out varyings. However reporting 16 makes 'm' become 68 in nv50_fp_linkage_validate with the varying-packing-simple piglit test. (Subverting the assert makes it compile but fail.) With this patch, varying-packing-simple passes. See: https://bugs.freedesktop.org/show_bug.cgi?id=69155 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "9.2 10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit bad8871e524cf518bc5da4ac52c1618a115054a7)
2013-12-12nouveau: Fix compiler warning regressionMaarten Lankhorst1-4/+0
cfg is now unused, remove it. Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 5576ad11ed922fad641e630fbb9b199f6434f528)
2013-12-09r300/compiler/tests: Fix line length check in test parserTom Stellard1-1/+3
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> CC: "9.2" "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 9a5ce0c4c971a8511574e10dd3ef37eebbe65ce7)
2013-12-09r300/compiler/tests: Fix segfaultTom Stellard1-6/+5
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> CC: "9.2" "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 1896431f7933e727a0f75c0e0a2da4c580a04a72)
2013-12-09nouveau/video: update a few more h264 picparm field namesIlia Mirkin1-16/+17
Based on comments by Benjamin Morris <bmorris@nvidia.com> in http://lists.freedesktop.org/archives/nouveau/2013-December/015328.html This adds setting of is_long_term, and updates a few field names we were unclear about. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 2cd2b9705e722d94091ce8ff6ff56a44dd8d5cc6)
2013-12-09nouveau/video: update h264 picparm field names based on usageIlia Mirkin1-15/+13
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 78525dae8ae4daf785e89ba8a334e4ec3be8a334)
2013-12-09nv50: enable h264 and mpeg4 for nv98+ (vp3, vp4.0)Ilia Mirkin2-7/+2
Create the ref_bo without any storage type flags set for now. The issue probably arises from our use of the additional buffer space at the end of the ref_bo. It should probably be split up in the future. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Tested-by: Martin Peres <martin.peres@labri.fr> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit e01ba9d6b049d5eee8c125e3ec43b4539c26e4d7)
2013-12-06nv50: wait on the buf's fence before sticking it into pushbufIlia Mirkin2-0/+12
This resolves some rendering issues in source games. See https://bugs.freedesktop.org/show_bug.cgi?id=64323 Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "9.2 10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 0e5bf8565106833e1a678ebdae81fdf1657391c9)
2013-12-06nouveau: avoid leaking fences while waitingIlia Mirkin1-6/+5
This fixes a memory leak in some situations. Also avoids emitting an extra fence if the kick handler does the call to nouveau_fence_next itself. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "9.2 10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit ce6dd69697ae62d9336bbd4f5808bc4d75cdcc04)
2013-12-06nv50: Fix GPU_READING/WRITING bit removalIlia Mirkin2-3/+3
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> CC: "9.1, 9.2, 10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit c45cf6199fc493538cef33125c8a97a892e2ca83)
2013-12-06st/xa: Bump major version number to 2Thomas Hellstrom1-1/+1
For some reason this was left out when the version was changed... Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
2013-11-26radeon/compute: Unconditionally inline all functions v2Tom Stellard1-2/+20
We need to do this until function calls are supported. v2: - Fix loop conditional https://bugs.freedesktop.org/show_bug.cgi?id=64225 CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit ddc77c5092b6f782327a7014b320f31f5f4e8e93)
2013-11-23radeonsi/compute: Fix LDS size calculationTom Stellard1-1/+16
We need to include the number of LDS bytes allocated by the state tracker. CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 1bdb99330ac68003a9ee6c963f46bddb03b9073d)
2013-11-23r600g/compute: Add a work-around for flushing issues on CaymanTom Stellard3-1/+17
Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> https://bugs.freedesktop.org/show_bug.cgi?id=69321 CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7a30cd7085b6879d3858f5c1a6945fbe30c818a6)
2013-11-23r600g/compute: Fix handling of global buffers in r600_resource_copy_region()Tom Stellard1-1/+36
Global buffers do not have an associate cs_buf handle, so we can't copy them using r600_copy_buffer() https://bugs.freedesktop.org/show_bug.cgi?id=64226 Reviewed-by: Marek Ol????k <marek.olsak@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 1b9511d7ce70a9f9cadd0c03bd0c916b88b6dd43)
2013-11-23gallium: Pass version scripts to linker using --version-script=Tom Stellard4-4/+4
This fixes build failures with the gold linker. CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 17930a66aad6774224296ad9c845d30e01e4ffe5)
2013-11-23clover: Optionally return context's devices from clGetProgramInfo()Tom Stellard1-2/+6
The spec allows clGetProgramInfo() to return information about either the devices associated with the program or the devices associated with the context. If there are no devices associated with the program, then we return devices associated with the context. https://bugs.freedesktop.org/show_bug.cgi?id=52171 Reviewed-by: Francisco Jerez <currojerez@riseup.net> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit a84dd2398f75c672293122408828ac66bb7052a0)
2013-11-23r600g/sb: work around hw issues with stack on eg/cmVadim Girlin5-44/+123
v2: make it actually work, improve condition Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=68503 Cc: "10.0" <mesa-stable@lists.freedesktop.org> Signed-off-by: Vadim Girlin <vadimgirlin@gmail.com> (cherry picked from commit 4cb04aa0dfaf8c23e312fa49778e637e59410727)
2013-11-15radeon/llvm: Free elf_buffer after useAaron Watry1-0/+1
Prevents a memory leak. v2: Remove null check CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 2be85e2492b6ad7e04884525904a7ec22cde0ddc)
2013-11-15r600/llvm: Free binary.code/binary.config in r600_llvm_compileAaron Watry1-0/+3
radeon_llvm_compile allocates memory for binary.code, binary.config, or neither depending on what's being done. We need to make sure to free that memory after it's no longer needed. v2: Don't bother checking for null before FREE() CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 01f3622c740173d4001eb421b74d4d60a0c7fd12)
2013-11-15r600/llvm: initialize radeon_llvm_binaryAaron Watry1-0/+1
use memset to initialize to 0's... otherwise code_size and config_size could be uninitialized when read later in this method. It's also hard to do NULL checks on uninitialized pointers. Reviewed-by: Tom Stellard <thomas.stellard@amd.com> v2: Fix indentation CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit dd73b99420de17651001e0a4d937f1f66fbef14c)
2013-11-15svga: mark dest image as defined in svga_surface_copy()Brian Paul1-0/+2
After we blit/copy to a dest texture image we need to mark it as being defined. This fixes broken mipmap generation for quite a few texture formats. Mipgen involves making texture views and svga_texture_view_surface() skips texture images that are undefined. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: José Fonseca <jfonseca@vmware.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com> (cherry picked from commit 3969330b47c5b7f7843f356db0a10962553339a6)
2013-11-15svga: do primitive trimming in translate_indices()Brian Paul1-3/+12
The index translation code expects the number of indexes to be consistent with the primitive type (ex: a multiple of 3 for PIPE_PRIM_TRIANGLES). If it's not, we can write out of bounds in the destination buffer. Fixes failed assertions in the pipebuffer debug code found with Piglit primitive-restart-draw-mode test. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: José Fonseca <jfonseca@vmware.com> (cherry picked from commit 79984b9928d4444665ce617a1e4551e53d415bd4)
2013-11-15gallium/pipe_loader: un-reference udev resources when we're done with them.Aaron Watry1-0/+3
Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 598f61ba28bcfd220104e18e89973768babeaac3)
2013-11-15radeonsi/compute: Dispose of LLVM module after compiling kernelsAaron Watry1-0/+1
v2: Fix indentation Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 4c6ac9e61452ffc49f8e360fc879deec8e04bbb5)
2013-11-15radeonsi/compute: Free program and program.kernels on shutdownAaron Watry1-1/+15
v2: Fix indentation Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 35dad4a1e235b2bf7fb3ecdb82aed0214db69a35)
2013-11-15radeon/llvm: Free created llvm memory bufferAaron Watry1-0/+1
v2: Fix indentation Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit d41b10f811a89c76248f195a6b4ade62322b8c3c)
2013-11-15radeon/llvm: Free libelf resourcesAaron Watry1-0/+3
v2: Fix indentation Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit a2b93da84bda2b92108cf3b9c253fec114b69dc2)
2013-11-15radeon/llvm: fix spelling errorAaron Watry1-1/+1
Reviewed-by: Tom Stellard <thomas.stellard@amd.com> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit df482fe02f6732fb6fe7ae0a509b3c66e655bd5b)
2013-11-15clover: Support multiple devices in clCreateContextFromType() v2Tom Stellard1-3/+9
v2: - Use clGetDeviceIDs to query devices. Reviewed-by: Francisco Jerez <currojerez@riseup.net> CC: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 17af4dd52b0530b671fb7ae64345500f62ed7ee3)
2013-11-15clover: Fix the const variant of adaptor_range::end to deal with mismatching ↵Francisco Jerez1-1/+2
range sizes. Fixes infinite loop in find_grid_optimal_factor() in cases where the user specifies a grid size with less dimensions than the device supports. Reported-by: Tom Stellard <thomas.stellard@amd.com> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 99d447cc5dafa3a36b970068961989cced62e3b6)
2013-11-15gallium: fix build on GNU/Hurd due to missing PIPE_OS_HURD detectionCyril Brulebois1-6/+6
Thanks to Pino Toscano. Patch from Debian package. Cc: "10.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com> (cherry picked from commit 2d77e4f922a8c34541d8b187e171738006bd6f4d)
2013-11-15nouveau/video: mark bitstream-level acceleration as unsupportedIlia Mirkin1-2/+2
Adding a vl_mpeg-based helper didn't seem to work, as it produced data that the card couldn't handle. (And I didn't investigate further.) This makes the decoding functionality only accessible via XvMC and avoids crashes when attempting to use VDPAU. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 08122e151a511236bccf7ab94efa4278ea3b3b6c)
2013-11-15nouveau/video: don't try on nv3xIlia Mirkin1-2/+2
It doesn't work, I don't know why, but no point in hanging people's displays until it gets figured out. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.0" <mesa-stable@lists.freedesktop.org> (cherry picked from commit e8d5d3409c73329dba8678b52a53acf5735f04b1)
2013-11-15egl-static: Only export necessary symbols v3Tom Stellard2-0/+5
This fixes a crash in glamor when mesa links against static LLVM. v2: - Inline LINKER_SCRIPT variable v3: Kai Wasserbäch - Fix out out-of-tree-builds Tested-by: Kai Wasserbäch <kai@dev.carbon-project.or> (cherry picked from commit 594fa4a208b138b0b9b24cc8de62e6681ebb8d21)
2013-11-15pipe-loader: Only export necessary symbols v3Tom Stellard2-0/+5
This makes it possible to use clover with statically linked LLVM. v2: - Inline LINKER_SCRIPT variable v3: Kai Wasserbäch - Fix out out-of-tree-builds Tested-by: Kai Wasserbäch <kai@dev.carbon-project.or> (cherry picked from commit 6d6c749215739d0b5f5143dd00a782082b3d03a2)