- 27 Jul, 2021 40 commits
-
-
Alyssa Rosenzweig authored
These are valid pairs of hexdumped assembled instructions and the corresponding disassembly, to be used to regression test both the assembler and the disassembler. Signed-off-by:
Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <mesa/mesa!12025>
-
Alyssa Rosenzweig authored
When we bring up the Valhall compiler in Mesa, we will like to have a disassembler in native code, so we shouldn't write our disassembler in Python. Instead, we write a disassembler generator in Python with mako templates, which will produce a va_disasm_instr entrypoint from the architecture defined in ISA.xml and valhall.py. Signed-off-by:
Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <mesa/mesa!12025>
-
Alyssa Rosenzweig authored
Logic described in the "Uniform/constant restrictions" section of the Valhall specification. (You know, my Valhall specification. Is there another one?) Signed-off-by:
Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <mesa/mesa!12025>
-
Alyssa Rosenzweig authored
This Python script acts as a standalone assembler. It takes Valhall instructions with Mesa-flavour syntax, parses them, errors out if there are syntax errors, and writes out an assembled binary if there are not. It also is available as a programmatic interface for automated testing. While this attempts to handle syntax errors, it does not check semantics. It will happily compile programs that fault, provided each instruction locally 'looks' plausible. The code itself is quite small, despite supporting most of the known ISA, because the syntax is regular and the heavylifting is done by ISA.xml and valhall.py. Signed-off-by:
Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <mesa/mesa!12025>
-
Alyssa Rosenzweig authored
Caught a bug in the published PDF. Whoops! Signed-off-by:
Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <mesa/mesa!12025>
-
Alyssa Rosenzweig authored
This Python module parses the ISA.xml file added in the previous commits, extracts all the useful information, and combines it with extra annotations. In total, it provides a programmatic way to interface with the Valhall instruction set. from valhall import instructions, enums Signed-off-by:
Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <mesa/mesa!12025>
-
Alyssa Rosenzweig authored
This handwritten file is the product of over a hundred hours of reverse-engineering and represents the sum of what I've learned about the Valhall architecture. It will be used in the next commits as the backbone of a Valhall toolchain. Signed-off-by:
Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <mesa/mesa!12025>
-
Sui Jingfeng authored
GALLIVM_PERF_NO_OPT is "belond" to GALLIVM_PERF environment variable, not GALLIVM_DEBUG. when GALLIVM_PERF=nopt is passed to llvmpipe, "-sroa -early-cse -simplifycfg -reassociate -constprop -instcombine -gvn" should not be printed. Those llvm optimation techniques should only be printed when the default(-O2) optimation is enabled. $ GALLIVM_PERF=nopt GALLIVM_DEBUG=dumpbc glmark2 Before apply this patch: Invoke as "opt -sroa -early-cse -simplifycfg -reassociate -mem2reg -constprop -instcombine -gvn ir_setup_variant_0.bc | llc -O2 [-mcpu=<-mcpu option>] [-mattr=<-mattr option(s)>]" After apply this patch: Invoke as "opt -mem2reg ir_fs304_variant0.bc | llc -O0 [-mcpu=<-mcpu option>] [-mattr=<-mattr option(s)>]" Reviewed-by:
Adam Jackson <ajax@redhat.com> Reviewed-by:
Roland Scheidegger <sroland@vmware.com> Signed-off-by:
suijingfeng <suijingfeng@loongson.cn> Part-of: <mesa/mesa!11994>
-
Lepton Wu authored
The code in dri_make_current just checks the value of the pointers to decide to update texture_stamp or not. This is buggy since a new allocated drawable could share the same address with the previous released drawable. Fix the stale pointer issue by always resetting these pointers to NULL in dri_unbind_context. v2: Move the reset codes to the end of the function. Signed-off-by:
Lepton Wu <lepton@chromium.org> Cc: mesa-stable Reviewed-by:
Adam Jackson <ajax@redhat.com> Reviewed-by:
Emil Velikov <emil.l.velikov@gmail.com> Part-of: <mesa/mesa!12050>
-
Jason Ekstrand authored
The current code we have for this is a bit of a mess, likely due to trying too hard to put it in anv_android.c. The external_format bit in anv_image, for instance, really means "quit creation early" which is something we want to do for AHardwareBuffer imports regardless of whether or not they use a native format. It gets set both by declaring an AHardwareBuffer external handle type and by VkExternalFormatANDROID. However, VkExternalFormatANDROID is only allowed for AHardwareBuffer imports. If we ever did get an external format outside the context of an AHardwareBuffer import, we would end up with a useless partially created image. When we detect an AHardwareBuffer import, we punt off to a function in anv_android.c that does nothing interesting but call anv_create_image with AUX disabled and external_format = true. The aux disable here is useless because the actual isl_surf layout is done by resolve_ahw_image which also sets ISL_SURF_USAGE_DISABLE_AUX_BIT. As far as external formats go, anv_image_from_external() sets it regardless of whether or not there is actually an external format. This commit replaces anv_image::external_format with anv_image::from_ahb which is the thing we actually want to track for this. We delete anv_image_from_external and a bunch of the external_format handling because it's all useless. The end result is massively simpler and, while it appears to blur the boundary between Android code and the rest of the driver, it makes the whole flow more obvious. Reviewed-by:
Tapani Pälli <tapani.palli@intel.com> Part-of: <mesa/mesa!12040>
-
Connor Abbott authored
These should be fixed by the linked VK-GL-CTS change. I couldn't reproduce the other renderpass failure on a650 though. Part-of: <mesa/mesa!12065>
-
Tomeu Vizoso authored
For now it only supports one RT and color attachments. Signed-off-by:
Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by:
Boris Brezillon <boris.brezillon@collabora.com> Part-of: <mesa/mesa!12019>
-
Tomeu Vizoso authored
For use in panvk_meta.c. Signed-off-by:
Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by:
Boris Brezillon <boris.brezillon@collabora.com> Part-of: <mesa/mesa!12019>
-
Tomeu Vizoso authored
Signed-off-by:
Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by:
Boris Brezillon <boris.brezillon@collabora.com> Part-of: <mesa/mesa!12019>
-
Tomeu Vizoso authored
As the panvk_cmd_alloc_fb_desc function might be called outside a draw, without a pipeline having been bound to the command buffer. Signed-off-by:
Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by:
Boris Brezillon <boris.brezillon@collabora.com> Part-of: <mesa/mesa!12019>
-
Tomeu Vizoso authored
In some cases, there will be an open batch because an event operation has been recorded, or a non-rendering command. Signed-off-by:
Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by:
Boris Brezillon <boris.brezillon@collabora.com> Part-of: <mesa/mesa!12019>
-
Tomeu Vizoso authored
Signed-off-by:
Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by:
Boris Brezillon <boris.brezillon@collabora.com> Part-of: <mesa/mesa!12019>
-
Tomeu Vizoso authored
Signed-off-by:
Tomeu Vizoso <tomeu.vizoso@collabora.com> Reviewed-by:
Boris Brezillon <boris.brezillon@collabora.com> Part-of: <mesa/mesa!12019>
-
Juan A. Suárez authored
Add a couple of flakes. Reviewed-by:
Jose Maria Casanova Crespo <jmcasanova@igalia.com> Signed-off-by:
Juan A. Suarez Romero <jasuarez@igalia.com> Part-of: <mesa/mesa!12068>
-
Yevhenii Kolesnikov authored
There are two distinct cases: - The last member of a shader storage block (length determined at run-time) - Implicitly-sized array (length determined at link-time) Fixes: 273f61a0 ("glsl: Add parser/compiler support for unsized array's length()") Signed-off-by:
Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com> Reviewed-by:
Timothy Arceri <tarceri@itsqueeze.com> Part-of: <mesa/mesa!11952>
-
Yevhenii Kolesnikov authored
ARB_shader_storage_buffer_object extension (promoted to core in 4.3) allows us to call .length() method on arrays declared without an explicit size. The length is determined at link time as a maximum array access. Fixes: 273f61a0 ("glsl: Add parser/compiler support for unsized array's length()") Signed-off-by:
Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com> Reviewed-by:
Timothy Arceri <tarceri@itsqueeze.com> Part-of: <!11952>
-
Erico Nunes authored
The viewport value computations done in lima_set_viewport_states can result in a negative value for viewport. These could end up converted to unsigned values in lima_clip_scissor_to_viewport causing crashes from invalid scissor commands. Prevent this by limiting the minimum value to zero as is already done for the left and bottom values. Closes: mesa/mesa#2938 Cc: mesa-stable Signed-off-by:
Erico Nunes <nunes.erico@gmail.com> Reviewed-by:
Vasily Khoruzhick <anarsoul@gmail.com> Part-of: <mesa/mesa!12055>
-
Pierre-Eric Pelloux-Prayer authored
The comment was incorrect: we can have N draws using the same mode with N > 1 (eg: GL_QUAD_STRIP draws cannot be merged). This commit fixes the drawing code to use the correct draw function. This fixes a hang in Starsector (see issue #5086). Fixes: b328d8e9 ("dlist: use an union instead of allocating a 1-sized array") Reviewed-by:
Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!11978>
-
Iago Toral authored
Reviewed-by:
Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!12034>
-
Iago Toral authored
When multiview is enabled, queries must begin and end in the same subpass and N consecutive queries are implicitly used, where N is the number of views enabled in the subpass. Implementations decide how results are split across queries. In our case, only one query is really used, but we still need to flag all N queries as available by the time we flag the one we use so that the application doesn't receive unexpected errors when trying to retrieve values from them. Reviewed-by:
Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!12034>
-
Iago Toral authored
Reviewed-by:
Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!12034>
-
Iago Toral authored
When multiview is enabled, we no longer care about when a particular attachment is first or last used in a render pass, since not all views in the attachment will meet that criteria. Instead, we need to track each individual view (layer) in each attachment and emit our stores, loads and clears accordingly. Reviewed-by:
Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!12034>
-
Iago Toral authored
If a multiview subpass doesn't use a particular layer then we can ignore that layer completely. Reviewed-by:
Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!12034>
-
Iago Toral authored
The Vulkan spec states that when multiview is enabled the number of layers in the framebuffer is set to one and that each attachment must then have at least as many layers as referenced by view masks in the subpasses in which is used. Reviewed-by:
Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!12034>
-
Iago Toral authored
Reviewed-by:
Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!12034>
-
Iago Toral authored
We implement multiview by replicating draw commands for all enabled views and setting a command buffer state for the currently active view we are broadcasting to. Reviewed-by:
Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!12034>
-
Iago Toral authored
This is used for multiview's gl_ViewIndex built-in. Reviewed-by:
Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!12034>
-
Iago Toral authored
This allows us to use layered rendering to broadcast draw calls to the appropriate views (layers). Reviewed-by:
Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!12034>
-
Iago Toral authored
Reviewed-by:
Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!12034>
-
Iago Toral authored
Reviewed-by:
Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!12034>
-
Iago Toral authored
Reviewed-by:
Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <mesa/mesa!12034>
-
Samuel Pitoiset authored
Some floating atomic instructions are not available on GFX8-9. No LLVM support. Signed-off-by:
Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by:
Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!12060>
-
Samuel Pitoiset authored
Signed-off-by:
Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by:
Rhys Perry <pendingchaos02@gmail.com> Part-of: <mesa/mesa!12060>
-
Chia-I Wu authored
They can be useful before resorting to gdb or perfetto. Signed-off-by:
Chia-I Wu <olvaffe@gmail.com> Reviewed-by:
Yiwei Zhang <zzyiwei@chromium.org> Part-of: <mesa/mesa!12073>
-
v1. Hyunjun Ko <zzoon@igalia.com> - Add to hanlde VK_DESCRIPTOR_POOL_CREATE_HOST_ONLY_BIT_VALVE - Don't support VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT and VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER v2. Hyunjun Ko <zzoon@igalia.com> - Fix some indentations and nitpicks. - Add the extension to features.txt v3. Hyunjun Ko <zzoon@igalia.com> - Remove unnecessary asserts. Signed-off-by:
Eduardo Lima Mitev <elima@igalia.com> Signed-off-by:
Hyunjun Ko <zzoon@igalia.com> Reviewed-by:
Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <mesa/mesa!9322>
-