summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
Commit message (Collapse)AuthorAgeFilesLines
* nouveau: when mapping a persistent buffer, synchronize on former xfersIlia Mirkin2017-04-111-4/+2
| | | | | | | | | If the buffer is being used, we should wait for those uses to be complete before returning the map. Fixes: GL45-CTS.direct_state_access.buffers_functional Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nvc0: increase texture buffer object alignment to 256 for pre-GM107Ilia Mirkin2017-04-111-1/+1
| | | | | | | | | | | | | We currently don't pass the low byte of the address via the surface info, so in order to work with images, these have to implicitly be aligned to 256. The proprietary driver also doesn't go out of its way to provide lower alignment. Fixes GL45-CTS.texture_buffer.texture_buffer_texture_buffer_range Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected] Reviewed-by: Samuel Pitoiset <[email protected]>
* gallium/radeon: add HUD queries for GPU temperature and clocksSamuel Pitoiset2017-04-101-6/+6
| | | | | | | | | | | | | | | Only the Radeon kernel driver exposed the GPU temperature and the shader/memory clocks, this implements the same functionality for the AMDGPU kernel driver. These queries will return 0 if the DRM version is less than 3.10, I don't explicitely check the version here because the query codepath is already a bit messy. v2: - rebase on top of master Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add new si_check_render_feedback_texture() helperSamuel Pitoiset2017-04-101-45/+44
| | | | | | | For bindless. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add new si_decompress_color_texture() helperSamuel Pitoiset2017-04-101-13/+17
| | | | | | | For bindless. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add new depth_needs_decompression() helperSamuel Pitoiset2017-04-101-2/+8
| | | | | | | v2: - rename to depth_needs_decompression() instead Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: add a 'break' in si_check_render_feedback_*()Samuel Pitoiset2017-04-101-2/+6
| | | | | | | No need to check all color buffers. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* radeonsi: re-use 'desc' in si_set_shader_image()Samuel Pitoiset2017-04-101-2/+1
| | | | | | | No need to compute the offset in the descriptor twice. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* r600g: get rid of dummy pixel shaderConstantine Kharlamov2017-04-103-40/+30
| | | | | | | | | | | | | | | | The idea is taken from radeonsi. The code mostly was already checking for null pixel shader, so little checks had to be added. Interestingly, acc. to testing with GTAⅣ, though binding of null shader happens a lot at the start (then just stops), but draw_vbo() never actually sees null ps. v2: added a check I missed because of a macros using a prefix to choose a shader. Signed-off-by: Constantine Kharlamov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600g: add draw_vbo check for a NULL pixel shaderConstantine Kharlamov2017-04-104-2/+10
| | | | | | | | Taken from radeonsi, required to remove dummy pixel shader in the next patch Signed-off-by: Constantine Kharlamov <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* r600g: skip repeating vs, gs, and tes shader bindsConstantine Kharlamov2017-04-101-1/+7
| | | | | | | | | | | | | | | | | | | The idea is taken from radeonsi. The code lacks some checks for null vs, and I'm unsure about some changes against that, so I left it in place. Some statistics for GTAⅣ: Average tesselation bind skip per frame: ≈350 Average geometric shaders bind skip per frame: ≈260 Skip of binding vertex ones occurs rarely enough to not get into per-frame counter at all, so I just gonna say: it happens. v2: I've occasionally removed an empty line, don't do this. v3: return a check for null tes and gs back, while I haven't figured out the way to move stride assignment to r600_update_derived_state() (as it is in radeonsi). Signed-off-by: Constantine Kharlamov <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* nv50/ir: remove unused swizzle field in ValueRefIlia Mirkin2017-04-091-1/+0
| | | | | | | | The nv50 ir is scalar. Perhaps this was from some early attempts to integrate the simd aspects of nv30. However at this point it's entirely unused. Signed-off-by: Ilia Mirkin <[email protected]>
* nouveau: enable ARB_shader_clock on nv50 and nvc0Boyan Ding2017-04-092-2/+2
| | | | | | | v2: Also enable support on nv50 Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nv50/ir: Handle TGSI_OPCODE_CLOCKBoyan Ding2017-04-091-0/+7
| | | | | | Signed-off-by: Boyan Ding <[email protected]> [imirkin: make zero mov non-fixed] Reviewed-by: Ilia Mirkin <[email protected]>
* gm107/ir: Emit SV_CLOCK system valueBoyan Ding2017-04-091-0/+1
| | | | | Signed-off-by: Boyan Ding <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* nvc0/ir: fix overwriting of offset register with interpolateAtOffsetIlia Mirkin2017-04-071-2/+2
| | | | | Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* nvc0/ir: fix LSB/BFE/BFI implementationsIlia Mirkin2017-04-071-8/+11
| | | | | | | | | Overwriting the src register is a very bad idea - it logically maps onto the TGSI registers, and so is effectively overwriting the source values. Reported-by: Boyan Ding <[email protected]> Signed-off-by: Ilia Mirkin <[email protected]> Cc: [email protected]
* swr: fix unused variable warningsTim Rowley2017-04-072-2/+0
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* svga: add context pointer to the invalidate surface interfaceCharmaine Lee2017-04-074-11/+16
| | | | | | | | | | | | | | With this patch, we will specify the current context when we invalidate the surface before the surface is put back to the recycled surface pool. This allows the winsys layer to use the specified context to do the invalidation rather than using the last context that referenced the surface. This prevents race condition if the last referenced context is now made current in another thread. Tested with MTT glretrace, NobelClinicianViewer. Reviewed-by: Sinclair Yeh <[email protected]>
* svga: remove pre-SVGA3D_HWVERSION_WS8_B1 codeBrian Paul2017-04-071-71/+5
| | | | | | | | 3D wasn't officially supported before virtual HW version 8 so we can remove this old code. Reviewed-by: Charmaine Lee <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* svga: remove redundant surface propagationCharmaine Lee2017-04-072-12/+8
| | | | | | | | | | | Currently, surface propagation for colliding render target resource is done at framebuffer emit time for vgpu10. This patch adds the surface propagation for non-vgpu10 path to emit_fb_vgpu9() and removes the redundant surface copy at set time. Tested with MTT glretrace, piglit, NobelClinicianViewer, Turbine, Cinebench. Reviewed-by: Neha Bhende <[email protected]>
* svga: Fix zslice index to svga_texture_copy_handle_resource()Charmaine Lee2017-04-071-7/+10
| | | | | | | | | | | The zslice index to svga_texture_copy_handle_resource() is not adjusted and should be a signed integer. This patch fixes piglit tests for non-vgpu10 including spec@arb_framebuffer_object@fbo-generatemipmap-3d [email protected]@execution@tex-miplevel-selection gl2:texture* 3d Tested with MTT piglit and glretrace
* svga: specify include path for git_sha1.h for out-of-src buildsBrian Paul2017-04-071-0/+3
| | | | | | | If we're doing an out-of-src build, we need to specify the #include patch to find git_sha1.h Reviewed-by: Charmaine Lee <[email protected]>
* svga: Fix out-of-sync backing surfaceCharmaine Lee2017-04-071-21/+70
| | | | | | | | | | | | | | | When a backing surface is reused, it is possible that the original surface has been changed. So before the backing surface is bound again, we need to sync up the surface. This patch creates a new helper function svga_texture_copy_handle_resource() to sync up the backing surface resource. This patch, together with the backing surface dirty bit fix, fixes the rendering corruption in NobelClinicianViewer when rotating the model. Also tested with MTT glretrace, piglit, Cinebench, Turbine. Reviewed-by: Brian Paul <[email protected]>
* svga: add a reset flag to svga_propagate_surface()Charmaine Lee2017-04-074-8/+19
| | | | | | | | | The reset flag specifies if the dirty bit needs to be reset after the surface is propagated to the texture. This is used to make sure that the dirty bit is not reset and stay unset before the surface is unbound. Reviewed-by: Brian Paul <[email protected]>
* svga: add the has_backed_views flagCharmaine Lee2017-04-073-0/+15
| | | | | | | | | The new has_backed_views flag specifies if any of the render target views or depth stencil view is a backing surface view. The flag is used in svga_propagate_rendertargets() so it can return early if there is no surface to propagate. Reviewed-by: Brian Paul <[email protected]>
* svga: only destroy render target view from a context that created itCharmaine Lee2017-04-071-12/+23
| | | | | | | | | | | | | | A texture can be destroyed from a different context from which it is created, but destroying the render target view from a different context will cause svga device errors. Similar to shader resource view, this patch skips destroying render target view or depth stencil view from a non-parent context. Fixes driver errors running NobelClinician Viewer application. Tested with NobelClinician Viewer, MTT piglit, glretrace. Reviewed-by: Brian Paul <[email protected]>
* svga: disable rasterization if rasterizer_discard is set or FS undefinedCharmaine Lee2017-04-076-39/+128
| | | | | | | | | | | | | | | | | | | With this patch, rasterization will be disabled if the rasterizer_discard flag is set or the fragment shader is undefined due to missing position output from the vertex/geometry shader. Tested with piglit test glsl-1.50-geometry-primitive-id-restart. Also tested with full MTT glretrace and piglit. v2: As suggested by Roland, to properly disable rasterization, besides setting FS to NULL, we will also need to disable depth and stencil test. v3: As suggested by Brian, set SVGA_NEW_DEPTH_STENCIL_ALPHA dirty bit in svga_bind_rasterizer_state() if the rasterizer_discard flag is changed. Reviewed-by: Brian Paul <[email protected]>
* svga: do not emulate wide points in GS when doing transform feedbackCharmaine Lee2017-04-071-3/+5
| | | | | | | | | | Emulating wide points in geometry shader when doing transform feedback is problematic. This patch disables the emulation. Tested with piglit test ext_transform_feedback-points. Also tested with MTT glretrace, mesa demos pointblast and spriteblast. Reviewed-by: Brian Paul <[email protected]>
* gallium/radeon: fix typo in radeon_winsys.hSamuel Pitoiset2017-04-071-1/+1
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* swr: [rasterizer core] SIMD16 Frontend WIPTim Rowley2017-04-054-75/+1299
| | | | | | Implement widened binner for SIMD16 Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer core] Enable 8x2 backendTim Rowley2017-04-051-1/+1
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer codegen] remove copy of makoTim Rowley2017-04-0518-7201/+0
| | | | | | | | mako is already a mesa build requirement, extra copy not needed. Tested building against mesa build baseline (mako-0.8.0). Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer core/memory] Move intrinics to _simd functionsTim Rowley2017-04-055-117/+112
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer core] Programmable sample position supportTim Rowley2017-04-0512-596/+267
| | | | Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [configure.ac/scons] require c++14Tim Rowley2017-04-052-3/+3
| | | | | | New C++ features used by upcoming swr changes. Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer core] Fix center sample patternTim Rowley2017-04-053-26/+26
| | | | | | Fix long hidden bug in rasterizer handling of center sample pattern. Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer core/memory] Fix missing avx512 storetileTim Rowley2017-04-053-23/+14
| | | | | | | Fix pre-processor macro handing to eliminate silently missing implementation for AVX512. Reviewed-by: Bruce Cherniak <[email protected]>
* swr: [rasterizer core] SIMD16 Frontend WIPTim Rowley2017-04-052-37/+14
| | | | | | Implement widened VS output for SIMD16 Reviewed-by: Bruce Cherniak <[email protected]>
* Revert "etnaviv: Cannot render to rb-swapped formats"Christian Gmeiner2017-04-051-5/+2
| | | | | | | | | This reverts commit 658568941d5e232d690e1ffbcddbd6ea9685693a. With the help of shader variants we can render to rb-swapped formats now. Fixes about 60 piglits. Signed-off-by: Christian Gmeiner <[email protected]>
* etnaviv: add support for rb swapChristian Gmeiner2017-04-054-0/+38
| | | | | | | If we render to rb swapped format we will create a shader variant doing the involved swizzing in the pixel shader. Signed-off-by: Christian Gmeiner <[email protected]>
* etnaviv: adapt shader-db output for variant supportChristian Gmeiner2017-04-051-15/+15
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: bring back shader-db tracesChristian Gmeiner2017-04-051-0/+9
| | | | | | | | | If shader-db run, create a standard variant immediately (as otherwise nothing will trigger the shader to be actually compiled). Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: add etna_shader_key and generate variants if neededChristian Gmeiner2017-04-058-29/+97
| | | | Signed-off-by: Christian Gmeiner <[email protected]>
* etnaviv: pass a preallocated variant to compilerChristian Gmeiner2017-04-054-38/+62
| | | | | | | | | | | In the long run the compiler needs to know the specifc variant 'key' in order to compile appropriate assembly. With this commit the variant knows its shader and we are able pass the preallocated variant into etna_compile_shader(..). This saves us from passing extra ptrs everywhere. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: make specs constChristian Gmeiner2017-04-051-1/+1
| | | | Signed-off-by: Christian Gmeiner <[email protected]>
* etnaviv: add struct etna_shader_stateChristian Gmeiner2017-04-055-23/+24
| | | | | Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: add basic shader variant supportChristian Gmeiner2017-04-053-4/+60
| | | | | | | | | This commit adds some basic infrastructure to handle shader variants. We are still creating exactly one shader variant for each shader. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
* etnaviv: s/etna_shader/etna_shader_variantChristian Gmeiner2017-04-057-34/+34
| | | | | | Prep work to add shader variant support. Signed-off-by: Christian Gmeiner <[email protected]>
* etnaviv: remove not needed forward declarationsChristian Gmeiner2017-04-051-2/+0
| | | | Signed-off-by: Christian Gmeiner <[email protected]>