path: root/src/gallium/drivers
AgeCommit message (Collapse)AuthorFilesLines
2014-09-27radeonsi: properly destroy the GS copy shader and scratch_bo for computeMarek Olšák2-3/+7
Cc: 10.2 10.3 <> Reviewed-by: Michel Dänzer <> (cherry picked from commit dc05a9e4e089d66a2ffe8919857ad9660e108c28) [Emil Velikov: remove unref scratch_bo, s/si_shader/si_pipe_shader/] Signed-off-by: Emil Velikov <>
2014-09-27radeonsi: release GS rings at context destructionMarek Olšák1-0/+2
Cc: 10.2 10.3 <> Reviewed-by: Michel Dänzer <> (cherry picked from commit 711623f7c8113d43f2d54ebfe5cbed3d406a3c79) [Emil Velikov: s/ring/ring.buffer/] Signed-off-by: Emil Velikov <>
2014-09-27nv50/ir: avoid deleting pseudo instructions too earlyIlia Mirkin1-1/+10
What happens is that a SPLIT operation is part of the spill node, and as a pseudo op, the instruction gets erased after processing its first def. However the later defs still need to refer to it, so instead delay deleting until after that whole RA node is done processing. Bugzilla: Signed-off-by: Ilia Mirkin <> Cc: "10.2 10.3" <> (cherry picked from commit 0147c10c5f00b43696ba660aab604d674a75e83c)
2014-09-17nouveau: remove unneeded assertMaarten Lankhorst1-1/+0
No idea why it was added, but the code runs fine even on videos where it triggers. Signed-off-by: Maarten Lankhorst <> Cc: "10.2 10.3" <> (cherry picked from commit 8ab85bfcd5ddd44c50e5b384222731cb2a1a1496)
2014-09-17nouveau: rework reference frame handlingMaarten Lankhorst3-4/+37
Fixes a regression from "nouveau/vdec: small fixes to h264 handling" New picking order for frames: 1. Vidbuf pointer matches. 2. Take the first kicked ref. 3. If that fails, take a ref that has a different last_used. Signed-off-by: Maarten Lankhorst <> Cc: "10.2 10.3" <> (cherry picked from commit a41aad843108cec1901c88a76d5ceb4ede2e062b)
2014-09-17nouveau: fix MPEG4 hw decodingMaarten Lankhorst1-3/+3
Reorder some fields to make I-frame decoding work correctly. Signed-off-by: Maarten Lankhorst <> Cc: "10.2 10.3" <> (cherry picked from commit 121ceb38f45daacc938349d9d5aa82776b78dbab)
2014-09-17nouveau: re-allocate bo's on overflowMaarten Lankhorst4-11/+87
The BSP bo might be too small to contain all of the bsp data, bump its size on overflow. Also bump inter_bo when this happens, it might be too small otherwise. Signed-off-by: Maarten Lankhorst <> Cc: "10.2 10.3" <> (cherry picked from commit f6afed7076a6ef446dbec7cb10c8f8c60efafccd)
2014-09-09nv50/ir: avoid array overrun when checking for supported modsIlia Mirkin2-2/+2
Reported by Coverity Signed-off-by: Ilia Mirkin <> Cc: "10.2 10.3" <> (cherry picked from commit 874a9396c5adfdcff63139bf6ababb55c1253402)
2014-09-09nvc0/ir: clarify recursion fix to finding first tex usesChristoph Bumiller1-9/+7
This is a simple shader for reproducing the case mentioned: FRAG DCL IN[0], GENERIC[0], PERSPECTIVE DCL OUT[0], COLOR DCL SAMP[0] DCL CONST[0] DCL TEMP[0..1], LOCAL IMM[0] FLT32 { 0.0000, -1.0000, 1.0000, 0.0000} 0: MOV TEMP[0].x, CONST[0].wwww 1: MOV TEMP[1].x, CONST[0].wwww 2: BGNLOOP 3: IF TEMP[0].xxxx 4: BRK 5: ENDIF 6: ADD TEMP[0].x, TEMP[0], IMM[0].zzzz 7: IF CONST[0].xxxx 8: TEX TEMP[1].x, CONST[0], SAMP[0], 2D 9: ENDIF 10: IF CONST[0].zzzz 11: MOV TEMP[1].x, CONST[0].zzzz 12: ENDIF 13: ENDLOOP 14: MOV OUT[0], TEMP[1].xxxx 15: END Cc: "10.2 10.3" <> Reviewed-by: Ilia Mirkin <> (cherry picked from commit ca9ab05d45ebf407485af2daa3742b897ff99162)
2014-09-09nv50/ir/util: fix BitSet issuesChristoph Bumiller3-3/+10
BitSet::allocate() is being used with the expectation that it would leave the bitfield untouched if its size hasn't changed, however, the function always zeroed the last word, which led to obscure bugs with live set computation. This also fixes BitSet::resize(), which was broken, but luckily not being used. Cc: "10.2 10.3" <> Reviewed-by: Ilia Mirkin <> (cherry picked from commit b9f9e3ce03dbd8d044a72a00e1e8856a500b5f72)
2014-09-08r600g,radeonsi: make sure there's enough CS space before resuming queriesMarek Olšák1-0/+28
Bugzilla: Cc: "10.2 10.3" <> Reviewed-by: Michel Dänzer <> (cherry picked from commit 3dbf55c1be5a8867616e475d943c776d8245d0cc)
2014-09-02radeonsi: Don't use anonymous struct trick in atom trackingAdam Jackson6-10/+10
I'm somewhat impressed that current gccs will let you do this, but sufficiently old ones (including 4.4.7 in RHEL6) won't. Reviewed-by: Marek Olšák <> Signed-off-by: Adam Jackson <> (cherry picked from commit 74388dd24bc7fdb9e62ec18096163f5426e03fbf) Nominated-by: Jonathan Gray <> Bugzilla:
2014-09-02nv50: attach the buffer bo to the miptree structuresIlia Mirkin1-8/+5
The current code... makes no sense. Use nouveau_bo_ref to attach the bo to the exposed resource so as to have the proper lifetime guarantees. Tested-by: Emil Velikov <> Signed-off-by: Ilia Mirkin <> Cc: "10.2 10.3" <> (cherry picked from commit 2c440433130d3c64635684355a3667d145a188e3)
2014-09-02nv50: mt address may not be the underlying bo's start addressIlia Mirkin3-12/+14
With VP2, nv50_miptree is faked because the underlying bo's have to be laid out in a certain way. This is done by adjusting the address. Make sure that blits (and everything else for consistency) use the mt address rather than the bo address as a base. This fixes retrieving chroma plane with VDPAU. Bugzilla: Tested-by: Emil Velikov <> Signed-off-by: Ilia Mirkin <> Cc: "10.2 10.3" <> (cherry picked from commit 9d52e551a5874e54bc80f306bf3cacbad2441315)
2014-09-02nv50: set the miptree address when clearing bo's in vp2 initIlia Mirkin1-0/+2
The mt address is about to be used more, make sure it's set appropriately. Reported-by: Emil Velikov <> Tested-by: Emil Velikov <> Signed-off-by: Ilia Mirkin <> Cc: "10.2 10.3" <> (cherry picked from commit 2528d402b9e35601d4631cd80a301bacd87dfc95)
2014-09-02nv50/ir: avoid creating instructions that can't be emittedIlia Mirkin1-0/+4
When constant folding a MAD operation, we first fold the multiply and generate an ADD. However we do so without making sure that the immediate can be handled in the saturate case. If it can't, load the immediate in a separate instruction. Reported-by: Tiziano Bacocco <> Signed-off-by: Ilia Mirkin <> Cc: "10.2 10.3" <> (cherry picked from commit 6c2b079231f84b09b3f35183930afe522baee168)
2014-09-02nvc0: don't make 1d staging textures linearIlia Mirkin1-1/+0
Experimentally, the sampler doesn't appear to like these, neither as buffer nor as rect textures. So remove 1D from the list of texture types to make linear when used for staging. This fixes the OSD in mplayer for VDPAU. Signed-off-by: Ilia Mirkin <> Cc: "10.2 10.3" <> (cherry picked from commit 115d9a5525e74573ced9209063a1d4a551e6eaa4)
2014-09-02nv50: zero out unbound samplersIlia Mirkin1-2/+5
Samplers are only defined up to num_samplers, so set all samplers above nr to NULL so that we don't try to read them again later. Tested-by: Christian Ruppert <> Signed-off-by: Ilia Mirkin <> Cc: "10.2 10.3" <> (cherry picked from commit 362cd26960aff2e997584064443dcc0418516ae6)
2014-09-02nvc0/ir: avoid infinite recursion when finding first uses of texIlia Mirkin1-8/+28
In certain circumstances, findFirstUses could end up doubling back on instructions it had already processed, resulting in an infinite recursion. Avoid this by keeping track of already-visited instructions. Bugzilla: Tested-by: Tobias Klausmann <> Signed-off-by: Ilia Mirkin <> Cc: "10.2 10.3" <> (cherry picked from commit c4bb436f7660c951cd27e52660cf825da68793e5) Conflicts: src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.h
2014-08-27r600g/compute: Don't initialize vertex_buffer_state masks to 0x2Tom Stellard1-3/+0
cs_vertex_buffer_state.enabled_mask and cs_vertex_buffer_state.dirty_mask are both updated when r600_set_constant_buffer() is called, so we don't need to manually update these values. This fixes a crash with OpenCL programs that have a kernel with no arguments. CC: "10.2" <> (cherry picked from commit bf7a60f41d897be4d9804ba7c46633e38501ffe7)
2014-08-27radeon: Add work-around for missing Hainan support in clang < 3.6 v2Tom Stellard1-1/+14
v2: - Add missing break. CC: "10.2" <> (cherry picked from commit 8109664dedee588dc98c9a7c25bd40c0eb56c35f)
2014-08-27radeonsi: save scissor state and sample mask for u_blitterMarek Olšák3-8/+29
Cc: Reviewed-by: Michel Dänzer <> (cherry picked from commit 7792f9858b60fd9f9f037f1aa15dd21cba30f2c4)
2014-08-27r600g: fix constant buffer fetchesMarek Olšák1-0/+1
Somebody forgot to do this. It was uncovered by recent st/mesa changes. Bugzilla: Cc: Reviewed-by: Alex Deucher <> Tested-by: Andreas Boll <> (cherry picked from commit da9c3ed304be5d08ff989d61c6e2d1be8a845767)
2014-08-27radeonsi/compute: Call si_pm4_free_state() after emitting compute stateTom Stellard1-1/+1
This will decrement the reference count for buffers referenced in the command stream will prevent us from leaking them. CC: "10.2" <> (cherry picked from commit 1e2e55067117f02542f4aa4b9a15b8eca81c1274)
2014-08-27radeonsi/compute: Update reference counts for buffers in si_set_global_binding()Tom Stellard1-2/+2
CC: "10.2" <> (cherry picked from commit 05e9681d5524981db623c077708816476553f908) Conflicts: src/gallium/drivers/radeonsi/si_compute.c
2014-08-27radeon/compute: Fix reported values for MAX_GLOBAL_SIZE and MAX_MEM_ALLOC_SIZETom Stellard1-13/+19
There is a hard limit in older kernels of 256 MB for buffer allocations, so report this value as MAX_MEM_ALLOC_SIZE and adjust MAX_GLOBAL_SIZE to statisfy requirements of OpenCL. CC: "10.2" <> (cherry picked from commit 77ea58ca81eb3f5521d67c4459d3469df6d5ffd8)
2014-08-25android: gallium/freedreno: add preliminary buildEmil Velikov1-0/+44
For all the people interested in testing the freedreno driver on their Android devices. The next commit will hook these up within the libEGL driver (via the gallium-egl backend). There may be some rough edges but those can be sorted when a willing builder/tester comes along. v2: - s/freefreno/freedreno/. Spotted by Matt Turner. - Use the installed libdrm headers. Cc: "10.1 10.2" <> Cc: Rob Clark <> Cc: Signed-off-by: Emil Velikov <> (cherry picked from commit bf05e067577a8d8e87a377dfb357806b67b6afca)
2014-08-25automake: gallium/freedreno: drop spurious include dirsEmil Velikov2-4/+2
Rather than including two extra folders only for two headers, just prefix the headers and be done with it. Cc: "10.1 10.2" <> Cc: Rob Clark <> Cc: Signed-off-by: Emil Velikov <> Reviewed-by: Rob Clark <> (cherry picked from commit 458d03a4a4cebe7b9e9ea265d18bfc547bc4b49c) Conflicts: src/gallium/drivers/freedreno/
2014-08-25android: gallium/radeon: attempt to fix the android buildPaulo Sergio Travaglia4-4/+41
- include the correct folders - add a new buildscript for the common radeon folder v2: Use the installed libdrm headers over the DRM_TOP ones. Cc: "10.1 10.2" <> [Emil Velikov] Split up and add commit message. Signed-off-by: Emil Velikov <> (cherry picked from commit 5bbfa308c918ee40ec4deea91362688d325886f9)
2014-08-25android: gallium/nouveau: fix include folders, link against libstlportEmil Velikov1-4/+5
nouveau uses STL for a while now thus we need to include external/stlport/ in order to get the build at least partially working. v2: Use the installed libdrm headers over the DRM_TOP ones. Cc: "10.1 10.2" <> Signed-off-by: Emil Velikov <> (cherry picked from commit 6b510c63383a421eabe0d6e7b0249dbab85cffde)
2014-08-11radeonsi: fix CMASK and HTILE allocation on TahitiMarek Olšák2-3/+56
Tahiti has 12 tile pipes, but P8 pipe config. It looks like there is no way to get the pipe config except for reading GB_TILE_MODE. The TILING_CONFIG ioctl doesn't return more than 8 pipes, so we can't use that for Hawaii. This fixes a regression caused by fcb6c0d2b8cb36c3d1b7cbbf3437aeb65a808682 (cherry picked from 9b046474c95f15338d4c748df9b62871bba6f36f as part of Mesa 10.2.5) on Tahiti. v2: add an assertion and print an error on failure Cc: Reviewed-by: Michel Dänzer <> (cherry picked from commit 955505f6ff1c8bba7eb142200d3bd065eb4d2297)
2014-08-11radeonsi: fix a hang with instancing in Unigine Heaven/Valley on HawaiiMarek Olšák1-5/+2
This isn't documented anywhere, but it's the only thing that works for this case. Cc: Reviewed-by: Alex Deucher <> (cherry picked from commit 515269b3a73cd64ac9c017e8b3c698be9a5383f6) Conflicts: src/gallium/drivers/radeonsi/si_state_draw.c
2014-07-31radeonsi: use DRAW_PREAMBLE on CIKMarek Olšák2-5/+10
It's the same as setting the 3 regs separately, but shorter, and it also seems to be required on GFX7.2 and later. This doesn't fix Hawaii. Reviewed-by: Michel Dänzer <> (cherry picked from commit 315f3c171d423e13069beb99a6b772726a141865)
2014-07-31radeonsi: fix order of r600_need_dma_space and r600_context_bo_relocChristian König1-1/+2
Signed-off-by: Christian König <> Reviewed-by: Marek Olšák <> (cherry picked from commit c8011c1885003b79c9f0c6530e46ae6cb0e69575)
2014-07-31radeonsi: fix build because of lack of draw_indirect infrastructure in 10.2Marek Olšák1-2/+1
2014-07-30r600g,radeonsi: switch all occurences of array_size to util_max_layerMarek Olšák3-6/+10
This fixes 3D texture support in all these cases, because array_size is 1 with 3D textures and depth0 actually contains the "array size". util_max_layer is universal and returns the last layer index for any texture target. A lot of the cases below can't actually be hit with 3D textures, but let's be consistent. This fixes a failure in: piglit layered-rendering/clear-color-all-types 3d single_level for r600g and radeonsi, which was caused by an incorrect CMASK size calculation. Cc: Reviewed-by: Michel Dänzer <> (cherry picked from commit a9528cef6b6ff4875c9d125a60b7309a2ad24766)
2014-07-30radeonsi: fix occlusion queries on HawaiiMarek Olšák1-1/+7
This was just a guess - and it worked! Cc: Reviewed-by: Alex Deucher <> (cherry picked from commit 71ce92200e0314a0878088dec8c0c2a0270bc4dc)
2014-07-30winsys/radeon: fix vram_size overflow with HawaiiMarek Olšák1-1/+3
This fixes piglit spec/!OpenGL 3.1/minmax. Cc: Reviewed-by: Alex Deucher <> (cherry picked from commit 156b7e244c93e82f5d6b19caae1ec25e7f0e91bb)
2014-07-30radeonsi: fix a hang with streamout on HawaiiMarek Olšák2-1/+14
I actually couldn't reproduce this one, but internal docs recommend this workaround. Better safe than sorry. Also, the number of dwords for the sync packets is increased by 4 instead of 2, because it wasn't bumped last time when a new packet was added there. Cc: Reviewed-by: Alex Deucher <> (cherry picked from commit 0e7f56313d2a265cbdc2140f45dc4a0c6ae07e4e)
2014-07-30radeonsi: fix a hang with instancing on HawaiiMarek Olšák1-1/+15
This fixes "piglit/bin/arb_transform_feedback2-draw-auto instanced". Cc: Reviewed-by: Alex Deucher <> (cherry picked from commit 3d9e87406cfaf4a2bfef5b4bae50af94d1cc424f)
2014-07-30radeonsi: fix CMASK and HTILE calculations for HawaiiMarek Olšák1-2/+2
This fixes the checkerboard pattern in glxgears and anything that triggers fast color clear. num_channels is always <= 8, but Hawaii has 16 pipes. Cc: Reviewed-by: Alex Deucher <> (cherry picked from commit 9b046474c95f15338d4c748df9b62871bba6f36f)
2014-07-30r600g: switch SNORM conversion to DX and GLES behaviorMarek Olšák4-7/+0
it also matches GL 4.2 further discussion: Cc: (cherry picked from commit d5bcb5e8dea3dc949ff6b093af7f46585b94b63e)
2014-07-30nvc0: make sure that the local memory allocation is aligned to 0x10Ilia Mirkin1-1/+1
Signed-off-by: Ilia Mirkin <> Cc: <> (cherry picked from commit 47e5a8d7a24b80fe1738d88bfffcb04431d612e8)
2014-07-30nv50: fix build failure on m68k due to invalid struct alignment assumptionsThorsten Glaser1-0/+5
Make alignment assumptions explicit by inserting correct padding with unknown struct members. Reviewed-by: Ilia Mirkin <> Cc: <> (cherry picked from commit 3cfe6bc9cc369b29e5475b1bb0c60bbb37a6a1a2)
2014-07-17radeonsi: add support for TXB2Marek Olšák1-0/+3
This is needed by latest fixes for samplerCubeShadow with bias. Otherwise, a crash occurs.
2014-07-14radeonsi: fix samplerCubeShadow with biasMarek Olšák1-3/+3
Pack the depth value before overwriting it with cube coordinates. Cc: (cherry picked from commit b279f0143f4dce67c8f5af57cd4a5942eb403c13) Conflicts: src/gallium/drivers/radeonsi/si_shader.c
2014-07-10nvc0/ir: use manual TXD when offsets are involvedIlia Mirkin1-1/+2
Something about how we're implementing offsets for TXD is wrong, just flip to the generic quadop-based implementation in that case. This is the minimal fix appropriate for backporting. Signed-off-by: Ilia Mirkin <> Cc: <> (cherry picked from commit 114d46829d10c826927cabc1ca14884a4ee249f7)
2014-07-10nvc0/ir: do quadops on the right texture coordinates for TXDIlia Mirkin1-2/+3
handleTEX moves the layer as the first argument. This makes sure that the quadops deal with the texture coordinates. Signed-off-by: Ilia Mirkin <> Cc: <> (cherry picked from commit afea9bae67208cdb00b27a60c9cb013bf7d6de52)
2014-07-10nv50/ir: ignore bias for samplerCubeShadow on nv50Ilia Mirkin1-0/+10
Unfortunately there's no good way to do this on the nv50 shader isa. Dropping the bias seems preferable to doing the compare post-filtering. Signed-off-by: Ilia Mirkin <> Cc: <> (cherry picked from commit 1065aa92f4e448fbfe47c074f08dded1933a7f1f)
2014-07-10nv50/ir: retrieve shadow compare from first argIlia Mirkin1-1/+1
This can only happen with texture(samplerCubeShadow, bias), where the compare will be in the first argument. Signed-off-by: Ilia Mirkin <> Cc: <> (cherry picked from commit 30d91e0eecfe79e0d8515189a59051ee4f21f3da)