Commit Graph

97110 Commits

Author SHA1 Message Date
Andres Gomez
d100e966e8 docs: add sha256 checksums for 17.2.4
Signed-off-by: Andres Gomez <agomez@igalia.com>
2017-10-30 16:55:19 +02:00
Andres Gomez
bccb074014 docs: add release notes for 17.2.4
Signed-off-by: Andres Gomez <agomez@igalia.com>
2017-10-30 16:55:18 +02:00
Alex Smith
134a40d2a6 radv: Fix -Wformat-security issue
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103513
Fixes: de88979413 ("radv: Implement VK_AMD_shader_info")
Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
2017-10-30 10:58:56 +01:00
Timothy Arceri
1e84e53712 radv: add cache items to in memory cache when reading from disk
Otherwise we will leak them, load duplicates from disk rather
than memory and never write items loaded from disk to the apps
pipeline cache.

Fixes: fd24be134f 'radv: make use of on-disk cache'
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-30 17:49:54 +11:00
Tapani Pälli
446c5726ec i965: fix blorp stage_prog_data->param leak
Patch uses mem_ctx for allocation to ensure param array gets freed
later.

==6164== 48 bytes in 1 blocks are definitely lost in loss record 61 of 193
==6164==    at 0x4C2EB6B: malloc (vg_replace_malloc.c:299)
==6164==    by 0x12E31C6C: ralloc_size (ralloc.c:121)
==6164==    by 0x130189F1: fs_visitor::assign_constant_locations() (brw_fs.cpp:2095)
==6164==    by 0x13022D32: fs_visitor::optimize() (brw_fs.cpp:5715)
==6164==    by 0x13024D5A: fs_visitor::run_fs(bool, bool) (brw_fs.cpp:6229)
==6164==    by 0x1302549A: brw_compile_fs (brw_fs.cpp:6570)
==6164==    by 0x130C4B07: blorp_compile_fs (blorp.c:194)
==6164==    by 0x130D384B: blorp_params_get_clear_kernel (blorp_clear.c:79)
==6164==    by 0x130D3C56: blorp_fast_clear (blorp_clear.c:332)
==6164==    by 0x12EFA439: do_single_blorp_clear (brw_blorp.c:1261)
==6164==    by 0x12EFC4AF: brw_blorp_clear_color (brw_blorp.c:1326)
==6164==    by 0x12EFF72B: brw_clear (brw_clear.c:297)

Fixes: 8d90e28839 ("intel/compiler: Allocate pull_param in assign_constant_locations")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable@lists.freedesktop.org
2017-10-30 08:19:37 +02:00
Kevin Rogovin
d30b5f2f9b i965: correctly assign SamplerCount of INTERFACE_DESCRIPTOR_DATA
We were dividing by 4 twice.  This also papered over a bug where we
were neglecting to clamp the sampler count to the [0, 16] range.

This should have no functional impact, it only affects prefetching.

v2 [Kenneth Graunke]:
 - Clamp sampler_count to [0, 16] to avoid overflowing the valid values
   for this field.  Write a commit message.

Signed-off-by: Kevin Rogovin <kevin.rogovin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-10-29 22:41:23 -07:00
Kenneth Graunke
992e2cf57f i965: Only set key->high_quality_derivatives when it matters.
This avoids recompiles for shaders that don't use explicit derivatives
when ctx->Hint.FragmentShaderDerivative == GL_NICEST.

For example, GFXBench 5 Aztec Ruins sets the GL_NICEST hint before
compiling any shaders, but none of them use dFdx() or dFdy() - only
implicit derivatives.  This doesn't eliminate any recompiles, but
does eliminate one of the reasons for doing so.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-29 20:54:16 -07:00
Kenneth Graunke
86c68bb886 nir: Make nir_gather_info collect a uses_fddx_fddy flag.
i965 turns fddx/fddy into their coarse/fine variants based on the
ctx->Hint.FragmentShaderDerivative setting.  It needs to know whether
this can impact a shader in order to better guess NOS settings.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-29 20:52:20 -07:00
Kenneth Graunke
f970e4d481 i965: Update brw_wm_debug_recompile() for newer key entries.
Also, reorder them to match the structure's field order, to make it
easier to check that they're all present.

Acked-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-29 20:52:14 -07:00
Kenneth Graunke
d1b392d060 i965: Delete brw_wm_prog_key::drawable_height.
This has been unused since we switched to nir_lower_wpos_ytransform.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-29 20:52:02 -07:00
Alex Smith
de88979413 radv: Implement VK_AMD_shader_info
This allows an app to query shader statistics and get a disassembly of
a shader. RenderDoc git has support for it, so this allows you to view
shader disassembly from a capture.

