Commit Graph

123740 Commits

Author SHA1 Message Date
Ian Romanick 29f10ede71 mesa: Add function to calculate an orthographic projection
Unlike the existing _math_matrix_ortho, the new _math_float_ortho
function just stores the calculated matrix in an array of floats.  It
does not multiply the new matrix with data already stored.

   text     data     bss      dec    hex  filename
12243486 1344936 1290748 14879170 e309c2  before/lib64/dri/i965_dri.so
12243510 1344936 1290748 14879194 e309da  after/lib64/dri/i965_dri.so

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14 15:35:43 +00:00
Ian Romanick c731f2ab63 mesa: Add matrix utility functions to load matrices
These are basically DSA versions of glLoadIdentity() and glLoadMatrix()
that are available for internal Mesa use.

   text     data     bss      dec    hex  filename
12243574 1344936 1290748 14879258 e30a1a  before/lib64/dri/i965_dri.so
12243486 1344936 1290748 14879170 e309c2  after/lib64/dri/i965_dri.so

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14 15:35:43 +00:00
Ian Romanick b5a8d0319b meta: Remove support for clearing integer buffers
Since i965 no longer uses this function for clearing color buffers,
there is no driver left that will ever support integer textures and use
_mesa_meta_glsl_Clear.

As a side note, the has_integer_textures check was rubbish anyway
because meta always smashes the API to API_OPENGL_COMPAT.

   text     data     bss      dec    hex  filename
12244406 1344936 1290748 14880090 e30d5a  before/lib64/dri/i965_dri.so
12243574 1344936 1290748 14879258 e30a1a  after/lib64/dri/i965_dri.so

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14 15:35:43 +00:00
Ian Romanick a5d2c40fb9 meta: Make _mesa_meta_setup_sampler static
text     data     bss      dec    hex  filename
12244854 1344936 1290748 14880538 e30f1a  before/lib64/dri/i965_dri.so
12244406 1344936 1290748 14880090 e30d5a  after/lib64/dri/i965_dri.so

v2: Put static on the function definition too.  Suggested by Paulo.

v3: Reformat prototype.  Suggested by Jason.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> [v2]
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14 15:35:43 +00:00
Ian Romanick 27c2082a42 meta: Make _mesa_meta_texture_object_from_renderbuffer static
text	    data     bss      dec    hex  filename
12244974 1344936 1290748 14880658 e30f92  before/lib64/dri/i965_dri.so
12244854 1344936 1290748 14880538 e30f1a  after/lib64/dri/i965_dri.so

v2: Put static on the function definition too.  Suggested by Paulo.

v3: Reformat prototype.  Suggested by Jason.

Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> [v2]
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14 15:35:43 +00:00
Ian Romanick 067cb2f165 i965: Assert that blorp always handles color blits
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14 15:35:43 +00:00
Karol Herbst 667e14e7bd nir/validate: validate the stride for deref_ptr_as_array
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4068>
2020-05-14 15:13:13 +00:00
Karol Herbst 7afc9632a6 nir/deref: copy ptr_stride when rematerializing
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4068>
2020-05-14 15:13:13 +00:00
Jan Palus a1b69d101a targets/opencl: fix build against LLVM>=10 with Polly support
see https://bugs.llvm.org/show_bug.cgi?id=44870

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4511>
2020-05-14 14:43:52 +00:00
Eric Anholt b1151cd2ff freedreno: Avoid duplicate BO relocs in FD_RINGBUFFER_OBJECTs.
For the piglit drawoverhead case, 5/18 of the objects' relocs were
duplicated.  We can dedupe them at object create time (since objects are
long-lived) and avoid repeated relocation work at emit time.

nohw drawoverhead program statechange throughput 2.34082% +/- 0.645832%
(n=10).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5020>
2020-05-14 14:12:15 +00:00
Eric Anholt a6fe0799fa freedreno: Fix resource layout dump loop.
Apparently I've never dumped a fully populated slices array, so the 0-init
always terminated the loop.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5020>
2020-05-14 14:12:15 +00:00
Erik Faye-Lund 2eb180db94 zink: disable vkCmdResolveImage when respecting render-condition
vkCmdResolveImage doesn't respect render-condition, so let's fall back
to blitter in this case instead.

Fixes: 80d7cc6f129 ("zink: enable conditional rendering if available")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5008>
2020-05-14 13:55:44 +00:00
Danylo Piliaiev 06b6c687e2 anv: Fix deadlock in anv_timelines_wait
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2945
Fixes: 34f32a6d66
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5005>
2020-05-14 13:14:57 +00:00
Michel Dänzer c059b22707 gitlab-ci: Install g++-mingw-w64-x86-64-win32 instead of mingw-w64
mingw-w64 pulls in a lot more packages we don't need.

g++-mingw-w64-x86-64-win32 is only available in Debian testing, so get
all mingw packages from there.

