aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/lima/lima_texture.c
Commit message (Collapse)AuthorAgeFilesLines
* lima: split pixel and texel format tablesVasily Khoruzhick2020-03-201-1/+1
| | | | | | | | | This is preparation for the next commit where we may need different swap_r_b flags for pixel and texel formats. Reviewed-by: Erico Nunes <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4241>
* lima: rename lima_submit to lima_jobQiang Yu2020-02-171-8/+8
| | | | | | | Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: use per submit dump fileQiang Yu2020-02-171-2/+2
| | | | | | | | | | After multi lima_submit, commands for one lima_submit may not be flushed when change framebuffer. But we want to track command stream for one submit, so save dump file for each submit. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: track write submits of context (v3)Qiang Yu2020-02-171-0/+1
| | | | | | | | | | | | | | | | | We need to flush submit which write to the FBO before read it as texture. v2: rename lima_flush_previous_write_submit to lima_flush_previous_submit_writing_resouce. v3: delay add submit to hash_table to lima_update_submit_wb when really know the render target will be written. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: add lima_submit_getQiang Yu2020-02-171-1/+6
| | | | | | | | | | Replace all usage of "ctx->submit" in draw code path with lima_submit_get(). This function will create new submit in the following changes. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: merge gp/pp submitQiang Yu2020-02-171-1/+1
| | | | | | | | | Use single lima_submit for the submit operation. This is also for moving more information in lima_context to lima_submit. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: remove lima_ctx_buff_va submit flags (v2)Qiang Yu2020-02-171-4/+3
| | | | | | | | | | | | | | We don't have any shared lima_ctx_buff for both GP and PP, so no need to have these flags. v2: still add submit in lima_ctx_buff_va because some bo need to exist cross flush, so not every submit will call lima_ctx_buff_alloc. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: always add texture bo to submitQiang Yu2020-02-171-2/+11
| | | | | | | | | No matter texture desc change, we need to add texture to submit. Otherwise texture may be freed before submit finish. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3755>
* lima: add new findings to texture descriptorVasily Khoruzhick2020-01-131-3/+18
| | | | | | | | | | | | | | | | | | | Lower 8 bits of unknown_1_3 seems to be min_lod, rest of 4 bits + miplevels are max_lod and min_mipfilter seems to be lod bias. All are in fixed format with 4 bit integer and 4 bit fraction, lod_bias also has sign bit. Blob also seems to do some magic with lod_bias if min filter is nearest -- it adds 0.5 to lod_bias in this case. Same story when all filters are nearest and mipmapping is enabled, but in this case it subtracts 1/16 from lod_bias. Fixes 134 dEQP tests in dEQP-GLES2.functional.texture.* Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3359> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3359>
* lima: drop suballocatorVasily Khoruzhick2019-12-191-1/+1
| | | | | | | | | | Since we're using a separate per-draw BO for GP outputs we don't need suballocator anymore. Reviewed-by: Erico Nunes <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3158> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3158>
* lima/parser: Add texture descriptor parserAndreas Baierl2019-12-131-0/+5
| | | | | Signed-off-by: Andreas Baierl <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2980>
* lima: add cubemap supportArno Messiaen2019-10-311-2/+11
| | | | | | Signed-off-by: Arno Messiaen <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Reviewed-by: Erico Nunes <[email protected]>
* lima: fix stride in texture descriptorArno Messiaen2019-10-311-1/+1
| | | | | | Signed-off-by: Arno Messiaen <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]> Reviewed-by: Erico Nunes <[email protected]>
* lima: support rectangle textureIcenowy Zheng2019-09-261-0/+3
| | | | | | | | | | | | | | As Vasily discovered, the bit 7 of the word 1 of the texture descriptor is set when reloading the framebuffer, to use framebuffer-based offset rather than normalized one. This bit also works for regular textures to enable accessing with non-normalized offset. Add support for rectangle texture by setting this bit for PIPE_TEXTURE_RECT. Suggested-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Icenowy Zheng <[email protected]> Reviewed-by: Vasily Khoruzhick <[email protected]>
* lima: fix texture descriptor issuesVasily Khoruzhick2019-08-281-8/+7
| | | | | | | | | | | Looks like initial RE was wrong and some fields have different purpose. I.e. there's no "disable_mipmap" field, it's actually part of another field that selects mipmap filtering. Also fix layout position. Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* lima: move format handling to unified placeQiang Yu2019-08-251-57/+3
| | | | | | | | | Create a unified table to handle pipe format to texture and render target format lookup. Reviewed-by: Vasily Khoruzhick <[email protected]> Reviewed-by: Erico Nunes <[email protected]> Signed-off-by: Qiang Yu <[email protected]>
* lima: introduce a struct describing texture descriptorVasily Khoruzhick2019-08-081-48/+78
| | | | | | | | | | | | | Use a struct with bitfields to construct texture descriptor instead of poking bits in array of uint32_t. It improves code readability and makes it easier to experiment with unknown fields. Also fix mipmapping while we're at it - Utgard can have up to 13 levels, but 64 bytes is enough only for 10. Calculate descriptor size dynamically to account extra levels if we need them. Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* lima: add texel format tableVasily Khoruzhick2019-08-081-35/+49
| | | | | | | | | Introduce a table for supported texel formats and use it to check whether format is supported and for converting pipe format to lima texel format. Reviewed-by: Qiang Yu <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
* lima: fix lima_blit with non-zero level source resourceQiang Yu2019-05-251-25/+12
| | | | | | | | | | | lima_blit will do blit between resources with different levels. When blit from a level!=0 source, it will sample from that level of resource as texture. Current texture setup won't respect level when not mipmap filter. Reviewed-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]>
* lima: add support for depth/stencil fbo attachments and texturesVasily Khoruzhick2019-04-141-0/+9
| | | | | | | | | Hardware supports writing back Z/S buffers and sampling from them, so add support for that. Signed-off-by: Vasily Khoruzhick <[email protected]> Reviewed-by: Qiang Yu <[email protected]> Tested-by: Icenowy Zheng <[email protected]>
* gallium: add lima driverQiang Yu2019-04-111-0/+278
v2: - use renamed util_dynarray_grow_cap - use DEBUG_GET_ONCE_FLAGS_OPTION for debug flags - remove DRM_FORMAT_MOD_ARM_AGTB_MODE0 usage - compute min/max index in driver v3: - fix plbu framebuffer state calculation - fix color_16pc assemble - use nir_lower_all_source_mods for lowering neg/abs/sat - use float arrary for static GPU data - add disassemble comment for static shader code - use drm_find_modifier v4: - use lima_nir_lower_uniform_to_scalar v5: - remove nir_opt_global_to_local when rebase Cc: Rob Clark <[email protected]> Cc: Alyssa Rosenzweig <[email protected]> Acked-by: Eric Anholt <[email protected]> Signed-off-by: Andreas Baierl <[email protected]> Signed-off-by: Arno Messiaen <[email protected]> Signed-off-by: Connor Abbott <[email protected]> Signed-off-by: Erico Nunes <[email protected]> Signed-off-by: Heiko Stuebner <[email protected]> Signed-off-by: Koen Kooi <[email protected]> Signed-off-by: Marek Vasut <[email protected]> Signed-off-by: marmeladema <[email protected]> Signed-off-by: PaweÅ‚ Chmiel <[email protected]> Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Rohan Garg <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]> Signed-off-by: Qiang Yu <[email protected]>