aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* etnaviv: fix bogus flush requests in transfer handlingLucas Stach2017-10-101-5/+10
| | | | | | | | | | The logic to decide if we need to flush the GPU command stream was broken and hard to reason about. Fix and clarify this. Fixes the data sync subtests from piglit arb_vertex_buffer_object. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* i965/tes: account for the fact that dvec3/4 inputs take two slotsIago Toral Quiroga2017-10-101-2/+7
| | | | | | | | | | | | | | | | | | | When computing the total size of the URB for tessellation evaluation inputs we were not accounting for this, and instead we were always assuming that each input would take a single vec4 slot, which could lead to computing a smaller read size than required. Specifically, this is a problem when the last input is a dvec3/4 such that its XY components are stored in the the second half of a payload register (which can happen if the offset for the input in the URB is not 64-bit aligned because there are 32-bit inputs mixed in) and the ZW components in the first half of the next, as in this case we would fail to account for the extra slot required for the ZW components. Fixes (requires another fix in CTS currently in review): KHR-GL45.enhanced_layouts.varying_locations KHR-GL45.enhanced_layouts.varying_array_locations Reviewed-by: Kenneth Graunke <[email protected]>
* anv: fix null pointer dereferenceTapani Pälli2017-10-101-0/+1
| | | | | | | | CID: 1419033 Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* radv: export KHR_relaxed_block_layoutDave Airlie2017-10-101-0/+4
| | | | | | | | This seems to pass all the cts tests it enables. Reviewed-by: Bas Nieuwenhuizen <[email protected]> Acked-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* nv50/ir: fix 64-bit integer shiftsIlia Mirkin2017-10-091-1/+3
| | | | | | | | | TGSI was adjusted to always pass in 64-bit integers but nouveau was left with the old semantics. Update to the new thing. Fixes: d10fbe5159 (st/glsl_to_tgsi: fix 64-bit integer bit shifts) Reported-by: Karol Herbst <[email protected]> Cc: [email protected]
* i965: silence coverity warningLionel Landwerlin2017-10-101-1/+1
| | | | | | | | | Also makes this statement a bit clearer. CID: 1418920 Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Antia Puentes <[email protected]>
* anv: Do not assert() on VK_ATTACHMENT_UNUSEDJózef Kucia2017-10-091-1/+2
| | | | | | Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Cc: [email protected]
* spirv: Fix SpvOpAtomicISubJózef Kucia2017-10-091-0/+1
| | | | | Reviewed-by: Jason Ekstrand <[email protected]> Cc: [email protected]
* glsl: tidy up IR after loop unrollingTimothy Arceri2017-10-101-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c7affbf6875622a enabled GLSLOptimizeConservatively on some drivers. The idea was to speed up compile times by running the GLSL IR passes only once each time do_common_optimization() is called. However loop unrolling can create a big mess and with large loops can actually case compile times to increase significantly due to a bunch of redundant if statements being propagated to other IRs. Here we make sure to clean things up before moving on. There was no measureable difference in shader-db compile times, but it makes compile times of some piglit tests go from a couple of seconds to basically instant. The shader-db results seemed positive also: Totals: SGPRS: 2829456 -> 2828376 (-0.04 %) VGPRS: 1720793 -> 1721457 (0.04 %) Spilled SGPRs: 7707 -> 7707 (0.00 %) Spilled VGPRs: 33 -> 33 (0.00 %) Private memory VGPRs: 3140 -> 2060 (-34.39 %) Scratch size: 3308 -> 2180 (-34.10 %) dwords per thread Code Size: 79441464 -> 79214616 (-0.29 %) bytes LDS: 436 -> 436 (0.00 %) blocks Max Waves: 558670 -> 558571 (-0.02 %) Wait states: 0 -> 0 (0.00 %) Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* glsl: make loop unrolling more like the nir unrolling pathTimothy Arceri2017-10-103-67/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code assumed that loop terminators will always be at the start of the loop, resulting in otherwise unrollable loops not being unrolled at all. For example the current code would unroll: int j = 0; do { if (j > 5) break; ... do stuff ... j++; } while (j < 4); But would fail to unroll the following as no iteration limit was calculated because it failed to find the terminator: int j = 0; do { ... do stuff ... j++; } while (j < 4); Also we would fail to unroll the following as we ended up calculating the iteration limit as 6 rather than 4. The unroll code then assumed we had 3 terminators rather the 2 as it wasn't able to determine that "if (j > 5)" was redundant. int j = 0; do { if (j > 5) break; ... do stuff ... if (bool(i)) break; j++; } while (j < 4); This patch changes this pass to be more like the NIR unrolling pass. With this change we handle loop terminators correctly and also handle cases where the terminators have instructions in their branches other than a break. V2: - fixed regression where loops with a break in else were never unrolled in v1. - fixed confusing/wrong naming of bools in complex unrolling. Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* glsl: check if induction var incremented before use in terminatorTimothy Arceri2017-10-101-0/+38
| | | | | | | | | | | | | | | | | | do-while loops can increment the starting value before the condition is checked. e.g. do { ndx++; } while (ndx < 3); This commit changes the code to detect this and reduces the iteration count by 1 if found. V2: fix terminator spelling Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Elie Tournier <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* glsl: don't drop instructions from unreachable terminators continue branchTimothy Arceri2017-10-102-8/+27
| | | | | | | | | | | | | These instructions will be executed on every iteration of the loop we cannot drop them. V2: - move removal of unreachable terminators from the terminator list to the same place they are removed from the IR as suggested by Nicolai. Reviewed-by: Nicolai Hähnle <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* meson: build classic swrastDylan Baker2017-10-092-0/+33
| | | | | | | | This adds support for building the classic swrast implementation. This driver has been tested with glxinfo and glxgears. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build gbmDylan Baker2017-10-092-1/+70
| | | | | | | | | | | | | This doesn't include egl support, just dri support. v2: - when gbm is set to 'auto', only build if a dri driver is also enabled - Fix conditional to check for x11 modules with vulkan as well as with dri drivers v3: - Set pkgconfig libraries.private value Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: Add support for configuring dri drivers directory.Dylan Baker2017-10-092-2/+2
| | | | | | | | v2: - drop with_ from dri_drivers_path variable (Eric A) v3: - Move HAVE_X11_PLATFORM to the proper patch (Eric A) Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: build glxDylan Baker2017-10-095-3/+304
| | | | | | | | | | | | | | | | | | | | | This gets GLX and the loader building. The resulting GLX and i965 have been tested on piglit and seem to work fine. This patch leaves a lot of todo's in it's wake, GLX is quite complicated, and the build options involved are many, and the goal at the moment is to get dri and gallium drivers building. v2: - fix typo "vaule" -> "value" - put the not on the correct element of the conditional - Put correct description of dri3 option in this patch not the next one (Eric A) - fix non glvnd version (Eric A) - build glx tests - move loader include variables to this patch (Eric A) v3: - set the version correctly for GL_LIB_NAME in libglx v4: - set pkgconfig private fields Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: Build i965 and dri stackDylan Baker2017-10-0920-15/+1886
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This gets pretty much the entire classic tree building, as well as i965, including the various glapis. There are some workarounds for bugs that are fixed in meson 0.43.0, which is due out on October 8th. I have tested this with piglit using glx. v2: - fix typo "vaule" -> "value" - use gtest dep instead of linking to libgtest (rebase error) - use gtest dep instead of linking against libgtest (rebase error) - copy the megadriver, then create hard links from that, then delete the megadriver. This matches the behavior of the autotools build. (Eric A) - Use host_machine instead of target_machine (Eric A) - Put a comment in the right place (Eric A) - Don't have two variables for the same information (Eric A) - Put pre_args at top of file in this patch (Eric A) - Fix glx generators in this patch instead of next (Eric A) - Remove -DMESON hack (Eric A) - add sha1_h to mesa in this patch (Eric A) - Put generators in loops when possible to reduce code in mapi/glapi/gen (Eric A) v3: - put HAVE_X11_PLATFORM in this patch Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* meson: add nir_linking_helpers.c to libnirDylan Baker2017-10-091-0/+1
| | | | | | | This was missed in a rebase, and doesn't affect radv or anv, only i965. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* make: Fix test to be meson compatibleDylan Baker2017-10-092-1/+3
| | | | | | | | This has the same problem as the previous commit, generated headers and hardcoded paths. Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* make: Don't traverse backwards through include directories.Dylan Baker2017-10-092-1/+2
| | | | | | | | | | | | Traversing back through includes is bad idea and should be avoided. In the case here - indirect_size.h is located in the build directory $(top_builddir)/src/glx/. v3: - Update commit message with message provided by Emil Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* etnaviv: call util_query_clear_result(..) in the generic layerChristian Gmeiner2017-10-092-2/+3
| | | | | | | | Saves us from calling util_query_clear_result(..) in every query type implementation. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-by: Wladimir J. van der Laan <[email protected]>
* etnaviv: push query active handling into generic layerChristian Gmeiner2017-10-092-6/+16
| | | | | | | | We want the same active handling for every query type. So lets handle it in the generic layer. Signed-off-by: Christian Gmeiner <[email protected]> Reviewed-By: Wladimir J. van der Laan <[email protected]>
* r600: drop a bunch of post-cayman code. (v2)Dave Airlie2017-10-1012-1251/+199
| | | | | | | | | | | | | Now that Marek has split the two drivers apart, drop a bunch of unnecessary code from the r600 half. There is probably a bunch more hiding in the video code. No piglit regressions on caicos. v2: fix HAVE_LLVM protected code Acked-by: Nicolai Hähnle <[email protected]> Acked-by: Marek Olšák <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* amd: move r600d_common.h into r600gMarek Olšák2017-10-0912-30/+27
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: shrink r600d_common.h and stop using itMarek Olšák2017-10-0919-261/+252
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: import cayman_msaa.c from drivers/radeonMarek Olšák2017-10-0910-307/+292
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: remove r600_emit_relocMarek Olšák2017-10-094-28/+18
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: merge si_set_streamout_targets with si_common_set_streamout_targetsMarek Olšák2017-10-093-126/+109
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add si_so_target_referenceMarek Olšák2017-10-091-2/+8
| | | | | | The src type is different on purpose. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: import r600_streamout from drivers/radeonMarek Olšák2017-10-0915-177/+181
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add performance thresholds for CP DMA, decrease it for clearsMarek Olšák2017-10-091-1/+7
| | | | | | The first one isn't used yet. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: disable primitive binning on Vega10 (v2)Marek Olšák2017-10-093-4/+19
| | | | | | | | | | | | | | | Our driver implementation is known to decrease performance for some tests, but we don't know if any apps and benchmarks (e.g. those tested by Phoronix) are affected. This disables the feature just to be safe. Set this to enable partial primitive binning: R600_DEBUG=dpbb Set this to enable full primitive binning: R600_DEBUG=dpbb,dfsm v2: add new debug options Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: enumerize DBG flagsMarek Olšák2017-10-0912-144/+155
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* drirc: whitelist glthread for Spec Ops: The LineMarek Olšák2017-10-091-0/+6
| | | | | | On i7 4790k and a 280X, there is a boost of about 10% more FPS. Nominated by John Ettedgui.
* radv: configure VGT_VERTEX_REUSE at pipeline creationSamuel Pitoiset2017-10-093-10/+16
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: do not need to zero-init ds/raster statesSamuel Pitoiset2017-10-091-3/+0
| | | | | | | Already done when creating the pipeline. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: remove unused fields in radv_raster_stateSamuel Pitoiset2017-10-091-3/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: set ALPHA_TO_MASK_ENABLE at blend state initSamuel Pitoiset2017-10-091-7/+7
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: emit PA_SU_POINT_{SIZE,MINMAX} in si_emit_config()Samuel Pitoiset2017-10-092-16/+15
| | | | | | | | | These registers don't change during the lifetime of the command buffer, there is no need to re-emit them when binding a new pipeline. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* radv: allow launching waves out-of-order for computeSamuel Pitoiset2017-10-091-1/+9
| | | | | | | | Ported from RadeonSI, and -pro seems to enable it as well. Signed-off-by: Samuel Pitoiset <[email protected]> Acked-by: Nicolai Hähnle <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
* anv/wsi: Allocate enough memory for the entire imageJason Ekstrand2017-10-071-3/+4
| | | | | | | | | | | | | | | | Previously, we allocated memory for image->plane[0].surface.isl.size which is great if there is no compression. However, on BDW, we can do CCS_D on X-tiled images so we also have to allocate space for the auxiliary buffer. This fixes hangs in some of the WSI CTS tests and should also reduce hangs in real applications. In particular, it fixes the dEQP-VK.wsi.*.incremental_present.* test group. When we hand the image off to X11 or Wayland, it will ignore the CCS entirely which is ok because we do a resolve when it's transitioned to VK_IMAGE_LAYOUT_PRESENT_SRC_KHR. Reviewed-by: Lionel Landwerlin <[email protected]> Cc: [email protected]
* anv: fix nir.h includeLionel Landwerlin2017-10-071-1/+1
| | | | | | | | | | | | All over mesa we include "nir/nir.h", we should probably do the same here. This fixes the meson build that was broken by the ycbcr series. Thanks to Dylan for finding the issue. Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: f3e91e78a337 ("anv: add nir lowering pass for ycbcr textures") Reviewed-by: Dylan Baker <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
* spirv: Don't warn on the ImageCubeArray capabilityJason Ekstrand2017-10-071-1/+1
| | | | Reviewed-by: Lionel Landwerlin <[email protected]>
* mesa: make glFramebuffer* check immutable texture level boundsKenneth Graunke2017-10-071-6/+14
| | | | | | | | | | | | | | When a texture is immutable, we can't tack on extra levels after-the-fact like we could with glTexImage. So check against that level limit and return an error if it's surpassed. This fixes: KHR-GL45.geometry_shader.layered_fbo.fb_texture_invalid_level_number (Based on a patch by Ilia Mirkin.) Reviewed-by: Antia Puentes <[email protected]> [imirkin v2] Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't change viewport for blits, use window-space positionsMarek Olšák2017-10-077-19/+6
| | | | | | The viewport state was an identity anyway. Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: set correct PA_SC_VPORT_ZMIN/ZMAX when viewport is disabledMarek Olšák2017-10-071-2/+19
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: minor cleanup of si_update_vs_writes_viewport_indexMarek Olšák2017-10-073-5/+9
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: don't save and restore vertex buffers and elements for u_blitterMarek Olšák2017-10-072-8/+9
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: use new VS blit shaders (VS inputs in SGPRs)Marek Olšák2017-10-075-57/+51
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* radeonsi: add VS blit shader creationMarek Olšák2017-10-077-2/+217
| | | | | | no users yet Reviewed-by: Nicolai Hähnle <[email protected]>