Acked-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4851>
2020-05-14 12:54:09 +00:00
Michel Dänzer dcbb189bbe gitlab-ci: Move lib{drm,pciaccess}-dev cross packages out of loop
Simpler like this, since they're only needed for one cross architecture
each.

Acked-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4851>
2020-05-14 12:54:09 +00:00
Michel Dänzer da3aee9263 gitlab-ci: Install WINE from Debian testing
Instead of a third-party repository which has proved unreliable at
times.

This pulls in glibc 2.30 from testing in the x86_build image, so we need
to update the x86_test-{gl,vk} images to match.

Acked-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4851>
2020-05-14 12:54:09 +00:00
Michel Dänzer fd9b445145 gitlab-ci: Add Debian testing repository for x86_build image
We don't want LLVM 8 packages to be pulled in from testing though (it
would make installing llvm-8-dev for cross architectures a lot more
complicated), so explicitly select buster-backports for them (they were
already implicitly installed from there before, since they're not
available in buster proper).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4851>
2020-05-14 12:54:09 +00:00
Michel Dänzer f2773d7067 gitlab-ci: Move down container_pre_build.sh invocation in x86_build.sh
It was in the middle of package installations.

Acked-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4851>
2020-05-14 12:54:09 +00:00
Michel Dänzer 1c79ac1069 gitlab-ci: Update to current templates
Notable changes:

* No longer generate a separate *-built-by-job-* image tag, instead
  store the pipeline/job information as labels in the image.
* Clean up some package information files which were accidentally left
  before, possibly resulting in slightly smaller images.

Acked-by: Andres Gomez <agomez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4851>
2020-05-14 12:54:09 +00:00
Duncan Hopkins cc472a2a7c zink. Changed sampler default name.
Changed the sampler variable name from 'sampler' to 'sampler_<num>' to stop symbol classes in the Metal MSL shaders, as 'sampler' is a keyword.
Improves human readability when debugging issues.

Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4211>
2020-05-14 12:24:28 +00:00
Samuel Pitoiset b1f0233077 radv: enable shaderResourceMinLod
This feature was missing for unknown reasons.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4989>
2020-05-14 10:05:44 +00:00
Samuel Pitoiset 0d63a1a84d ac/llvm: add support for texturing with clamped LOD
This is a requirement for the shaderResourceMinLod feature which
allows to clamp LOD. This uses all image_sample_*_cl variants.

All dEQP-VK.glsl.texture_functions.texture*clamp.* pass.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4989>
2020-05-14 10:05:44 +00:00
Samuel Pitoiset aaf5706aa3 aco: add support for texturing with clamped LOD
This is a requirement for the shaderResourceMinLod feature which
allows to clamp LOD. This uses all image_sample_*_cl variants.

All dEQP-VK.glsl.texture_functions.texture*clamp.* pass.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4989>
2020-05-14 10:05:44 +00:00
Samuel Pitoiset 47a769143b aco: remove useless check for nir_tex_src_bias
I think only nir_texop_txb can have a bias operand anyways.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4989>
2020-05-14 10:05:44 +00:00
Daniel Stone 0f46a3191f CI: Windows: Build LLVM and llvmpipe
We will eventually need to build our own LLVM on Windows in order to
build libclc and other bits which are required for the d3d12 build, as
well as to be able to test SPIR-V/OpenCL on llvmpipe.

Start doing this now, building into the base container, and exercise
this by building llvmpipe under Windows.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4946>
2020-05-14 06:40:54 +00:00
Daniel Stone 69ffbcb162 llvmpipe: Expect increased exp precision on Windows
'Newer' versions of MSVCRT than 2013 appear to have fixed the bug around expf
precision which caused bb9e8c5090. It's not clear when this was
changed, but at least on Windows 10 machines with Visual Studio 2019,
expf behaves in line with other implementations.

As there is no clear way to test for the version of the VCRT in use,
simply mark this test as expected-pass rather than xfail.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4946>
2020-05-14 06:40:54 +00:00
Rob Clark cf21b76383 freedreno/ir3: use lower_wrmasks pass
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2020-05-13 20:24:53 -07:00
Rob Clark 42d38ad028 nir: add pass to lower disjoint wrmask's
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2020-05-13 20:24:49 -07:00
Rob Clark a506d49fae nir: add helper to copy const_index[]
It seems less brittle to not assume they are in the same order for src
and dst instructions.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2020-05-13 20:24:45 -07:00
Rob Clark 3d3cfea78b nir: fix indices for ir3 ssbo_atomic intrinsics
Caught by the sanity checking in nir_intrinsic_copy_const_indices()
(which is introduced by the next patch).

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2020-05-13 20:24:42 -07:00
Rob Clark ea6b404294 freedreno/ir3: use const_index accessors
Cleans up a couple spots that were still open-coding this.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2020-05-13 20:24:38 -07:00
Kristian H. Kristensen 14969aab11 freedreno/ir3: Drop wrmask for ir3 local and global store intrinsics
These intrinsics are supposed to map to the underlying hardware
instructions, which don't have wrmask. We use them when we lower
store_output in the geometry pipeline and since store_output gets
lowered to temps, we always see full wrmasks there.
2020-05-13 20:24:33 -07:00
Jason Ekstrand 4627bfcd69 nir: Add some docs to the metadata types
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5028>
2020-05-14 01:57:12 +00:00
Eric Anholt 3111cee2f6 freedreno: Fix attempts to push UBO contents past the constlen on pre-a6xx.
The binning variant likely won't have any UBO load code in it, so we were
writing past constlen (and sometimes asserting about it) when loading more
than one ubo block.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5027>
2020-05-14 01:30:31 +00:00
Eric Engestrom 7336caa52d docs: update calendar for 20.1.0-rc3
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5026>
2020-05-14 01:26:41 +00:00
Icecream95 0dd24b381c panfrost: Fix background showing when using discard
This fixes problems in a number of games, including SuperTuxKart,
OpenMW and RVGL.