When this extension is enabled on a device (or when tracing), we now
disable pipeline caching, since we don't get the shader debug info when
we retrieve cached shaders.

v2: Improvements to resource usage reporting
v3: Disassembly string must be null terminated (string_buffer's length
    does not include the terminator)
v4: Fixed LDS reporting. (Bas)

Signed-off-by: Alex Smith <asmith@feralinteractive.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-29 00:28:45 +02:00
Christian Gmeiner
0a23841a98 etnaviv: add ext_texture_srgb support
Following piglits are passing:
 - glean@texture_srgb
 - spec@ext_texture_srgb@fbo-srgb
 - spec@ext_texture_srgb@tex-srgb
 - spec@ext_texture_srgb@texwrap formats
 - spec@ext_texture_srgb@texwrap formats-s3tc

Btw. this enables GL 2.1 :-)

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Reviewed-by: Wladimir J. van der Laan <laanwj@gmail.com>
2017-10-28 21:20:42 +02:00
Topi Pohjolainen
97e01adfd5 intel/compiler/gen9: Pixel shader header only workaround
Fixes intermittent GPU hangs on Broxton with an Intel internal
test case.

There are plenty of similar fragment shaders in piglit that do
not use any varyings and any uniforms. According to the
documentation special timing is needed between pipeline stages.
Apparently we just don't hit that with piglit. Even with the
failing test case one doesn't always get the hang.

Moreover, according to the error states the hang happens
significantly later than the execution of the problematic shader.
There are multiple render cycles (primitive submissions) in between.
I've also seen error states where the ACTHD points outside the
batch. Almost as if the hardware writes somewhere that gets used
later on. That would also explain why piglit doesn't suffer from
this - most tests kick off one render cycle and any corruption
is left unseen.

v2 (Ken): Instead of enabling push constants, enable one of the
          inputs (PSIZ).
v3 (Ken, Jason): Use LAYER instead making vulkan emit_3dstate_sbe()
                 happy.

Cc: "17.3 17.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
2017-10-28 10:07:29 +03:00
Brian Paul
2b612431f5 scons: fix OSMesa driver build
Fixes: ea53d9a8eb "glapi: include generated headers without path"

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2017-10-27 20:56:13 -06:00
Brian Paul
05592cebd4 scons: fix scons build to find generated glapitable.h
Fixes: ea53d9a8eb "glapi: include generated headers without path"

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2017-10-27 16:26:26 -06:00
Brian Paul
1fe4c7b2af gallium: s/unsigned/enum pipe_prim_type/
In the vbuf_render::set_primitive() functions.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
2017-10-27 16:26:26 -06:00
Roland Scheidegger
3e4fd2d4b1 draw: don't cull tris with zero area
Culling tris with zero area seems like a great idea, but apparently with
fill mode line (and point) we're supposed to draw them, at least some tests
for some other state tracker complained otherwise.
Such tris also always seem to be back facing (not sure if this can be
inferred from anything, since in a mathematical sense it cannot really be
determined), so make sure to account for this when filling in the face
information.
(For solid tris, this is of course unnecessary, drivers will throw the tris
away later in any case.)

Reviewed-by: Brian Paul <brianp@vmware.com>
2017-10-27 22:37:19 +02:00
Dylan Baker
f7f12780c8 meson: Add a dependency on nir_opcodes_h for freedreno
This fixes a race condition in the build.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
2017-10-27 11:30:13 -07:00
Dylan Baker
f121a669c7 meson: build gallium based osmesa
This has been tested with the osdemo from mesa-demos

v2: - Add SELinux dependency
    - fix typo GALLIUM_LLVM -> GALLIUM_LLVMPIPE

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-27 11:06:45 -07:00
Dylan Baker
cbbd5bb889 meson: build classic osmesa
This builds the classic (non-gallium) osmesa with meson. This has been
tested with the osdemo application from mesa-demos.

