panfrost: Add invocation XML Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476>
panfrost: XMLify primitive information This is grouped as the latter part of the prefix. Some kludges around a magic field for compute jobs that we'll deal with later. (I hope.) Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476>
panfrost: Avoid postfix dep for vertex_data We need to thread some extra data through the context but still gets us a bit closer. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476>
panfrost: Add XML for mali_vertex_tiler_postfix This is a bit of everything but overall sets up the draw state. Translating fairly directly from the header. Main structural change is breaking out a 2-bit enum for occlusion query mode instead of maintaining separate booleans for the modes. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476>
panfrost: Add opaque midgard_blend XML Just to ensure write ordering is sane. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6476>
panfrost: XMLify the rest of shader_meta This contains a bit of everything, so just XML for this commit. The rest of the series will be slowly moving over to this representation. The one noteworthy addition is the rename of "No MSAA" to "Single-sampled lines". This came about due to a buggy branch that forgot to set this bit. Ths worked, with the caveat of the following tests failing with a single-sampled framebuffer: dEQP-GLES2.functional.rasterization.interpolation.basic.line_loop_wide dEQP-GLES2.functional.rasterization.interpolation.basic.line_strip_wide dEQP-GLES2.functional.rasterization.interpolation.basic.lines_wide dEQP-GLES2.functional.rasterization.interpolation.projected.line_loop_wide dEQP-GLES2.functional.rasterization.interpolation.projected.line_strip_wide dEQP-GLES2.functional.rasterization.interpolation.projected.lines_wide dEQP-GLES2.functional.rasterization.primitives.line_loop dEQP-GLES2.functional.rasterization.primitives.line_loop_wide dEQP-GLES2.functional.rasterization.primitives.line_strip dEQP-GLES2.functional.rasterization.primitives.line_strip_wide dEQP-GLES2.functional.rasterization.primitives.lines dEQP-GLES2.functional.rasterization.primitives.lines_wide That is, this bit controls the behaviour of line rasterization with multisampling. This is required to implement the divergent behaviours described in the OpenGL ES 3.2 specification sections 13.6.1 ("Basic Line Segment Rasterization") and 13.6.4 ("Line Multisample Rasterization"), where setting this bit corresponds to the former (single-sampled) behaviour. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
panfrost: XMLify beginning of shader descriptor We have just enough abstracted now to pack this ahead-of-time, during the CSO create, instead of at draw-time. But it's only a start. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
panfrost: XMLify Bifrost preload There's a lot of code here since the meaning of this field changes depending on shader state. The good news is that our careful handling allows preload registers to be decoded now, which pandecode could not previously do. Likewise, the cmdstream code to emit this is now much more obvious. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
panfrost: XMLify bifrost1 It's so poorly understood there's not much to do in this commit, sadly. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
panfrost: XMLify Midgard properties In a long journey to a full XML representation of mali_shader_meta, let's start with the fourth word, containing some shader properties. This is a translation from panfrost-job.h, with the exception of widening the uniform buffer count field [1] The other noteworthy change is combining the unknown 0x20 flag with the WRITES_Z flag to form a 2-bit depth source. This papers over the fact that the blob zeroes this field for non-fragment shaders. Given the proximity, this is a reasonable guess and avoids an ugly "is_fragment" bit. [1] Justified by the increased limit advertised by the Vulkan blob (maxDescriptorSetUniformBuffers on https://vulkan.gpuinfo.org/displayreport.php?id=5602#limits). Not actually supported in Panfrost right now. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
panfrost: XMLify blend equation Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
panfrost: XMLify blend flags Shared between Midgard/Bifrost. We get printing this way! Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6440>
panfrost: Add XML for attribute buffers Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
panfrost: XMLify attributes To keep review manageable, this only ports over pandecode and blitting. The main uses for vertex data and varying linkage will come next, as they touch considerably more code. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
panfrost: XMLify mali_channel Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
panfrost: Drop NXR format It's not clear this was ever exposed under any GL/DX/CL/VK/... extension whatsoever... Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6326>
panfrost: XMLify enum mali_format Note we are just handling the index part of the format. This is *not* the full format, which would include the swizzle (or v7 equivalent) and the sRGB flag. But in the interest of incremental progress, let's move this part over first and save on decoding complexity. To avoid substantial churn from prefixing FORMAT to format names, we special case the enums to avoid the prefix. This is undesirable but reduces churn, especially since format handling is slated for an overhaul soon to accomodate v7 Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6195>
panfrost: XMLify exception access Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6195>
panfrost: XMLify MSAA writeout mode Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6195>
panfrost: XMLify Block Format Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6195>