v2: Use MALI_READS_ZS | 0x20 instead of MALI_WRITES_Z to match with
the blob. Keep using 0x400 | 0x20 when depth is disabled.

Closes: #2620
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5001>
2020-05-14 01:08:21 +00:00
Danylo Piliaiev 15dd7933bc anv: Translate relative timeout to absolute when calling anv_timelines_wait
Fixes: 34f32a6d66
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5025>
2020-05-14 00:52:37 +00:00
Jason Ekstrand 0b5288492b anv: Set MOCS in 3DSTATE_CONSTANT_* on Gen9+
While we're here, we add a nice detailed comment about why always
assuming internal is ok.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5022>
2020-05-14 00:34:47 +00:00
Jason Ekstrand e3d8edf3e0 anv: Set 3DSTATE_VF_INSTANCING on the SVGS element
It probably doesn't matter because that buffer should have a stride of
zero.  However, it still seems like a good idea just to be safe.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5022>
2020-05-14 00:34:47 +00:00
Eric Anholt 723208988e freedreno: Drop the noubo fails list for CI, since there aren't any now.
The remaining two fails in the list are the same as for the normal CI run.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
2020-05-14 00:10:43 +00:00
Eric Anholt 112c65825f freedreno/a6xx: Use LDC for UBO loads.
It saves addressing math, but may cause multiple loads to be done and
bcseled due to NIR not giving us good address alignment information
currently.  I don't have any workloads I know of using non-const-uploaded
UBOs, so I don't have perf numbers for it

This makes us match the GLES blob's behavior, and turnip (other than being
bindful).

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
2020-05-14 00:10:43 +00:00
Eric Anholt ab93a631b4 freedreno: Trim num_ubos to just the ones we haven't lowered to constbuf.
With the upcoming LDC usage in the GL driver, we don't want to be
uploading descriptors for every UBO when they aren't actually in use.
Trimming NIR's num_ubos will avoid that, and cleans up num_ubo handling
elsewhere right now.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
2020-05-14 00:10:43 +00:00
Eric Anholt d5176c453e freedreno/ir3: Move i/o offset lowering after analyze_ubo_ranges.
I found that when moving more UBOs to load_ubo_ir3, analyze_ubo_ranges
would move things back in a broken way.  We can just run this pass later
and drop the _ir3 path.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
2020-05-14 00:10:43 +00:00
Eric Anholt 5387c27140 freedreno/ir3: Leave the cursor alone during ir3_nir_try_propagate_bit_shift.
Otherwise, we might end up inserting the nir_intrinsic_load_ubo_ir3()
after the non-offset src's definition, leading to nir_validate() failures.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
2020-05-14 00:10:43 +00:00
Eric Anholt e0a4d1c4e5 freedreno/ir3: Clean up a silly nir_src_for_ssa(src.ssa).
Just copy the src through.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
2020-05-14 00:10:43 +00:00
Eric Anholt d2a0cde390 nir: Include num_ubos in the printed shader (if nonzero).
I keep wanting this number for debugging shaders.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4858>
2020-05-14 00:10:43 +00:00
Jason Ekstrand 492d664be0 util/ra: Add [de]serialization support
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
2020-05-13 23:36:44 +00:00
Jason Ekstrand 38e68db778 util/vma: Add a debug print helper
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
2020-05-13 23:36:44 +00:00
Jason Ekstrand adbcef37d2 util/vma: Add an option to configure high/low preference
The vma_heap allocator was originally designed to prefer high addresses
in order to find bugs in ANV's high address handling.  However, there
are cases where you might want the allocator to prefer lower addresses
for some reason.  This provides a configure bit for exactly this
purpose.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
2020-05-13 23:36:44 +00:00
Caio Marcelo de Oliveira Filho f40f8f623a util/list: Add list_foreach_entry_from_safe
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5019>
2020-05-13 23:36:44 +00:00