- Aug 13, 2019
-
-
Alyssa Rosenzweig authored
Midgard has no hardware support for transform feedback, so we simulate it in software. Lucky us. What Midgard does do is write out vertex shader outputs to main memory unconditonally. Fragment shaders read varyings back from main memory; there's no on-chip storage for varyings. Whether this was a reasonable design is a question I will not be engaging in this commit message. What that does mean is that, in some sense, Midgard *always* does transform feedback uncondtionally, and there's no way to turn off transform feedback. Normally, we would allocate some scratch memory every frame to store the varyings in an arbitrary format (interleaved for simplicity), and then feed that scratch to the fragment shader and discard when the rendering completes. The only difference now is that sometimes, for some buffers, we use a BO provided to us by Gallium and a format provided by Gallium, instead of allocating the memory and choosing the format ourselves. This has some limitations -- in particular, it only works at vec4 granularity, so a corresponding GLSL linkage patch is needed to correctly implement transform feedback for non-vec4 types. Nevertheless, given the hardware already works in this admittedly-bizarre fashion, transform feedback is "free". Or, at least, it's no more expensive than any other rendering. Specifically not implemented is dynamically-sized transform feedback (i.e. with geometry/tesselation shaders). Spoiler alert: Midgard has no support for geometry *or* tessellation shaders, despite advertising support. They get compiled to *massive* compute shaders. How's that for checkbox compliance? Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
-
Alyssa Rosenzweig authored
We have to maintain the internal offset ourselves. Per v3d. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
-
Alyssa Rosenzweig authored
We could probably get away with doing this once per pipe_shader_state but let's not jump down that rabbit hole quite yet. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
-
Alyssa Rosenzweig authored
It's there in shader_info, but we need to access it from pan_context.c Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
-
Alyssa Rosenzweig authored
We'll need this in a moment. Ken's implementation, lightly edited for Panfrost. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Suggested-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
-
Alyssa Rosenzweig authored
This is a huge hack to workaround incomplete BO flushing logic, but it's enough for the dEQP transform feedback tests, and doing the resource management to get this right is out-of-scope for this patch series. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
-
Alyssa Rosenzweig authored
It doesn't really make sense, since we don't have special texture coordinate varyings, but it'll make some code simpler for XFB and it doesn't hurt us, even if I lose a bit of my soul setting it. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
-
Alyssa Rosenzweig authored
GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN should now be handled. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
-
Alyssa Rosenzweig authored
We're just going to compute them in the driver but let's get the structures setup to handle them. Implementation from v3d. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
-
Rob Clark authored
Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
If driver-params are required, we really should emit it on every draw for correctness. And if not required, we should emit a DISABLE so that un-applied state updates from previous draws don't corrupt the const state. Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Worth ~+20% on gl_driver2 Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Which takes ownership of the stateobj. Useful for streaming state- objs, to avoid an extra ref/unref Worth ~5% at gl_driver2 Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
To avoid emitting unneeded const state. Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Should be no functional change. Next step is to re-arrange various const state into different stateobjs. Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Move more of the code to deal just w/ screen, without requiring ctx. Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Hoist them out of code-paths that will eventually be called directly for various a6xx+ const related stateobjs. This ends up duplicating one constlen check in ir3_emit_vs_consts(), to avoid what could otherwise be an unnecessary WFI on older gens. Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
framebuffer_barrier() still depends on the ctx, but the rest can move to screen. Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
These don't need to be in context, and we'll need them in screen in a later patch. Plus it's a good cleanup. Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
No reason for the indirection when called from a3xx specific code. Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Move DP emit to it's own function. No functional change, just code motion to prepare for splitting up const state into multiple state- objs on a6xx. Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Rob Clark authored
Signed-off-by: Rob Clark <robdclark@chromium.org>
-
Boris Brezillon authored
Implement ->set_damage_region() region to support partial updates. This is a dummy implementation in that it does not try to merge damage rects. It also does not deal with distinct regions and instead pick the largest quad as the only damage rect and generate up to 4 reload rects out of it (the left/right/top/bottom regions surrounding the biggest damage rect). We also do not try to reduce the number of draws by passing all quad vertices to the blit request (would require extending u_blitter) Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
-
Add a pipe_screen->set_damage_region() hook to propagate set-damage-region requests to the driver, it's then up to the driver to decide what to do with this piece of information. If the hook is left unassigned, the buffer-damage extension is considered unsupported. Signed-off-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Qiang Yu <yuq825@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-
Use the DRI2 interface callback to pass the damage rects to the driver. Signed-off-by: Harish Krupo <harishkrupo@gmail.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Qiang Yu <yuq825@gmail.com> Tested-by: Qiang Yu <yuq825@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-
Add a new DRI2_BufferDamage interface to support the EGL_KHR_partial_update extension, informing the driver of an overriding scissor region for a particular drawable. Based on a commit originally authored by: Harish Krupo <harish.krupo.kps@intel.com> renamed extension, retargeted at DRI drawable instead of context, rewritten description Signed-off-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Qiang Yu <yuq825@gmail.com> Tested-by: Qiang Yu <yuq825@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-
The intension of the KHR_partial_update was not to send the damage back to the platform but to send the damage to the driver to ensure that the following rendering could be restricted to those regions. This patch removes the set_damage_region from the egl_dri vtbl and all the platfrom_*.c files. Then upcomming patches add a new dri2 interface for the drivers to implement Signed-off-by: Harish Krupo <harishkrupo@gmail.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Qiang Yu <yuq825@gmail.com> Tested-by: Qiang Yu <yuq825@gmail.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-
Jordan Justen authored
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
-
Jordan Justen authored
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Eric Anholt <eric@anholt.net>
-
Jordan Justen authored
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Eric Anholt <eric@anholt.net>
-
Jordan Justen authored
This refactor will let us more easily use pipe_screen::resource_get_param as an alternative to pipe_screen::resource_get_handle. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Eric Anholt <eric@anholt.net>
-