Alyssa Rosenzweig
3bbce876e6
pan/bi: Set BI_MODS for MINMAX
...
We support it.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4470 >
2020-04-06 19:41:56 +00:00
Alyssa Rosenzweig
822f127fe5
pan/bi: Add ADD add/min/max fp32 packing
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4470 >
2020-04-06 19:41:56 +00:00
Alyssa Rosenzweig
36e4c6b267
pan/bi: Structify ADD unit add/min/max
...
..since it's missing for FMA
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4470 >
2020-04-06 19:41:56 +00:00
Alyssa Rosenzweig
f6bd0ec907
pan/bi: Implement min/max on FMA
...
Unfortunately, while this looks fine to the disasm, it's raising
INSTR_INVALID_ENC on my g31 board here. Looks like it might be ADD only
on newer Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4470 >
2020-04-06 19:41:56 +00:00
Alyssa Rosenzweig
545fc7b26a
pan/bit: Add special unit test
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4470 >
2020-04-06 19:41:56 +00:00
Alyssa Rosenzweig
8e50d44950
pan/bit: Add special op interpreting
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4470 >
2020-04-06 19:41:56 +00:00
Alyssa Rosenzweig
c37c799284
pan/bi: Add fp16 support for frcp/frsq
...
More ops.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4470 >
2020-04-06 19:41:56 +00:00
Alyssa Rosenzweig
d7bb7b79a8
pan/bi: Add 32-bit _FAST packing
...
For frcp/frsq on newer Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4470 >
2020-04-06 19:41:56 +00:00
Alyssa Rosenzweig
a6ae2d8f94
pan/bi: Remove nontrivial SPECIAL ops
...
These require a lot more handholding in the IR than we can deal with at
this stage; we need to restrict ourselves to frcp/sqrt.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4470 >
2020-04-06 19:41:56 +00:00
Rhys Perry
20a4b1461b
aco: zero-initialize Temp
...
Fixes dEQP-VK.transform_feedback.* crashes from accesses garbage
temporaries in emit_extract_vector().
Fixes: 85521061 ("aco: prepare helper functions for subdword handling")
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4463 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4463 >
2020-04-06 19:15:19 +00:00
Rhys Perry
8dd6a51e80
aco: remove divergence check in sanitize_if()
...
We also need to do this if a side ends in a divergent break.
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4461 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4461 >
2020-04-06 18:39:29 +00:00
Rob Clark
57557783f6
nir/lower_amul: fix slot calculation
...
Fixes incorrect indexing in
dEQP-GLES31.functional.ssbo.layout.instance_array_basic_type.packed.mat2x3
Signed-off-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Eric Anholt <eric@anholt.net >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4455 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4455 >
2020-04-06 18:00:17 +00:00
Rob Clark
4638a16a93
nir: add some swizzle helpers
...
Signed-off-by: Rob Clark <robdclark@chromium.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/4455 >
2020-04-06 18:00:17 +00:00
Jason Ekstrand
e78a7a1825
nir: Assert memory loads are aligned
...
We've had alignment parameters on these operations for a while but a
bunch of places weren't setting them. That should be resolved now so we
can start validating that they're always set.
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4441 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4441 >
2020-04-06 15:57:30 +00:00
Marek Olšák
068a3bf0d7
util: move and adjust the vertex upload heuristic equation from u_vbuf
...
This will also be used by glthread.
The new equation is optimized for glthread.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466 >
2020-04-06 10:30:10 -04:00
Marek Olšák
d9cb0ec5e6
vbo: expose helper function vbo_get_minmax_index_mapped for glthread
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466 >
2020-04-06 10:29:52 -04:00
Marek Olšák
e69e59778c
mesa: split _mesa_primitive_restart_index into a function without gl_context
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466 >
2020-04-06 10:29:38 -04:00
Marek Olšák
e6bc1702f4
mesa: precompute _mesa_primitive_restart_index during state changes
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466 >
2020-04-06 10:29:16 -04:00
Marek Olšák
10beee8a77
mesa: remove no longer needed _mesa_is_bufferobj function
...
All buffers have Name != 0.
Note that there is no longer the pointer dereference to get Name,
so it's faster.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466 >
2020-04-06 10:28:53 -04:00
Marek Olšák
58fab9a6fe
mesa: remove NullBufferObj
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466 >
2020-04-06 10:28:53 -04:00
Marek Olšák
54525808aa
mesa: don't ever bind NullBufferObj to glBindBuffer(Base,Range) slots
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466 >
2020-04-06 10:28:53 -04:00
Marek Olšák
f3cce7087a
mesa: don't ever bind NullBufferObj for glBindBuffer targets
...
Since VAOs don't use NullBufferObj for vertex attribs anymore, let's remove
more uses of NullBufferObj.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466 >
2020-04-06 10:28:53 -04:00
Marek Olšák
e630271e0e
mesa: don't ever set NullBufferObj in gl_vertex_array_binding
...
This improves performance by 5% in the game "torcs", FPS: 98.83 -> 103.73
It does a lot of glPush/PopClientAttrib, which exacerbates the overhead
of setting NullBufferObj.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466 >
2020-04-06 10:28:53 -04:00
Marek Olšák
a0a0c68150
mesa: optimize initialization of new VAOs
...
Precompute the default state in gl_context, and just copy it when we create
a VAO.
This also helps glPushClientAttrib function, which always creates a VAO,
which has a substantial CPU overhead in profiles.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4466 >
2020-04-06 10:27:59 -04:00
Mauro Rossi
dbdd0149ed
android: aco: add various compiler statistics
...
Fixes a building error due to compiler/aco_statistics.cpp
missing in src/amd/Makefile.sources
Fixes: b1544352 ("aco: add various compiler statistics")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com >
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev >
2020-04-06 12:59:13 +02:00
Hyunjun Ko
9f174eb2df
nir: fix wrong assignment to buffer in xfb_varyings_info
...
Tested with dEQP-VK.transform_feedback.fuzz.various_buffers.buffers100_instance_array_vertex
Signed-off-by: Hyunjun Ko <zzoon@igalia.com >
Reviewed-by: Tapani Pälli <tapani.palli@intel.com >
Cc: mesa-stable@lists.freedesktop.org
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4459 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4459 >
2020-04-06 08:55:05 +00:00
Tapani Pälli
84e845c969
mesa/st: release variants for active programs before unref
...
Programs can be shared among many contexts and each program holds a
variant list which has context specific variants. When context gets
destroyed it must make sure it relases all variants, otherwise remaining
context that utilizes same program will attempt to save a zombie shader
for already deleted context when releasing program and its variants.
Fixes:
dEQP-EGL.functional.sharing.gles2.program.render
and other flaky multihread dEQP-EGL failures.
v2: pass program pointer via & (Marek)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Cc: mesa-stable@lists.freedesktop.org
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4386 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4386 >
2020-04-06 08:00:00 +03:00
Tapani Pälli
4822cc9700
mesa/st: unbind shader state before deleting it
...
Signed-off-by: Tapani Pälli <tapani.palli@intel.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com >
Cc: mesa-stable@lists.freedesktop.org
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4386 >
2020-04-06 08:00:00 +03:00
Alyssa Rosenzweig
82597c46c3
pan/bit: Add mode to run unit tests
...
Probably the most useful of the bunch going forward.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
1a1c55709e
pan/bit: Make run more useful
...
..by printing some output.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
50476efb61
pan/bit: Add csel tests
...
..and pull out common instruction generation to reduce duplication in
tests a bit.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
9b262208b6
pan/bit: Add CSEL to interpreter
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
069189ff0f
pan/bit: Add FMA tests
...
Now that the earlier reg ctrl issue is fixed these should pass.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
78ba6d50a4
pan/bit: Add 16-bit fmod tests
...
These raise another set of issues -- indeed, not all of these tests are
passing, since it turns out I have an actual bug in the packing code. So
after all this work, test bringup has identified an actual issue :)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
40160c576d
pan/bit: Add verbose printing for tests
...
We'd like to dump both the generated IR (so we know exactly what's being
tested) as well as the compiled program (so we know what's running for
comparison).
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
7c887d368e
pan/bit: Add helper for generating floating mod tests
...
We can iterate them, isn't that adorable!
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
14c5343867
pan/bit: Add packing test framework
...
Given an instruction, we'd like to wrap it in a clause with some I/O on
each end so we can pack it up and send it to the hardware to compare
against the simulator.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
5e3e32e368
pan/bit: Implement floating source mods
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
dbb8a564f2
pan/bit: Implement outmods
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
ab58185604
pan/bit: Add preliminary FMA/ADD/MOV implementations
...
Missing some details about modifiers but the core structure should
look like this for 32 and 16-bit, I think. My sincerest apologies for
the macro magic, I tried to make it the least bad I could but trying to
keep down repitition.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
fbe504e221
pan/bit: Handle read/write
...
We case the various sources and destinations to model register file
access and passthrough in particular.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
7904a29340
pan/bit: Stub out BIR interpreter
...
We'd like to step through a BIR program to evaluate it for testing.
Let's stub out some infrastructure for modeling Bifrost.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
8eefb2765a
pan/bi: Match CSEL argument order with hw
...
It turns out ports need to be in order of the arguments of an
instruction (port 3, that is), which breaks on instructions whose IR
argument order is different from the packed order, like csel. So fix
that.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
9114ebbe79
pan/bi: Add helper to debug port assignment
...
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
0ab3f687c0
pan/bi: Handle BIFROST_FIRST_WRITE_FMA_P2_READ_P3
...
It's a special case for unclear reasons, and if you mess it up you get
INSTR_INVALID_ENC. Isn't hardware fun?
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
75aabc6ea1
pan/bi: Allow BI_FMA to take mods
...
It doesn't take abs but it can take outmod/neg.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
69dde49f80
pan/bi: Don't gobble zero ports
...
In case we've reading/writing R0.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
c7a6df4638
pan/bi: Fix negation in ADD.v2f16
...
When we flip the sources we need to flip the negates as well to stay
consistent.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
5f48caf98b
pan/bi: Fix duplicated source in ADD.v2f16
...
Typo.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00
Alyssa Rosenzweig
08fe1081b7
pan/bi: Export bi_class_name
...
For use in naming tests.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4458 >
2020-04-05 23:26:04 +00:00