aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost
Commit message (Collapse)AuthorAgeFilesLines
* panfrost: Fix gnu-empty-initializer error.Vinson Lee2020-03-161-1/+1
| | | | | | | | | | | | ../src/gallium/drivers/panfrost/pan_cmdstream.c:1553:54: error: use of GNU empty initializer extension [-Werror,-Wgnu-empty-initializer] union mali_attr varyings[PIPE_MAX_ATTRIBS] = { }; ^ Fixes: 836686daf36c ("panfrost: Move panfrost_emit_varying_descriptor() to pan_cmdstream.c") Signed-off-by: Vinson Lee <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4198> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4198>
* panfrost: Promote midgard_program to panfrost/utilAlyssa Rosenzweig2020-03-112-2/+2
| | | | | | | | We'll want Bifrost to reuse the same linking mechanisms for the most part. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150>
* panfrost: Move pan_afbc.c file to the the right Makefile.source fileJohn Stultz2020-03-111-1/+0
| | | | | | | | | | It seems pan_afbc.c was added to the wrong Makefile.sources file. So fix this, so we don't run into build issues with mesa/master trying to build under AOSP. Signed-off-by: John Stultz <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4141>
* Revert "gallium: make handles of set_global_binding 64 bit"Karol Herbst2020-03-101-1/+1
| | | This reverts commit e1ffb72a05f9b50ee47767aaadbab3e47896ee14
* gallium: make handles of set_global_binding 64 bitKarol Herbst2020-03-101-1/+1
| | | | | | | | | | needed by CL Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4072> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4072>
* panfrost: Get rid of ctx->payloads[]Boris Brezillon2020-03-103-42/+33
| | | | | | | | | | | Now that vertex/tiler payloads are re-initialized at draw/launch_grid time we can get of of the ctx->payloads[] field and allocate those payload templates on the stack. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Use ctx->active_prim in panfrost_writes_point_size()Boris Brezillon2020-03-101-1/+1
| | | | | | | | | Check ctx->active_prim instead of prefix.draw_mode so we can eventually get rid of ctx->payloads. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Re-init the VT payloads at draw/launch_grid() timeBoris Brezillon2020-03-104-29/+29
| | | | | | | | | Doing that should help us avoiding state leaks between draw/launch_grid calls. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Move panfrost_emit_varying_descriptor() to pan_cmdstream.cBoris Brezillon2020-03-107-429/+411
| | | | | | | | | | Move panfrost_emit_varying_descriptor() to pan_cmdstream.c where other emit functions live and adjust the prototype to be consistent with other emit helpers. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Move panfrost_emit_vertex_data() to pan_cmdstream.cBoris Brezillon2020-03-107-137/+113
| | | | | | | | | Move panfrost_emit_vertex_data() to pan_cmdstream.c where other emit functions live, and adjust the prototype for consistency. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Inline panfrost_queue_draw() and panfrost_emit_for_draw()Boris Brezillon2020-03-101-60/+36
| | | | | | | | | | Now that panfrost_queue_draw() and panfrost_emit_for_draw() are small enough, we can move the code to panfrost_draw_vbo() and have all vt and emit calls grouped in one place. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Move vertex/tiler payload initialization out of panfrost_draw_vbo()Boris Brezillon2020-03-103-145/+157
| | | | | | | | | Add a panfrost_vt_set_draw_info() function taking care of the draw related initialization of the vertex and tiler payloads. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Move streamout offset update out of panfrost_draw_vbo()Boris Brezillon2020-03-101-7/+13
| | | | | | | | That's part of out attempt to shrink panfrost_draw_vbo(). Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Rename panfrost_stage_attributes()Boris Brezillon2020-03-104-25/+28
| | | | | | | | | panfrost_stage_attributes() is emitting mali_attr_meta descriptors, so let's rename it accordingly and move it to pan_cmdstream.c. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Move the mali_attr.src_offset adjustment to a sub-functionBoris Brezillon2020-03-101-6/+21
| | | | | | | | | Create a panfrost_vertex_state_upd_attr_offs() helper to adjust the attr_meta src_offsets. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Emit attribute descriptors after patching the templatesBoris Brezillon2020-03-101-9/+6
| | | | | | | | | Patching attribute desc when they are in cacheable memory should be more efficient. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Prepare attribute for builtins at state creation timeBoris Brezillon2020-03-103-18/+9
| | | | | | | | | | The attribute meta slots reserved for gl_VertexID and gl_InstanceID can be pre-filled at state creation time. Only the index needs to be adjusted when attributes are generated. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Ignore BO start addr when adjusting src_offsetBoris Brezillon2020-03-101-3/+3
| | | | | | | | | BOs are guaranteed to be aligned on 4K which inherently guarantees the 64 byte alignment. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Drop initial mali_attr_meta.src_offset assignmentBoris Brezillon2020-03-101-4/+1
| | | | | | | | | | | | The mali_attr_meta.src_offset is initialized to pipe_vertex_element.src_offset at vertex element creation time, but this field is then adjusted when the descrptors are emitted. Let's use the pipe_vertex_element data we saved earlier and drop this initial assignment. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Add an helper to emit a pair of vertex/tiler jobsBoris Brezillon2020-03-103-21/+41
| | | | | | | | | Add the panfrost_emit_vertex_tiler_jobs() helper and use it in panfrost_queue_draw(). Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Move sampler/tex descs emission helpers to pan_cmdstream.cBoris Brezillon2020-03-103-80/+82
| | | | | | | | | | | | Move panfrost_upload_texture_descriptors() and panfrost_upload_sampler_descriptors() to pan_cmdstream.c where other cmdstream related helpers live. While at it, change their prototype and name to make it consistent with the other helpers and prepare things for ctx->payloads[] removal. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Add a panfrost_sampler_desc_init() helperBoris Brezillon2020-03-103-86/+78
| | | | | | | | | | It just makes sense to group all HW descriptor initilization logic in pan_cmdstream.c, so let's move this code out of panfrost_create_sampler_state(). Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Prepare shader_meta descriptors at emission timeBoris Brezillon2020-03-107-390/+388
| | | | | | | | | | | | | | | | | This way we avoid potential state leaks and keep the shader_meta initialization in once place. The time spent preparing the shader descriptors should be negligible compared to the time spent pushing those descriptors to the transient buffer (remember we are writing to non-cacheable memory here). Note that we might get back to some sort of shader_meta descriptor caching at some point if that proves necessary, but now we have those panfrost_frag_meta_xxx_update() helpers now where xxx maps directly to a CSO bind, which should ease desc template updates. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Prepare things to get rid of panfrost_shader_state.tripipeBoris Brezillon2020-03-103-21/+33
| | | | | | | | | | | | | | | | panfrost_shader_state.tripipe is used as a template for shader_meta desc emission, but shader_meta desc preparation time should be negligible compared to desc emission time (remember we are writing to non-cacheable memory here). Let's prepare for generating the the shader_meta desc entirely at draw time by adding the necessary fields to panfrost_shader_state. Note that we might brink back some sort of shader_meta desc caching at some point, but let's simplify things a bit for now. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Add an helper to update the rasterizer part of a tiler job descBoris Brezillon2020-03-104-31/+34
| | | | | | | | | | | | | | | | That's part of our attempt to make panfrost_emit_for_draw() a bit more dry and eventually get rid of it by inlining the code in panfrost_draw_vbo(). This is just one step in this direction. Note that we get rid of the panfrost_rasterizer.tiler_gl_enables field along the way, as setting/clearing those bits at draw time instead of doing when the state is created should make a huge difference. We might get back to pre-computed VT descs at some point, but let's keep things simple for now. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Add an helper to update the occclusion query part of a tiler job descBoris Brezillon2020-03-103-4/+16
| | | | | | | | | | That's part of our attempt to make panfrost_emit_for_draw() a bit more dry and eventually get rid of it by inlining the code in panfrost_draw_vbo(). This is just one step in this direction. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Simplify panfrost_emit_for_draw() and make it privateBoris Brezillon2020-03-102-18/+9
| | | | | | | | | | Now that panfrost_launch_grid() no longer calls panfrost_emit_for_draw(), we can keep it private to pan_context.c and drop all compute-related stuff. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Stop using panfrost_emit_for_draw() for compute jobsBoris Brezillon2020-03-103-2/+8
| | | | | | | | | | | | We actually need a small subset of what's done in panfrost_emit_for_draw() when emitting compute jobs, so let's copy what we need directly in panfrost_launch_grid() instead of re-using this function whose initial purpose was to generate vertex/tiler jobs for draw operations. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Move panfrost_attach_vt_framebuffer() to pan_cmdstream.cBoris Brezillon2020-03-103-28/+38
| | | | | | | | | | | | | Move panfrost_attach_vt_framebuffer() to pan_cmdstream.c and change its name to panfrost_vt_attach_framebuffer() so we can use a consistent prefix (panfrost_vt_) for all helpers initializing/updating midgard_payload_vertex_tiler fields. Note that the function only initializes one VT object now. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Dissociate shader meta patching from the desc emissionBoris Brezillon2020-03-103-15/+33
| | | | | | | | | | | | | | | Right now we emit two shader descriptors for the fragment shader, one when panfrost_patch_shader_state() is called, and the final one including both the shader_meta and the blend RT descriptors. The first generated fragment shader descriptor is never used, since the second one overrides the postfix.shader pointer. Let's dissociate the state patching logic from the descriptor emission so we don't upload descriptors that are never used. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Move shared mem desc emission out of panfrost_launch_grid()Boris Brezillon2020-03-103-18/+38
| | | | | | | | | Let's move the shared memory descriptor emission to a dedicated function living with its pairs in pan_cmdstream.c. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Move the const buf emission logic out of panfrost_emit_for_draw()Boris Brezillon2020-03-104-258/+293
| | | | | | | | | Let's move the constant buffer emission logic in a dedicated helper to make panfrost_emit_for_draw() a bit more dry. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Move viewport desc emission out of panfrost_emit_for_draw()Boris Brezillon2020-03-104-96/+183
| | | | | | | | | | | | | Let's move the viewport descriptor emission logic to a dedicated helper in order to shrink a bit the panfrost_emit_for_draw(). Note that this helper is placed in a new pan_cmdstream.c file where we will group all cmdstream related helpers (everything that's related to HW descriptor initialization emission). Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Move the batch stack size adjustment out of panfrost_queue_draw()Boris Brezillon2020-03-103-8/+20
| | | | | | | | | | | That's part of our attempt to sanitize panfrost_queue_draw(), panfrost_draw_vbo() and panfrost_emit_for_draw(). The new panfrost_batch_adjust_stack_size() helper is placed in pan_job.c, where all batch related functions live. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Add an helper to retrieve the currently active shader stateBoris Brezillon2020-03-103-13/+21
| | | | | | | | Doing that improves readability and helps avoiding code duplication. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Assign primitive_size.pointer only if writes_point_size() returns trueBoris Brezillon2020-03-103-2/+5
| | | | | | | | | | | | Checking vs->writes_point_size is not enough, as we might have a vertex shader writing point size, but a primitive that's not MALI_POINT. That currently works because emit_varying_descriptor() is called before the primitive_size.constant field is update, but let's make the logic more robust, just in case things are re-ordered at some point. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4083>
* panfrost: Pass the sampler view format when creating a tex descriptorBoris Brezillon2020-03-101-1/+1
| | | | | | | | | | | A sampler can use a different format than the native texture format. Let's pass the sampler format instead of the native texture format when creating a texture descriptor. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4101> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4101>
* panfrost: split index cache into shared partVasily Khoruzhick2020-03-103-90/+9
| | | | | | | | | Split it into shared part since we're going to re-use it in lima. Reviewed-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4051>
* panfrost: fix transform feedbackLouis-Francis Ratté-Boulianne2020-03-031-0/+7
| | | | | | | | | | | | | | | | | | Fix different use cases for transform feedback by setting: - PIPE_CAP_PACKED_STREAM_OUTPUT=0 - PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED=1 - PIPE_CAP_PSIZ_CLAMPED=1 This is enough for all dEQP xfb-related test cases to run successfully. Signed-off-by: Louis-Francis Ratté-Boulianne <[email protected]> Signed-off-by: Tomeu Vizoso <[email protected]> (Update dEQP expectations) Reviewed-by: Alyssa Rosenzweig <[email protected]> Acked-by: Daniel Stone <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2433>
* panfrost: LogicOp fixes and non 8-bit format supportIcecream952020-02-283-7/+23
| | | | | | | | | | | | | | With the previous LogicOp commit almost half of the blend modes were broken because the surplus bits were not cleared after an inot. v2: - Remove u8 "fast path" as 8-bit is not well optimised yet - Don't mask for 32-bit formats as that triggers an assert Fixes: 068806c9f6b ("panfrost: LogicOp support") Reviewed-by: Alyssa Rosenzweig <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3943> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3943>
* panfrost: Increase SSBO/image limit from 4->8Alyssa Rosenzweig2020-02-271-1/+1
| | | | | | | Fixes an error compiling some shaders. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3978>
* panfrost: Add PAN_MESA_DEBUG=gles3 optionAlyssa Rosenzweig2020-02-272-7/+15
| | | | | | | | This enables experimental GLES3.0 support without ES3.1/2 hacks. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3950>
* panfrost: Expose PIPE_CAP_PRIMITIVE_RESTARTAlyssa Rosenzweig2020-02-271-0/+1
| | | | | | | | It works just fine, we just forgot to expose the CAP. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3950>
* panfrost: Don't set shared->unk0Alyssa Rosenzweig2020-02-271-1/+0
| | | | | | | | | | | | | | | This field controls the size of per-thread temporaries (somehow this is separate from the regular stack for register spilling..), though I'm not certain on the details. Regardless this value of 0x1e despite being used in places by the blob seems wrong and is interfering with correct sizing of the stack. We don't use non-spilling scratchpad yet, so this is just here to fix some details of spilling. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3950>
* panfrost: Fix gl_VertexID/InstanceIDAlyssa Rosenzweig2020-02-273-4/+7
| | | | | | | | | | | Fixes a bunch of tests in dEQP-GLES3.functional.instanced.*. Fixes: 027944c7c8c ("panfrost: Avoid reading GPU memory when packing vertices") Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Tomeu Vizoso <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3950>
* panfrost: Implement index buffer cacheAlyssa Rosenzweig2020-02-273-1/+114
| | | | | | | | | | | | | | | | | | | For index bufer resources (not user index buffers), we're able to cache results. In practice, the cache works pretty dang well. It's still important that the min/max computation is efficient (since when the cache misses it'll run at draw-time and we don't want jank), but this can eliminate a lot of computations entirely. We use a custom data structure for caching. Search is O(N) to the size but sizes are capped so it's effectively O(1). Insertion is O(1) with automatic oldest eviction, on the assumption that the oldest results are the least likely to still be useful. We might also experiment with other heuristics based on actual usage later. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3880> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3880>
* panfrost: Combine get_index_buffer with bound computationAlyssa Rosenzweig2020-02-271-16/+25
| | | | | | | | | | | These operations are intertwined since there are optimizations that will want to "double dip". In particular for user index buffers we'd want to upload simultaneous with index computation. For resources we'd like to keep resource related code together. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3880>
* panfrost: Remove some more prints to stdoutTomeu Vizoso2020-02-261-2/+2
| | | | | | | | They can confuse test runners. Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3876>
* panfrost: Rewrite texture descriptor creation logicAlyssa Rosenzweig2020-02-213-168/+45
| | | | | | | | | | | | | | | | | | Rather than creating partially within the Gallium create function and monkeypatching on draw time with code split across N different files with tight Gallium dependencies, let's streamline everything into a series of maintainable routines in mesa/src/panfrost with no Gallium dependencies, doing the entire texture creation in one-shot and thus adding absolutely zero draw-time overhead (since we can allocate a BO for the descriptor and upload ahead-of-time, so switching textures is as cheap as switching pointers). Was this worth it? You know, I'm not sure :| Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3858> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3858>
* panfrost: Move format translation to rootAlyssa Rosenzweig2020-02-2111-369/+1
| | | | | | | | | | Since PIPE formats are now shared across Mesa we can do this, and the routines themselves are good enough code that I'm happy to move them here. We'll use them momentarily. Signed-off-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Boris Brezillon <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3858>