v2: - Remove unrelated change
    - Add SELinux dependency to osmesa

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-27 11:06:45 -07:00
Dylan Baker
7503ab687b meson: Add generated files to non-shared glapi
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-27 11:06:07 -07:00
Dylan Baker
ea53d9a8eb glapi: include generated headers without path
This has been tested wtih make dist-check and with meson.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-27 11:06:07 -07:00
Dylan Baker
5daed06da2 osmesa: Include generated headers without path
This makes things much easier to ensure correctness with meson. Tested
with make dist-check and with meson.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-27 11:06:07 -07:00
Dylan Baker
06c6675560 meson: move gallium include declarations to src
These are used by non-gallium osmesa, so they need to be defined outside
of the gallium subdirectory.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-27 11:06:07 -07:00
Dylan Baker
63c360d7b2 meson: fix glprocs.h generator
There was a typo that causes the generated file to be called gl_procs.h
instead.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-27 11:06:07 -07:00
Dylan Baker
1f11ac4395 meson: rename all instances of xf86vm to xxf86vm
Because consistency

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-27 11:06:07 -07:00
Dylan Baker
b92992e95c meson: fix pkg-config Gl Require.Private
xf86vm -> xxf86vm

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
2017-10-27 11:06:07 -07:00
Kenneth Graunke
4f538c3f99 mesa: Accept GL_BACK in get_fb0_attachment with ARB_ES3_1_compatibility.
According to the ARB_ES3_1_compatibility specification,
glGetFramebufferAttachmentParameteriv is supposed to accept BACK,
and it behaves exactly like BACK_LEFT.

Fixes a GL error in GFXBench 5 Aztec Ruins.

Cc: "17.3 17.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2017-10-27 10:19:07 -07:00
Brian Paul
7a718667f3 gallium/os: fix align_malloc() / os_malloc_aligned() comment mix-up
os_free_aligned() is the counterpart to os_malloc_aligned().
Trivial.
2017-10-27 09:54:26 -06:00
Alejandro Piñeiro
fd011376cb formatquery: use correct target check for IMAGE_FORMAT_COMPATIBILITY_TYPE
From the spec:
   "IMAGE_FORMAT_COMPATIBILITY_TYPE: The matching criteria use for the
    resource when used as an image textures is returned in
    <params>. This is equivalent to calling GetTexParameter"

So we would need to return None for any target not supported by
GetTexParameter. By mistake, we were using the target check for
GetTexLevelParameter.

v2: fix typo (GetTextParameter vs GetTexParemeter) on comment (Illia Mirkin)

Reviewed-by: Antia Puentes <apuentes@igalia.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-10-27 15:04:03 +02:00
Eric Engestrom
05a94a4dfc meson: bring MESA_GIT_SHA1 in line with other build systems
Meson's vcs_tag() uses the output of `git describe`, eg.
  17.3-branchpoint-5-gfbf29c3cd15ae831e249+

Whereas the other build systems used a script that outputs only the sha1
of the HEAD commit, eg.
  fbf29c3cd1

Given that this information is used by printing it next to the version
number, there's some redundancy here, and inconsistency between build
systems.

Bring Meson in line by making it use the same script, with the added
advantage of now supporting the MESA_GIT_SHA1_OVERRIDE env var.

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2017-10-27 13:38:37 +01:00
Eric Engestrom
7088622e5f buildsys: move file regeneration logic to the script itself
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2017-10-27 13:38:37 +01:00
Samuel Pitoiset
a41e2e9cf5 radv: allow to use a compute shader for resetting the query pool
Serious Sam Fusion 2017 uses a huge number of occlusion queries,
and the allocated query pool buffer is greater than 4096 bytes.

This slightly improves performance (tested in Ultra) from
117.2 FPS to 119.7 FPS (~+2%) on my RX480.

This also improves Talos, from 69 FPS to 72/73 FPS (~+5%).

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-27 13:47:06 +02:00
Samuel Pitoiset
0d61109bb7 radv: make radv_fill_buffer() return the needed flush bits
Only needed when the CS path is used.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
2017-10-27 13:47:03 +02:00
Eric Engestrom
4b9421d45d meson: wire up selinux
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2017-10-27 11:57:03 +01:00
Eric Engestrom
866c8a94d4 wayland-egl: fix wayland cflags
Fixes: 80bfff5c4f "wayland-egl: adds CFLAGS for wayland.egl.h include"
Suggested-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Acked-by: Emil Velikov <emil.velikov@collabora.com>
Acked-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
2017-10-27 11:57:03 +01:00
Eric Engestrom
5d44e35a8f vc4: fix release build
Mesa's DEBUG and assert's NDEBUG are not tied to each other, so we need
to explicitly compile this code out.

