summaryrefslogtreecommitdiffstats
path: root/src/gallium
Commit message (Collapse)AuthorAgeFilesLines
* configure/swr: add KNL and SKX architecture targetsTim Rowley2017-07-192-0/+58
| | | | | | | | | | Not built by default. Currently only builds with icc. v2: * document knl,skx possibilities for swr_archs * merge with changed loader lib selection code Reviewed-by: Emil Velikov <[email protected]>
* configure/swr: configurable swr architecturesTim Rowley2017-07-193-8/+40
| | | | | | | | | | | | | | | | Allow configuration of the SWR architecture depend libraries we build for with --with-swr-archs. Maintains current behavior by defaulting to avx,avx2. Scons changes made to make it still build and work, but without the changes for configuring which architectures. v2: * add missing comma for swr_archs default * check that at least one architecture is enabled * modify loader logic to make it clearer how to add archs Reviewed-by: Emil Velikov <[email protected]>
* gallium/util: fix nondeterministic avx512 detectionTim Rowley2017-07-191-1/+1
| | | | | | | | | | cpuid.7 requires cx=0 to select the extended feature leaf. avx512 detection was using the non-indexed cpuid resulting in random non-detection of avx512. Cc: [email protected] Reviewed-by: Roland Scheidegger <[email protected]>
* etnaviv: advertise supported dmabuf modifiersLucas Stach2017-07-191-0/+44
| | | | | | | | | | | | Simply advertise all supported modifiers, independent of the format. Special formats, like compressed, which don't support all those modifiers are already culled from the dmabuf format list, as we don't support the render target binding for them. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* etnaviv: implement resource creation with modifierLucas Stach2017-07-194-7/+100
| | | | | | | | | | This allows to create buffers with a specific tiling layout, which is primarily used by GBM to allocate the EGL back buffers with the correct tiling/modifier for use with the scanout engines. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* etnaviv: fill in modifier in etna_resource_get_handleLucas Stach2017-07-191-0/+19
| | | | | | | | | | This allows the state trackers to know the tiling layout of the resource and pass this through the various userspace protocols. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* etnaviv: fold etna_screen_bo_get_handle into etna_resource_get_handleLucas Stach2017-07-193-28/+16
| | | | | | | | | | There is no point in keeping this indirection. Makes the code easier to follow. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> (v1) Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Daniel Stone <[email protected]>
* etnaviv: implement resource import with modifierLucas Stach2017-07-191-32/+77
| | | | | | | | | | | | | | | | This implements resource import with modifier, deriving the correct internal layout from the modifier and constructing a render compatible base resource if needed. This removes the special cases for DDX and renderonly scanout allocated buffers, as the linear modifier is enough to trigger correct handling of those buffers. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Acked-by: Daniel Stone <[email protected]>
* etnaviv: also update textures from external resourcesLucas Stach2017-07-191-8/+16
| | | | | | | | | | | | This reworks the logic in etna_update_sampler_source to select the newest resource view for updating the texture view. This should make the logic easier to follow and fixes texture updates from imported dma-bufs. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: increment correct seqno for external resourcesLucas Stach2017-07-191-1/+4
| | | | | | | | | | | | If we import a dma-buf with a sampler/pixel pipe incompatible modifier, the imported buffer will end up in an external resource view. As resource_changed signals the change of the imported resource, we need to update the external view seqno, instead of the base resource seqno. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: pad scanout buffer size to RS alignmentLucas Stach2017-07-191-2/+8
| | | | | | | | | | This fixes failures to import the scanout buffer with screen resolutions that don't satisfy the RS alignment restrictions, like 1680x1050. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: add helper to work out RS alignmentLucas Stach2017-07-192-9/+18
| | | | | | | | The minimum RS alignment calculation is needed in various places. Extract a helper to avoid open-coding the calcuation at every site. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* renderonly/etnaviv: stop importing resource from renderonlyLucas Stach2017-07-196-62/+62
| | | | | | | | | | | The current way of importing the resource from renderonly after allocation is opaque and is taking away control from the driver, which it needs in order to implement more advanced scenarios than the simple linear scanout with matching stride alignments. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]> Acked-by: Daniel Stone <[email protected]>
* gallium: auxiliary: Fix standalone Android build of u_cpu_detect (v2)Tomasz Figa2017-07-192-2/+10
| | | | | | | | | | | | | | | | | | Commit 463b7d0332c5("gallium: Enable ARM NEON CPU detection.") introduced CPU feature detection based Android cpufeatures library. Unfortunately it also added an assumption that if PIPE_OS_ANDROID is defined, the library is also available, which is not true for the standalone build without using Android build system. Fix it by defining HAS_ANDROID_CPUFEATURES in Android.mk and replacing respective #ifdefs to use it instead. v2: - Add a comment explaining why the separate flag is needed (Emil). Signed-off-by: Tomasz Figa <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* swr: remove unneeded fallback strcasecmp defineEmil Velikov2017-07-191-5/+0
| | | | | | | | | The last user of the function was removed with earlier commit. Fixes: 50842e8a931 ("swr: replace gallium->swr format enum conversion") Cc: Tim Rowley <[email protected]> Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Tim Rowley <[email protected]>
* st/dri: list __DRI2_FENCE extension only where neededEmil Velikov2017-07-191-1/+0
| | | | | | | | | The extension should be present (if applicable) in the list returned by getExtensions(). AFAICT no loader has ever looked for it in __driDriverExtensions/__driDriverGetExtensions. Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Alex Deucher <[email protected]>
* swrast: add dri2ConfigQueryExtension to the correct extension listEmil Velikov2017-07-191-1/+1
| | | | | | | | | | | | The extension should be in the list as returned by getExtensions(). Seems to have gone unnoticed since close to nobody wants to change the vblank mode for the software driver. v2: Rebase Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Alex Deucher <[email protected]> (v1)
* util: Make CLAMP turn NaN into MIN.Kenneth Graunke2017-07-181-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation of CLAMP() allowed NaN to pass through unscathed, by failing both comparisons. NaN isn't exactly a value between MIN and MAX, which can break the assumptions of many callers. This patch changes CLAMP to convert NaN to MIN, arbitrarily. Callers that need NaN to be handled in a specific manner should probably open code something, or use a macro specifically designed to do that. Section 2.3.4.1 of the OpenGL 4.5 spec says: "Any representable floating-point value is legal as input to a GL command that requires floating-point data. The result of providing a value that is not a floating-point number to such a command is unspecified, but must not lead to GL interruption or termination. In IEEE arithmetic, for example, providing a negative zero or a denormalized number to a GL command yields predictable results, while providing a NaN or an infinity yields unspecified results." While CLAMP may apply to more than just GL inputs, it seems reasonable to follow those rules, and allow MIN as an "unspecified result". This prevents assertion failures in i965 when running the games "XCOM: Enemy Unknown" and "XCOM: Enemy Within", which call glTexEnv(GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, -nan(0x7ffff3)); presumably unintentionally. i965 clamps the LOD bias to be in range, and asserts that it's in the proper range when converting to fixed point. NaN is not, so it crashed. We'd like to at least avoid that. Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* radeonsi: add back the USE_MININUM_PRIORITY flag to the low-prio compiler queueMarek Olšák2017-07-181-1/+2
| | | | | | | Accidentally removed in 9f320e0a387a1009c5218daf130b3b754a3c2800. Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* winsys/svga/drm: Enable import/export fence FDSinclair Yeh2017-07-173-19/+53
| | | | | | | | | Enable the capability if the DRM supports it. Hook up mechanism to send and receive fence FD from the DRM. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* winsys/svga/drm: Connect winsys-side fence_* functionsSinclair Yeh2017-07-174-10/+109
| | | | | | | | | Connect fence_get_fd, fence_create_fd, and fence_server_sync. Implement the required functions in vmw_fence module. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* drivers/svga: Connect driver-side fence_* functionsSinclair Yeh2017-07-172-1/+56
| | | | | | | | | Connect fence_get_fd, fence_create_fd, and fence_server_sync. Return PIPE_CAP_NATIVE_FENCE_FD capability based on what the winsys reports Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* winsys/svga/drm: Create winsys interface for Fence FDSinclair Yeh2017-07-171-1/+33
| | | | | | | | The new interfaces will be used to enable EGL_ANDROID_native_fence_sync. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* winsys/svga/drm: Prepare to support fence fdSinclair Yeh2017-07-171-3/+8
| | | | | | | Make the fields and flags available. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* drivers/svga, winsys/svga/drm: Thread through timeout for fence_finishSinclair Yeh2017-07-177-8/+18
| | | | | | | | | | | | The timeout parameter is required to implement EGL_ANDROID_native_fence_sync. v2 * Replaced default timeout from 0 to PIPE_TIMEOUT_INFINITE * Add more documentation to the new timeout parameter Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
* svga: whitespace clean-up in svga_winsys.hBrian Paul2017-07-171-67/+66
| | | | Trivial.
* svga: add some const qualifiersBrian Paul2017-07-171-3/+3
| | | | Trivial.
* svga: add comment about 'extra' constant locationsBrian Paul2017-07-171-1/+5
| | | | Trivial.
* radeonsi/gfx9: add VM fault dmesg parser supportMarek Olšák2017-07-171-6/+23
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: automatically resize shader compiler thread queues when they are fullMarek Olšák2017-07-171-8/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: prevent a deadlock in util_queue_add_job with too many GL contextsMarek Olšák2017-07-171-1/+2
| | | | | | | | | | | | | | | | If the queue is full, util_queue_add_job will wait while bo_fence_lock is held. It pb_slab wants to reuse a buffer, it will lock the pb_slab mutex and try to check BO fence busyness, but it has to wait for bo_fence_lock to get released. Both bo_fence_lock and pb_slab mutex are locked now. When the CS thread unreferences and releases a suballocated buffer, it will try to lock the pb_slab mutex and has to wait. The CS thread can't finish its job in order to free a queue slot and unblock util_queue_add_job ==> deadlock. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: expose ARB_timer_query unconditionallyMarek Olšák2017-07-171-5/+2
| | | | | | clock_crystal_freq is always non-zero now. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: don't read back non-existent register SRBM_STATUS2Marek Olšák2017-07-171-1/+1
| | | | | | It looks like there is no way to monitor SDMA busyness on GFX9. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: prevent a crash with DBG_CHECK_VM and u_threaded_contextMarek Olšák2017-07-171-4/+6
| | | | | | by setting PIPE_CONTEXT_DEBUG in the caller Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: simplify computation of tessellation offchip buffersMarek Olšák2017-07-171-15/+4
| | | | | | This is overly cautious, but better safe than sorry. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi/gfx9: add workarounds to avoid VGPR indexing completelyMarek Olšák2017-07-173-8/+21
| | | | | | | | | | For inputs and outputs, indirect indexing is lowered by the GLSL compiler. For temporaries, use alloca and disable the "promote-alloca" pass. In the future, we could switch all codepaths to alloca permanently and just rely on the "promote-alloca" pass. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: emit param exports after position exportsMarek Olšák2017-07-171-3/+3
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: move building parameter exports into a separate functionMarek Olšák2017-07-171-84/+78
| | | | | | Both loops now look simple. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't use info.num_inputs when it's unusedMarek Olšák2017-07-171-1/+1
| | | | | | For clarity. It's only used by color interpolation. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add si_build_fs_interp helperMarek Olšák2017-07-171-61/+39
| | | | | | This is much simpler. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: merge si_llvm_get_amdgpu_target into ac_get_llvm_targetMarek Olšák2017-07-173-45/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallivm: inline gallivm_init_llvm_targetsMarek Olšák2017-07-172-18/+8
| | | | | | there is only one user. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't call gallivm_init_llvm_targetsMarek Olšák2017-07-171-1/+0
| | | | | | It's for initializing the native (x86) target. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: reallocate suballocated buffers when exportedMarek Olšák2017-07-172-1/+28
| | | | | | This should fix exports of suballocated buffers. Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/radeon: flush the context after in-place texture realloc before exportMarek Olšák2017-07-171-0/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* st/va: Fix scaling list ordering for H.265Mark Thompson2017-07-173-7/+49
| | | | | | | | | | | | | Mesa here requires the scaling lists in diagonal scan order, but VAAPI passes them in raster scan order. Therefore, rearrange the elements when copying. v2: Move scan tables to vl_zscan.c. Fix type in size assertion. Cc: [email protected] Signed-off-by: Mark Thompson <[email protected]> Reviewed-by: Christian König <[email protected]>
* gallium/u_blitter: don't use TXF for scaled blitsMarek Olšák2017-07-171-4/+6
| | | | | | | | | There seems to be a rounding difference with F2I vs nearest filtering. The precise problem in the rounding is unknown. This fixes an incorrect output with OpenMAX encoding. Reviewed-by: Nicolai Hähnle <[email protected]>
* ddebug: fix parsing of the pipelined modeSamuel Pitoiset2017-07-171-1/+1
| | | | | | | Trivial. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* swr: JitManager runtime determination of architectureTim Rowley2017-07-141-1/+2
| | | | | | | Fixes performance regression from f50aa21456d - was forcing internal code generation to target AVX (no gather, etc). Reviewed-by: Bruce Cherniak <[email protected]>
* st/mesa: Add KHR_no_error toggle to driconfGrigori Goronzy2017-07-142-0/+4
| | | | | | | | Allows applications to be whitelisted. v2: Remove misguided DRI common part. Reviewed-by: Marek Olšák <[email protected]>