By applying the same coding style of the other case statements,
this patch fixes the following building errors:
../src/nouveau/mme/mme_fermi.c:209:10: error: expected expression
uint32_t src_bit = inst->bitfield.src_bit;
^
../src/nouveau/mme/mme_fermi.c:216:39: error: use of undeclared identifier 'src_bit'; did you mean 'dst_bit'?
fprintf(fp, " (%u, %u, %u)", src_bit, size, dst_bit);
^~~~~~~
dst_bit
../src/nouveau/mme/mme_fermi.c:211:19: note: 'dst_bit' declared here
uint32_t dst_bit = inst->bitfield.dst_bit;
^
2 errors generated.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This simple test compiles all the MMEs for Turing and Volta to ensure
that they build and don't run out of registers. We could, in theory, do
actual unit testing here with gtest but just building is enough to
ensure that no one breaks driver start-up on hardware they don't own.
They can still break the driver functionally, of course, but at least
it'll initialize.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
Instead of taking an nvk_cmd_bo take a nouveau_ws_bo and keep the map
pointer separate. We'll need to do this when we start pushing stuff
that isn't nvk_cmd_bo. Also, rework the bounds to be in bytes.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
These don't need hardware and instead run entirely in the simulator.
The goal is to have something that we can run in CI and which ensures
consistency between the Turing and Fermi MMEs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
util_mask_sign_extend returns a uint64_t which we need to cast to
uint32_t in order to get the right comparison. Otherwise, we risk
having ~0 in the top 32 bits and the comparison failing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
According to the nouveau GL driver, this should be the addres of the
last byte, not the byte after the end. The calculation will overflow if
range is 0 so we need to handle that special.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This enables compiling geometry shaders. Based primarily on gallium
nvc0/nvc0_program.c.
We need to enable/disable user clip planes based on the last geometry
stage. Some asserts in codegen need to be changed too because the
compacted clip distance inputs are arrayed in the geometry shader. So we
have an array of clip distances for each input vertex.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
We don't need base_instance after we've set it the first time. We also
don't need to keep intance_count around forever. mme_loop() always
consumes the value at the beginning so we can free up a register right
away. Fermi is really tight on registers and this is enough to make
the basic draw MMEs successfully compile.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
These all rely on mme_tu104_read_fifoed() which isn't available before
Turing. They're also really register-expensive and we can't compile
them without paring things down a bit.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This is required for shader heaps pre-Volta because they use a single
64-bit base address and 32-bit offsets for individual shaders. In this
case, the addresses returned from the heap are relative to the base.
The BO for the heap can be retrieved via nvk_heap_get_contiguous_bo_ref
which returns an actual reference so it's safe to call from the queue
submit path.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>