This more coarse-grained hash information for compiler (vs. full
devinfo), used only by Iris and Anv, and relevant for more recent
platforms. Remove it from elk.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
For now is not linked to any driver. The tools were renamed to use elk
prefix to avoid conflicting with the brw ones. The run-test.py script
was also updated due to that change.
Before the new compiler can be linked together with the old (going to be
done for Iris and other tools), the symbol conflicts need to be fixed
first. This will happen in a later commit.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27563>
We use host maps of VRAM all over the driver on Maxwell+ so we know they
work. This exposes it to applications for use for data upload. To
avoid thrashing, we only expose this on systems with properly a
configured PCI controllwer with resizable BAR support.
We already choose whether or not to set the MMAP bit when creating the
BO based on memory type properties so we just need to add the type.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26622>
Without without resizable BAR, we're limited as to how much VRAM we can
map and we sometimes run out of maps for games with large numbers of
shaders. We keep using the DMA engine fallback in that case.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26622>
We don't want to use it for anything because we want VM isolation
per-device but we need the device open for VK_EXT_memory_budget.
Reviewed-by: Thomas H.P. Andersen <phomes@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27662>
This is just to decrease the size of glDrawElements by 8 more bytes.
This packed glDrawElements call occupies only 1 slot in glthread_batch.
This decreases the size of 1 frame in glthread batches by 13%
in Viewperf2020/Catia1.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
We always reserved space for a doubled glBindBuffer call, occupying
2 slots. Thanks to the removal of cmd_size, we can finally represent
glBindBuffer in only 1 slot, so do that. This saves space if there is
only 1 glBindBuffer call.
The combining of back-to-back BindBuffer calls is preserved by keeping
track of 2 last BindBuffer calls.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
Same as the previous commit, just applied to more functions.
This removes safe_mul and checking whether cmd_size is too large
because the size is always small with these functions.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
glthread_attrib_binding has 2 fields and 4 bytes of padding, which is
arranged in array. This removes the padding by splitting the structure
into 2 arrays, one for each field.
This also fixes the pointer alignment.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
glthread (the python generator) needs to know the pointer size at compile
time to sort structure fields of calls for optimal structure packing based
on the CPU.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
glthread will compare the whole type string, so the string must not have
trailing spaces.
No functional change.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
Since changing 1 field to 8 bits and the removal of cmd_size, call sizes
have decreased, so we have 4 unused bytes in 2 DrawArrays structures
So far we use:
- DrawArrays
- DrawArraysInstancedBaseInstance
- DrawArraysInstancedBaseInstanceDrawID
Change them to these by either removing 4 more bytes or adding 4 bytes,
so that we don't waste space, which drops the number of used calls by 1:
- DrawArraysInstanced
- DrawArraysInstancedBaseInstanceDrawID
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
Since changing 2 fields to 8 bits and the removal of cmd_size, call sizes
have decreased by 4 bytes, so we have 4 unused bytes in most DrawElements
structures. So far we have used these calls for all DrawElements variants:
- DrawElementsBaseVertex
- DrawElementsInstanced
- DrawElementsInstancedBaseVertexBaseInstance
- DrawElementsInstancedBaseVertexBaseInstanceDrawID
Change them to these by either removing 4 more bytes or adding 4 bytes,
so that we don't waste space.
- DrawElements
- DrawElementsInstancedBaseVertex
- DrawElementsInstancedBaseInstance
- DrawElementsInstancedBaseVertexBaseInstanceDrawID
This decreases the size of 1 frame in glthread batches by 12%
in Viewperf2020/Catia1.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
The only legal values are {1, 2, 3, 4, GL_BGRA}.
We need GLpacked16i to be unsigned, not signed, because GL_BGRA is
greater than 0x8000.
This decreases the size of 1 frame by 10% in Viewperf2020/Catia1.
It decreases the size of many Pointer calls by 8 bytes.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
Only variable-sized calls keep cmd_size in their structures, and it's
renamed to num_slots because it's in units of 8-byte elements.
The motivation is to make room for reducing call sizes.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
The main motivation is that no_error allows us to drop count==0 draws
at the beginning of the marshal function, instead of forwarding them
to the frontend thread. Such draws are plentiful with Viewperf.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>
The main motivation is that no_error allows us to drop count==0 draws
at the beginning of the marshal function, instead of forwarding them
to the frontend thread. Such draws are plentiful with Viewperf.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27350>