summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* anv/pipeline: Disable FS dispatch for pointless fragment shadersJason Ekstrand2018-08-031-4/+33
| | | | Reviewed-by: Kenneth Graunke <[email protected]>
* nir: add fall through comment to nir_gather_infoTimothy Arceri2018-08-031-0/+1
| | | | | | | This stops Coverity reporting a defect and helps make the code less error-prone. Reviewed-by: Jason Ekstrand <[email protected]>
* CleanSpec.mk: Remove HOST_OUT_releaseDan Willemsen2018-08-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a forward port of a patch from the AOSP/master tree: https://android.googlesource.com/platform/external/mesa3d/+/bd633f11de0c6ac1ed333a28344c74fd9898df9e%5E%21/ Which replaces HOST_OUT_release with HOST_OUT As per Dan's explanation, the current code was incorrect to use $(HOST_OUT_release) as $(HOST_OUT) will be set properly for whether the current build that's being cleaned during incrementals is using host debug or release builds. Additionally Dan noted it was incredibly uncommon to use a debug host build, as there was never a shortcut and one had to set an environment variable manually. Thus it was rarely if ever tested. Change-Id: I7972c0a50fa3520dcfa962d6dd7e602bfe22368d Cc: Rob Herring <[email protected]> Cc: Alistair Strachan <[email protected]> Cc: Marissa Wall <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Emil Velikov <[email protected]> Cc: Rob Clark <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: John Stultz <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* Android.common.mk: define HAVE_TIMESPEC_GETSumit Semwal2018-08-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | This is a forward port of a patch from the AOSP/master tree: https://android.googlesource.com/platform/external/mesa3d/+/bd30b663f55f8af73a0be4446349c5a2d4c641b0%5E%21/ Since https://android-review.googlesource.com/c/718518 added timespec_get() to bionic, mesa3d doesn't build due to redefinition of timespec_get(). Avoid redefinition by defining HAVE_TIMESPEC_GET flag. Test: build and boot tested db820c to UI. Change-Id: I3dcc8034b48785e45cd3fa50e4d9cf2c684694a0 Cc: Rob Herring <[email protected]> Cc: Alistair Strachan <[email protected]> Cc: Marissa Wall <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Emil Velikov <[email protected]> Cc: Rob Clark <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Signed-off-by: John Stultz <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* util: Android.mk: Convert implicit rules to static pattern rulesDan Willemsen2018-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial cherry-pick from AOSP's mesa3d tree: https://android.googlesource.com/platform/external/mesa3d/+/a88dcf769eb00a4ffc7183a0396d881a28b5a29b%5E%21/ "We're deprecating make implicit rules, preferring static pattern rules, or just regular rules." Without this patch, the freedesktop/master branch won't build in the AOSP environment, and this patch corrects that, as tested on the Dragonboard 820c. The i965 portion of the patch this is based on collided badly, and I'm not sure how to best forward port it. However, so far we don't see build issues without that portion. Comments or feedback would be appreciated! Change-Id: Id6dfd0d018cbd665fa19d80c14abd5f75fa10b8a Cc: Rob Herring <[email protected]> Cc: Alistair Strachan <[email protected]> Cc: Marissa Wall <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Emil Velikov <[email protected]> Cc: Rob Clark <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: John Stultz <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* radeonsi: add new R600_DEBUG test "testclearbufperf"Darren Powell2018-08-028-11/+170
| | | | | Signed-off-by: Darren Powell <[email protected]> Signed-off-by: Marek Olšák <[email protected]>
* mesa: add switch case for GL 2.0 in _mesa_compute_version()Brian Paul2018-08-021-0/+2
| | | | | | | | | | Previously, I added a switch case for GL 2.1 (ed7a0770b881791dd697f3). I don't know of any driver which only supports GL 2.0, but adding this switch case avoids a failure if the app queries GL_SHADING_LANGUAGE_VERSION. Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* intel/tools: add error2aub creation into autotoolsAndres Gomez2018-08-021-1/+23
| | | | | | | | | | | | | | Tarball distribution is done through "make distcheck". We include the meson targets also into autotools so they won't fail when building from the tarball. Fixes: 6a60beba408 ("intel/tools: Add an error state to aub translator") Cc: Jason Ekstrand <[email protected]> Cc: Lionel Landwerlin <[email protected]> Cc: Dylan Baker <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* anv/pipeline: Do cross-stage linking optimizationsJason Ekstrand2018-08-021-0/+11
| | | | | | | This appears to help the Aztec Ruins benchmark by about 2% on my Kaby Lake gt2 laptop. Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Pull most of the anv_pipeline_compile_* into common codeJason Ekstrand2018-08-021-215/+92
| | | | | | | | | | This leaves us with a series of little anv_pipeline_compile_* functions which each take a compiler object, a mem_ctx, the stage to compile, and the previous stage for VUE linking purposes. Some of them do interesting things but most are little more than wrappers around brw_compile_*. Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Add a separate "link" stageJason Ekstrand2018-08-021-128/+193
| | | | | | | | | | | This breaks compilation up a bit into "link" and "compile". In the "link" stage, new anv_pipeline_link_* helpers are called which are responsible for setting up the binding table and doing anything needed to properly link with the next stage in the pipeline if one exists. They are called in reverse order starting with the fragment shader so you can assume linking in later stages is already done. Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Compile to NIR in compile_graphicsJason Ekstrand2018-08-021-161/+116
| | | | | | This pulls the SPIR-V to NIR step out into common code. Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Recompile all shaders if any are missing from the cacheJason Ekstrand2018-08-021-4/+37
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Drop anv_pipeline_add_compiled_stageJason Ekstrand2018-08-022-19/+10
| | | | | | | We can set active_stages much more directly and then it's just candy around setting pipeline->stages[stage]. Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Pull shader compilation out into a helper.Jason Ekstrand2018-08-021-108/+120
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Call anv_pipeline_compile_* in a loopJason Ekstrand2018-08-021-26/+30
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Hash the entire pipeline in one goJason Ekstrand2018-08-021-53/+94
| | | | | | | | | Instead of hashing each stage separately (and TES and TCS together), we hash the entire pipeline. This means we'll get fewer cache hits if they, for instance, re-use the same VS over and over again but it also means we can now safely do cross-stage optimizations. Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Populate keys up-frontJason Ekstrand2018-08-021-55/+60
| | | | | | | | Instead of having each anv_pipeline_compile_* function populate the shader key, make it part of the anv_pipeline_stage struct and fill it out up-front. Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipline: Add a helper struct for per-stage infoJason Ekstrand2018-08-022-95/+74
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* meson: use correct keyword to fix a meson warningJon Turney2018-08-021-1/+1
| | | | | | | | | | | | | With a sufficently recent meson, the following warning is produced: WARNING: Passed invalid keyword argument "extra_args". WARNING: This will become a hard error in the future. It seems that compiler.links(args:) is meant here. Signed-off-by: Jon Turney <[email protected]> Reviewed-and-Tested-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* docs: add 18.3.0-devel release notes templateAndres Gomez2018-08-021-0/+71
| | | | Signed-off-by: Andres Gomez <[email protected]>
* mesa: bump version to 18.3.0-develAndres Gomez2018-08-021-1/+1
| | | | Signed-off-by: Andres Gomez <[email protected]>
* egl/main: fix indentationEric Engestrom2018-08-022-2/+2
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Frank Binns <[email protected]>
* loader: fix indentationEric Engestrom2018-08-022-3/+3
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Frank Binns <[email protected]>
* swr: Remove unnecessary memset callVlad Golovkin2018-08-021-1/+0
| | | | | | | | | | Zeroing memory after calloc is not necessary. This also allows to avoid possible crash when allocation fails, because memset is called before checking screen for NULL. Fixes: a29d63ecf71546c4798c6 "swr: refactor swr_create_screen to allow for proper cleanup on error" Reviewed-by: Eric Engestrom <[email protected]>
* mesa: replace binary constants with hexadecimal constants18.2-branchpointAndres Gomez2018-08-021-58/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The binary constant notation "0b" is a GCC extension. Instead, we use hexadecimal notation to fix the MSVC 2013 build: Compiling src\mesa\main\texcompress_astc.cpp ... texcompress_astc.cpp src\mesa\main\texcompress_astc.cpp(111) : error C2059: syntax error : 'bad suffix on number' ... src\mesa\main\texcompress_astc.cpp(1007) : fatal error C1003: error count exceeds 100; stopping compilation scons: *** [build\windows-x86-debug\mesa\main\texcompress_astc.obj] Error 2 scons: building terminated because of errors. v2: Fix wrong conversion (Ilia). Fixes: 38ab39f6501 ("mesa: add ASTC 2D LDR decoder") Cc: Marek Olšák <[email protected]> Cc: Brian Paul <[email protected]> Cc: Roland Scheidegger <[email protected]> Cc: Mike Lothian <[email protected]> Cc: Gert Wollny <[email protected]> Cc: Dieter Nützel <[email protected]> Cc: Ilia Mirkin <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ddebug: use util_snprintf() in dd_get_debug_filename_and_mkdirAndres Gomez2018-08-021-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | Instead of plain snprintf(). To fix the MSVC 2013 build: Compiling src\gallium\auxiliary\driver_ddebug\dd_draw.c ... dd_draw.c c:\projects\mesa\src\gallium\auxiliary\driver_ddebug\dd_util.h(60) : warning C4013: 'snprintf' undefined; assuming extern returning int ... gallium.lib(dd_draw.obj) : error LNK2001: unresolved external symbol _snprintf build\windows-x86-debug\gallium\targets\graw-gdi\graw.dll : fatal error LNK1120: 1 unresolved externals scons: *** [build\windows-x86-debug\gallium\targets\graw-gdi\graw.dll] Error 1120 scons: building terminated because of errors. Fixes: 6ff0c6f4ebc ("gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times") Cc: Marek Olšák <[email protected]> Cc: Brian Paul <[email protected]> Cc: Roland Scheidegger <[email protected]> Cc: Nicolai Hähnle <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* kutil/queue: use util_snprintf() in util_queue_initAndres Gomez2018-08-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | Instead of plain snprintf(). To fix the MSVC 2013 build: Compiling src\util\u_queue.c ... u_queue.c src\util\u_queue.c(325) : warning C4013: 'snprintf' undefined; assuming extern returning int ... mesautil.lib(u_queue.obj) : error LNK2001: unresolved external symbol _snprintf scons: building terminated because of errors. Fixes: b238e33bc9d ("kutil/queue: add a process name into a thread name") Cc: Marek Olšák <[email protected]> Cc: Brian Paul <[email protected]> Cc: Roland Scheidegger <[email protected]> Cc: Timothy Arceri <[email protected]> Cc: Eric Engestrom <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium/aux/util: use util_snprintf() in test_texture_barrierAndres Gomez2018-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Instead of plain snprintf(). To fix the MSVC 2013 build: Compiling src\gallium\auxiliary\util\u_tests.c ... u_tests.c src\gallium\auxiliary\util\u_tests.c(624) : warning C4013: 'snprintf' undefined; assuming extern returning int ... gallium.lib(u_tests.obj) : error LNK2019: unresolved external symbol _snprintf referenced in function _test_texture_barrier build\windows-x86-debug\gallium\targets\graw-gdi\graw.dll : fatal error LNK1120: 1 unresolved externals scons: *** [build\windows-x86-debug\gallium\targets\graw-gdi\graw.dll] Error 1120 scons: building terminated because of errors. Fixes: 56342c97ee7 ("gallium/u_tests: test FBFETCH and shader-based blending with MSAA") Cc: Marek Olšák <[email protected]> Cc: Brian Paul <[email protected]> Cc: Roland Scheidegger <[email protected]> Cc: Dieter Nützel <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* glsl: use util_snprintf()Andres Gomez2018-08-026-27/+34
| | | | | | | | | | | Instead of plain snprintf(). To fix the MSVC 2013 build. Fixes: 6ff0c6f4ebc ("gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times") Cc: Marek Olšák <[email protected]> Cc: Brian Paul <[email protected]> Cc: Roland Scheidegger <[email protected]> Signed-off-by: Andres Gomez <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* intel/compiler: Add brw_get_compiler_config_value for disk cacheJordan Justen2018-08-014-2/+43
| | | | | | | | | | | | | | | | | | | During code review, Jason pointed out that: 2b3064c0731 "i965, anv: Use INTEL_DEBUG for disk_cache driver flags" Didn't account for INTEL_SCALER_* environment variables. To fix this, let the compiler return the disk_cache driver flags. Another possible fix would be to pull the INTEL_SCALER_* into INTEL_DEBUG bits, but as we are currently using 41 of 64 bits, I didn't think it was a good use of 4 more of these bits. (5 since INTEL_PRECISE_TRIG needs to be accounted for as well.) Cc: Jason Ekstrand <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965: Disable shader cache with INTEL_DEBUG=shader_timeJordan Justen2018-08-012-2/+8
| | | | | | | | | | | | | | | | | | | Shader time hard codes an index of the shader time buffer within the gen program. In order to support shader time in the disk shader cache, we'd need to add the shader time index into the program key. This should work, but probably is not worth it for this particular debug feature. Therefore, let's just disable the disk shader cache if the shader time debug feature is used. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106382 Fixes: 96fe36f7acc "i965: Enable disk shader cache by default" Cc: Eero Tamminen <[email protected]> Cc: Kenneth Graunke <[email protected]> Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* glsl: make a copy of array indices that are used to deref a function out paramTimothy Arceri2018-08-021-0/+54
| | | | | | | Fixes new piglit test: tests/spec/glsl-1.20/execution/qualifiers/vs-out-conversion-int-to-float-vec4-index.shader_test Reviewed-by: Ian Romanick <[email protected]>
* anv/pipeline: Add populate_tcs/tes_key helpersJason Ekstrand2018-08-011-3/+25
| | | | | | | They don't really do anything interesting, but it's more consistent this way. Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Rework the parameters to populate_wm_prog_keyJason Ekstrand2018-08-011-22/+24
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: More aggressively optimize away color attachmentsJason Ekstrand2018-08-012-5/+14
| | | | | | | | | | Instead of just looking at the number of color attachments, look at which ones are actually used by the subpass. This lets us potentially throw away chunks of the fragment shader. In DXVK, for example, all subpasses have 8 attachments and most are VK_ATTACHMENT_UNUSED so this is very helpful in that case. Reviewed-by: Timothy Arceri <[email protected]>
* anv: Restrict the number of color regions to those actually writtenJason Ekstrand2018-08-011-0/+5
| | | | | | | | | | The back-end compiler emits the number of color writes specified by wm_prog_key::nr_color_regions regardless of what nir_store_outputs we have. Once we've gone through and figured out which render targets actually exist and are written by the shader, we should restrict the key to avoid extra RT write messages. Reviewed-by: Timothy Arceri <[email protected]>
* anv/pipeline: Fix up deref modes if we delete a FS outputJason Ekstrand2018-08-011-0/+5
| | | | | | | | | With the new deref instructions, we have to keep the modes consistent between the derefs and the variables they reference. Since we remove outputs by changing them to local variables, we need to run the fixup pass to fix the modes. Reviewed-by: Timothy Arceri <[email protected]>
* nir/lower_indirect: Bail early if modes == 0Jason Ekstrand2018-08-011-0/+3
| | | | | | | There's no point in walking the program if we're never going to actually lower anything. Reviewed-by: Timothy Arceri <[email protected]>
* intel/nir: Call nir_lower_io_to_scalar_earlyJason Ekstrand2018-08-011-5/+12
| | | | | | | | | | | | | | | | | Shader-db results on Kaby Lake: total instructions in shared programs: 15166953 -> 15073611 (-0.62%) instructions in affected programs: 2390284 -> 2296942 (-3.91%) helped: 16469 HURT: 505 total loops in shared programs: 4954 -> 4951 (-0.06%) loops in affected programs: 3 -> 0 helped: 3 HURT: 0 Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* intel/nir: Split IO arrays into elementsJason Ekstrand2018-08-011-0/+4
| | | | | | | | | | | | | | | | | The NIR nir_lower_io_arrays_to_elements pass attempts to split I/O variables which are arrays or matrices into a sequence of separate variables. This can help link-time optimization by allowing us to remove varyings at a more granular level. Shader-db results on Kaby Lake: total instructions in shared programs: 15177645 -> 15168494 (-0.06%) instructions in affected programs: 79857 -> 70706 (-11.46%) helped: 392 HURT: 0 Reviewed-by: Timothy Arceri <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* i965/fs: Flag all slots of a flat input as flatJason Ekstrand2018-08-011-6/+9
| | | | | | | | | | | | | | | | Otherwise, only the first vec4 of a matrix or other complex type will get marked as flat and we'll interpolate the others. This was caught by a dEQP test which started failing because it did a SSO vs. non-SSO comparison. Previously, we did the interpolation wrong consistently in both versions. However, with one of Tim Arceri's NIR linkingpatches, we started splitting the matrix input into vectors at link time in the non-SSO version and it started getting correctly interpolated which didn't match the broken SSO version. As of this commit, they both get correctly interpolated. Fixes: e61cc87c757f8bc "i965/fs: Add a flat_inputs field to prog_data" Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* intel/nir: Use the correct scalar stage for consumers when linkingJason Ekstrand2018-08-011-1/+1
| | | | | Reviewed-by: Kenneth Graunke <[email protected]> Reviewed-by: Timothy Arceri <[email protected]>
* docs: update 18.2.0 release notes for virglDave Airlie2018-08-021-1/+2
|
* nir/meson: fix c vs cpp args for nir testDylan Baker2018-08-011-1/+1
| | | | | | | Fixes: d1992255bb29054fa51763376d125183a9f602f3 ("meson: Add build Intel "anv" vulkan driver") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gallium: fix ddebug on windowsDylan Baker2018-08-011-1/+5
| | | | | | | | | By including the proper headers for getpid and for mkdir. Fixes: 6ff0c6f4ebcb87ea6c6fe5a4ba90b548f666067d ("gallium: move ddebug, noop, rbug, trace to auxiliary to improve build times") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* util: move process.[ch] to u_process.[ch]Dylan Baker2018-08-017-8/+8
| | | | | | | | | | | | | On windows process.h is a system provided header, and it's required in include/c11/threads_win32.h. This header interferes with searching for that header, and results in windows build warnings with scons, but errors in meson which doesn't allow implicit function declarations. Just rename process to u_process, which follows the style of utils anyway. Fixes: 2e1e6511f76370870b5cde10caa9ca3b6d0dc65f ("util: extract get_process_name from xmlconfig.c") Signed-off-by: Dylan Baker <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* ac,radeonsi: reduce optimizations for complex compute shaders on older APUs (v2)Marek Olšák2018-08-016-13/+68
| | | | | | | | To make dEQP-GLES31.functional.ssbo.layout.random.all_shared_buffer.23 finish sooner on the older CPUs. (otherwise it gets killed and we fail the test) Acked-by: Dave Airlie <[email protected]>
* v3d: Actually put the "%s" in the snprintf.Eric Anholt2018-08-011-1/+1
| | | | | | | | I missed an important part when porting the change over, fixing my compiler warning but breaking -Werror=format-security. Fixes: e6ff5ac4468e ("v3d: use snprintf(..., "%s", ...) instead of strncpy") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107443
* vc4: Fix automake linking error.Juan A. Suarez Romero2018-08-011-0/+9
| | | | | | | | | | | | | | | CXXLD gallium_dri.la ../../../../src/gallium/drivers/vc4/.libs/libvc4.a(vc4_cl_dump.o): In function `vc4_dump_cl': src/gallium/drivers/vc4/vc4_cl_dump.c:45: undefined reference to `clif_dump_init' src/gallium/drivers/vc4/vc4_cl_dump.c:82: undefined reference to `clif_dump_destroy' ../../../../src/broadcom/cle/.libs/libbroadcom_cle.a(cle_libbroadcom_cle_la-v3d_decoder.o): In function `v3d_field_iterator_next': src/broadcom/cle/v3d_decoder.c:902: undefined reference to `clif_lookup_bo' Fixes: e92959c4e0 ("v3d: Pass the whole clif_dump structure to v3d_print_group().") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107423 CC: Eric Anholt <[email protected]> Acked-by: Eric Anholt <[email protected]> Reviewed-by: Andres Gomez <[email protected]>