summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
Commit message (Collapse)AuthorAgeFilesLines
* svga: fix a texture readback bugBrian Paul2016-08-292-6/+12
| | | | | | | | | | | | | | | | | | | | Backing views/surfaces are used to handle the case when a resource is bound both as a render target and as a sampler source (such as when doing auto mipmap generation). This patch fixes a bug where mapping a resource (to do a glReadPixels) was reading the stale data in the original surface rather than the backing surface which was rendered to. We need to propagate the backing resource (which we rendered to) back to the original resource before we read from it. The problem was the svga_propagate_rendertargets() function was examining the wrong surface views. This fixes the "poc9" test described in VMware bug 1686661. Also tested with Piglit, Cinebench, Lightsmark, etc. Reviewed-by: Charmaine Lee <[email protected]>
* svga: move surface propagation code into new functionBrian Paul2016-08-293-11/+27
| | | | | | | Put new svga_propagate_rendertargets() function where all the other surface propagation code lives. Reviewed-by: Charmaine Lee <[email protected]>
* radeonsi: add support for cull distances. (v1.1)Dave Airlie2016-08-302-4/+5
| | | | | | | | | | This should be all that is required for cull distances to work on radeonsi. v1.1: whitespace cleanup, add docs fix clipdist_mask usage. Reviewed-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* gallium: add cap to export device pointer sizeJan Vesely2016-08-295-0/+19
| | | | | | | | | v2: document the new cap v3: fix 80 char limit in screen.rst Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Acked-by: Ilia Mirkin <[email protected]>
* svga: s/unsigned/enum pipe_shader_type/Brian Paul2016-08-2911-22/+24
| | | | Reviewed-by: Charmaine Lee <[email protected]>
* r600g: Clean up defined magic numbers for TGSI opcodesRhys Kidd2016-08-291-7/+7
| | | | | | | | | | | | Small code clean up that removes magic numbers where a TGSI opcode has been defined. No functional change expected as each opcode is unsupported on the respective hardware. Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: James Harvey <[email protected]>
* r600g: Avoid duplicated initialization of TGSI_OPCODE_DFMARhys Kidd2016-08-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by Clang, TGSI_OPCODE_DFMA (defined magic number 118) is currently initialized twice for Cayman and Evergreen. When Jan Vesely added double precision FMA opcode it did make sense to locate it immediately after TGSI_OPCODE_DMAD, although this is out of order. This change cleans up the prior magic number definition and ensures any later reordering of this struct will not create problems. Prior change was: commit 015e2e0fce3eea7884f8df275c2fadc35143a324 Author: Jan Vesely <[email protected]> Date: Sat Jul 2 16:14:54 2016 -0400 r600g: Add double precision FMA ops Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96782 Fixes: 54c4d525da7c7fc1e103d7a3e6db015abb132d5d ("r600g: Enable FMA on chips that support it") Signed-off-by: Jan Vesely <[email protected]> Tested-by: James Harvey <[email protected]> Signed-off-by: Marek Olšák <[email protected]> Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Jan Vesely <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: James Harvey <[email protected]>
* i915g: Fix typo in i915_translate_instruction()Rhys Kidd2016-08-291-1/+1
| | | | | | | | | | | Noticed this error in a debug message whilst reviewing https://bugs.freedesktop.org/show_bug.cgi?id=97477 This patch doesn't go towards fixing that bug, but at least may clarify future debug output. Signed-off-by: Rhys Kidd <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* vc4: Handle discards while in control flow.Eric Anholt2016-08-292-6/+28
| | | | | I missed this while adding loop support because the discard test inside a loop was crashing before, anyway. Fixes piglit glsl-fs-discard-04.
* vc4: Mark when we add discards while lowering blend state.Eric Anholt2016-08-291-0/+1
|
* swr: [rasterier core] fix GetRasterizerFunc selectionTim Rowley2016-08-292-4/+4
| | | | | | | Only rasterize scissor edges if one or more scissor/viewport rects are not hottile aligned. Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] whitespace cleanupTim Rowley2016-08-291-3/+1
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer jitter] reimplement SCATTERPSTim Rowley2016-08-292-16/+100
| | | | | | | Implement SCATTERPS as a dynamic loop based on mask set bits instead of a static compile time loop. Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] upper left rule for scissorsTim Rowley2016-08-292-4/+12
| | | | | | Fixes upper left rule for scissors and viewport/scissor macrotile alignment. Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer scripts] undef DEFINE_KNOB after usageTim Rowley2016-08-291-0/+2
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] minor cleanup to thread initializationTim Rowley2016-08-293-13/+12
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] remove KNOB_MAX_THREADSTim Rowley2016-08-296-51/+77
| | | | | | Use dynamic memory allocation for per-thread data Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] track guardbands per viewport rectTim Rowley2016-08-293-18/+26
| | | | Signed-off-by: Tim Rowley <[email protected]>
* swr: [rasterizer core] per-primitive viewports/scissorsTim Rowley2016-08-297-71/+214
| | | | | | | | - use per-primitive viewports throughout the pipeline. - track whether all available scissor rects are tile aligned. Causes failures, so not taken into account when choosing rasterizer yet. Signed-off-by: Tim Rowley <[email protected]>
* radeonsi: Don't use global variables for tess ldsTom Stellard2016-08-291-9/+6
| | | | | | | | | We were allocating global variables for the maximum LDS size which made the compiler think we were using all of LDS, which isn't the case. Reviewed-By: Edward O'Callaghan <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* softpipe: (trivial) honor render_condition_enabled for clear_rt/clear_dsRoland Scheidegger2016-08-291-2/+2
|
* llvmpipe: (trivial) honor render_condition_enabled for clear_rt/clear_dsRoland Scheidegger2016-08-291-2/+2
|
* gallium: Use enum pipe_shader_type in set_shader_images()Kai Wasserbäch2016-08-296-6/+9
| | | | | Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: Use enum pipe_shader_type in set_shader_buffers()Kai Wasserbäch2016-08-294-6/+8
| | | | | Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: Use enum pipe_shader_type in set_sampler_views()Kai Wasserbäch2016-08-2922-23/+32
| | | | | Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: Use enum pipe_shader_type in bind_sampler_states() (v2)Kai Wasserbäch2016-08-2922-24/+42
| | | | | | | | | | | v1 → v2: - Fixed indentation (noted by Brian Paul) - Removed second assert from nouveau's switch statements (suggested by Brian Paul) Signed-off-by: Kai Wasserbäch <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/radeon: clear dirty_level_mask when discarding CMASKMarek Olšák2016-08-291-0/+1
| | | | | | This fixes: GL45-CTS.texture_barrier.* Tested-by: Michel Dänzer <[email protected]>
* svga: minor whitespace, etc clean-ups in svga_pipe_misc.cBrian Paul2016-08-261-26/+23
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: move some code in svga_propagate_surface()Brian Paul2016-08-261-18/+19
| | | | | | | Move computation of zslice, layer inside the conditional where they're used. Reviewed-by: Neha Bhende <[email protected]>
* svga: simplify surface propagation code in svga_set_framebuffer_state()Brian Paul2016-08-261-12/+4
| | | | | | Rewrite the comment too. Reviewed-by: Neha Bhende <[email protected]>
* svga: add some comments in the svga_surface structBrian Paul2016-08-261-0/+16
| | | | | | Give more info about backing resources/surfaces. Reviewed-by: Neha Bhende <[email protected]>
* svga: use new svga_check_sampler_framebuffer_resource_collision()Brian Paul2016-08-261-18/+3
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: add new svga_check_sampler_framebuffer_resource_collision()Brian Paul2016-08-262-1/+36
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: remove assertions in svga_surface cast wrappersBrian Paul2016-08-261-2/+0
| | | | | | | We don't do this for other cast wrappers. And this will simplify some code at call sites. Reviewed-by: Neha Bhende <[email protected]>
* svga: minor code simplification in svga_texture_transfer_unmap()Brian Paul2016-08-261-2/+1
| | | | | | Use the tex variable instead of using svga_texture() again. Reviewed-by: Neha Bhende <[email protected]>
* svga: reformat some expressions in svga_texture_transfer_map()Brian Paul2016-08-261-3/+3
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: remove duplicated variable in svga_texture_transfer_map()Brian Paul2016-08-261-1/+0
| | | | | | tex was already declared at the function body scope. Reviewed-by: Neha Bhende <[email protected]>
* svga: move some assignments in svga_texture_transfer_map()Brian Paul2016-08-261-4/+4
| | | | | | Put near other assignments to the svga_transfer variable. Reviewed-by: Neha Bhende <[email protected]>
* svga: minor simplifications in svga_texture_transfer_map()Brian Paul2016-08-261-9/+9
| | | | | | Use local vars instead of jumping through a pointer. Reviewed-by: Neha Bhende <[email protected]>
* svga: minor reformatting of svga_texture() cast wrapperBrian Paul2016-08-261-1/+2
| | | | Reviewed-by: Neha Bhende <[email protected]>
* svga: rewrite svga_buffer() cast wrapperBrian Paul2016-08-261-6/+4
| | | | | | To make it symmetric with the svga_texture() cast wrapper. Reviewed-by: Neha Bhende <[email protected]>
* svga: remove local variable in create_backed_surface_view()Brian Paul2016-08-261-7/+4
| | | | | | To simplify the code a bit. Reviewed-by: Neha Bhende <[email protected]>
* r600: increase performance for DRI PRIME offloading if 2nd GPU is Evergreen+Mario Kleiner2016-08-261-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a direct port of Marek Olšáks patch "radeonsi: increase performance for DRI PRIME offloading if 2nd GPU is CIK or VI" to r600. It uses SDMA for the detiling blit from renderoffload VRAM to GTT, as SDMA is much faster for tiled->linear blits from VRAM to GTT. Testing on a dual Radeon HD-5770 setup reduced the time for the render offload gpu to get its rendering into system RAM from approximately 16 msecs for simple rendering at 1920x1080 pixel 32 bpp to 5 msecs, a > 3x speedup! This was measured using ftrace to trace the time the radeon kms driver waited on the dmabuf fence of the renderoffload gpu to complete. All in all this brought the time for a flip down from 20 msecs to 9 msecs, so the prime setup can display at full 60 fps instead of barely 30 fps vsync'ed. The current r600 implementation supports SDMA on Evergreen and later, but not R600/R700 due to some bugs apparently present in their SDMA implementation. Signed-off-by: Mario Kleiner <[email protected]> Cc: Marek Olšák <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* svga: add guest statistic gathering interfaceCharmaine Lee2016-08-261-0/+49
| | | | | | | This file was supposed to be added with the previous "svga: add guest statistic gathering interface" patch but went MIA for some reason. Reviewed-by: Brian Paul <[email protected]>
* radeonsi: disable CE on SI + AMDGPUMarek Olšák2016-08-261-1/+3
| | | | | Reviewed-by: Edward O'Callaghan <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* gallium/radeon: add a driver query for AMDGPU_INFO_NUM_EVICTIONSMarek Olšák2016-08-263-2/+8
| | | | | | If the kernel driver doesn't support it, it returns 0. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radeonsi: fix printing shaders and states on a VM faultMarek Olšák2016-08-261-1/+3
| | | | | | This was missed while rewriting the PIPE_DUMP flags. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radeonsi: increase performance for DRI PRIME offloading if 2nd GPU is CIK or VIMarek Olšák2016-08-261-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | SDMA is much faster for tiled->linear blits from VRAM to GTT. I have Bonaire in my second PCIe slot. $ glxinfo | grep OpenGL.renderer OpenGL renderer string: Gallium 0.4 on AMD TONGA ... $ DRI_PRIME=1 glxinfo | grep OpenGL.renderer OpenGL renderer string: Gallium 0.4 on AMD BONAIRE ... Without SDMA: $ DRI_PRIME=1 glxgears 8796 frames in 5.0 seconds = 1759.074 FPS 8899 frames in 5.0 seconds = 1779.672 FPS With SDMA: $ DRI_PRIME=1 glxgears 12765 frames in 5.0 seconds = 2552.788 FPS 12888 frames in 5.0 seconds = 2577.495 FPS The 1st GPU is irrelevant. The improvement should be much lower at 60 fps, but definitely measurable. SI will get this once we add SDMA blit support for it. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radeonsi: enable SDMA on CIKMarek Olšák2016-08-261-4/+0
| | | | | | It passes R600_DEBUG=testdma on Bonaire/radeon. Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* gallium/radeon: increase priority for shader binariesMarek Olšák2016-08-262-2/+2
| | | | Reviewed-by: Bas Nieuwenhuizen <[email protected]>