Fixes: 3df7892878 "vc4: Drop reloc_count tracking for debug
       asserts on non-debug builds."
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-27 11:57:03 +01:00
Tapani Pälli
0b131ca427 i965: unref push_const_bo in intelDestroyContext
Valgrind shows that leak is caused by gen6_upload_push_constant, add
unref push_const_bo per stage to destructor to fix this (like done for
scratch_bo).

   ==10952== 144 bytes in 1 blocks are definitely lost in loss record 44 of 66
   ==10952==    at 0x4C30A1E: calloc (vg_replace_malloc.c:711)
   ==10952==    by 0x8C02847: bo_alloc_internal.constprop.10 (brw_bufmgr.c:344)
   ==10952==    by 0x8C425C4: intel_upload_space (intel_upload.c:101)
   ==10952==    by 0x8C22ED0: gen6_upload_push_constants (gen6_constant_state.c:154)

v2: remove if conditions, brw_bo_unreference handles NULL (Ken, Emil)

Fixes: 24891d7c05 ("i965: Store per-stage push constant BO pointers.")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
2017-10-27 13:49:13 +03:00
Tapani Pälli
eeb3515c3f i965: remove if conditions from scratch_bo unref
brw_bo_unreference handles NULL case

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2017-10-27 13:48:56 +03:00
Kenneth Graunke
70cd05d6ac anv: Fix assert about source attrs.
Asserting slot >= 2 made sense when the URB read offset was always 1
(pair of slots).  Commit 566a0c43f0 made
it possible to read from the VUE header in slot 0, by adjusting the
offset to be 0.  So, this assert is now bogus.  Use the one from GL.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-27 03:01:13 -07:00
Kenneth Graunke
49d3c004f1 anv: Drop URB entry output read handling in 3DSTATE_XS.
Commit 566a0c43f0 started setting the
3DSTATE_SBE bit to override these values with the one calculated there.

So, they're dead.  Stop setting them.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-27 03:01:13 -07:00
Kenneth Graunke
2c873060d3 i965: Delete unused brw_vs_prog_data::nr_attributes field.
Reviewed-by: Matt Turner <mattst88@gmail.com>
2017-10-27 02:53:38 -07:00
Samuel Pitoiset
dd79aa4ad3 radeonsi: update hack for HTILE corruption in ARK: Survival Evolved
It appears that flushing the DB metadata is actually not sufficient
since the driver uses the new VS blit shaders. This looks quite
strange though, but it seems like we need to flush DB for fixing
the corruption.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102955
Fixes: 69ccb9dae7 (radeonsi: use new VS blit shaders (VS inputs in SGPRs)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
2017-10-27 10:47:30 +02:00
Dave Airlie
a639d40f13 radv: add support for local bos. (v3)
This uses the new kernel interfaces for reduced cs overhead,
We only set the local flag for memory allocations that don't have
 a dedicated allocation and ones that aren't imports.

v2: add to all the internal buffer creation paths.
v3: missed some command submission paths, handle 0/empty bo lists.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2017-10-26 23:59:28 +01:00
Jason Ekstrand
39c5c12f8f i965/miptree: Take an isl_format in render_aux_usage
Not all rendering matches the miptree format.  We allow rendering to
texture views so there are cases where it may not match.  In those
cases, our current scheme of just passing the value of ctx->sRGBEnabled
isn't viable.  Instead, just do what we do for texturing and pass the
view format in directly.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: mesa-stable@lists.freedesktop.org
2017-10-26 15:24:38 -07:00
Jason Ekstrand
78e50185d6 i965/blorp: Use more temporary isl_format variables
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: mesa-stable@lists.freedesktop.org
2017-10-26 15:24:38 -07:00
Jason Ekstrand
94389943b6 i965/blorp: Use blorp_to_isl_format for src_isl_format in blit_miptrees
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Cc: mesa-stable@lists.freedesktop.org
2017-10-26 15:24:38 -07:00
Jason Ekstrand
8ab9820d34 spirv: Claim support for the simple memory model
It's rather surprising that we've never actually hit this before.
Aparently, Ian's SPIR-V generator currently claims the Simple when you
don't do anything complex.  We really shouldn't assert-fail on it.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: mesa-stable@lists.freedesktop.org
2017-10-26 15:24:38 -07:00
Rob Herring
90dd6e5bb9 Android: egl: add dependency on libnativewindow
system/window.h is no longer available by default and is part of
libnativewindow, so add it to the shared libraries. It has to be conditional
because the library is only present in O and later.

Really, we should only be depending on vndk/window.h now, but that's only
in O and changing would be pretty invasive.

Signed-off-by: Rob Herring <robh@kernel.org>
2017-10-26 16:06:53 -05:00
Dylan Baker
eb3bb03b34 meson: build nouveau vieux driver
Build tested only.

v2: - fix spelling error (veaux -> vieux)

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-10-26 11:30:56 -07:00