summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2020-05-15draw: add disk caching for draw shadersllvmpipe-disk-cacheDave Airlie1-17/+126
This adds the cache search/insert and compile skipping for cached objects to the VS/GS/TES/TCS stages in draw.
2020-05-15llvmpipe: hook draw disk cache upDave Airlie1-1/+21
Connect the draw callbacks into the llvmpipe code.
2020-05-15draw: add disk cache callbacks for draw shadersDave Airlie3-1/+35
This provides a set of hooks from the driver that draw can use to access the disk cache for the draw shaders.
2020-05-15llvmpipe/cs: add shader cachingDave Airlie1-4/+45
As for fragment shader, skip compilation step if we have the shader s: add shortcu Please enter the commit message for your changes. Lines starting
2020-05-15llvmpipe/fs: add caching supportDave Airlie1-4/+47
Serialize and check if the object is in the cache, it there is a cached object skip compilation code once we've constructed the function interface.
2020-05-15gallivm: don't cache shaders that use fetch functions.Dave Airlie1-1/+5
This needs to be reworked, but it's a bit messy as we have to store all the fetch pointers to be added as globals later once gallivm has been initialised further. For now just refuse to cache shaders that hit these paths (mainly ETC1 and BPTC).
2020-05-15llvmpipe: add infrastructure for disk cache supportDave Airlie5-13/+83
This hooks up the gallium API and adds the APIs needed for shader stages to search and add things to the cache. It also adds cache stats debug printing.
2020-05-15gallivm: add cache interface to mcjitDave Airlie3-1/+49
MCJIT uses an ObjectCache object to implement the cache, this creates and instances of it and adds it to the MCJIT instances, it stores the cached object for later use by the outer layers.
2020-05-15gallivm: skip operations if we have a cached object.Dave Airlie1-0/+3
If the object is loaded from the cache, a bunch of gallivm/llvm interactions can be skipped.
2020-05-15gallivm: add support for a cache objectDave Airlie14-19/+41
This plumbs the cache object into the gallivm API, nothing uses it yet.
2020-05-15gallivm: rework debug printf hook to use global mapping.Dave Airlie3-7/+9
Cached shaders require relinking, so hardcoding the pointer can't work. This switches out the printf code to use new proper API.
2020-05-15gallivm: rework coroutine malloc/free callouts.Dave Airlie5-11/+35
When using cached shaders we have to relink the shader with external symbols when it's loaded. However the way gallivm does function calls now hardcodes the function pointer into the shader. LLVM had a mechanism for doing this properly using global mappings, this switches the coroutine alloc/free code to use a global mapping.
2020-05-15llvmpipe/draw: drop variant number from function names.Dave Airlie3-16/+9
When we use an object cache for the MCJIT we can have identical cache entries from the same shader variant in different shaders, but the JIT objcache uses the function name to relink things, so it has to be consistent. Just drop the variants from the function names. Note the modules still have the variant info.
2020-05-14freedreno/uuid: Generate meaningful device and driver UUIDEduardo Lima Mitev4-7/+58
Device UUID becomes SHA1('freedreno' + gpu_id). Driver UUID becomes SHA1(mesa-version + git-head-sha1). v2: Don't use build_id for driver UUID since it generates different values for vulkan and gl shared objects. (Kristian) Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4847>
2020-05-14freedreno: Centralize UUID generation into new files freedreno_uuid.c/hEduardo Lima Mitev7-15/+119
The new files are created under a 'common' folder under 'src/freedreno', where shared functionality between GL and Vulkan drivers (that is not registers, layout or compiler) will be placed. Reviewed-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4847>
2020-05-14aco: split operations that use a swap's definitionRhys Perry2-7/+46
Instead of relying it's read being entirely within the swap's definition. No shader-db changes. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4950>
2020-05-14tu: Advertise COLOR_ATTACHMENT_BLEND_BIT for blendable formatsConnor Abbott2-0/+13
Whoops. After fixing dual-source blending, dEQP-VK.pipeline.blend.* all go from skipped to pass, and fixes a bunch of dEQP-VK.api.info.format_properties.* tests where blending is required. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5039>
2020-05-14tu: Implement dual-src blendingConnor Abbott1-4/+50
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5039>
2020-05-14tu: Move RENDER_COMPONENTS setting to pipeline stateConnor Abbott4-10/+8
This needs to be pipeline state because it can change when dual-source blending is active. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5039>
2020-05-14ir3: Fixup dual-source blending slotConnor Abbott1-0/+1
The hardware expects that where MRT0 and MRT1 would normally go are the dual sources for MRT0, whereas GLSL has an extra "index" parameter that indicates which source it is. Remap it when handling FS outputs. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5039>
2020-05-14freedreno/a6xx: Document dual-src blending enable bitsConnor Abbott1-0/+4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5039>
2020-05-14Revert "nir/validate: validate the stride for deref_ptr_as_array"Karol Herbst1-1/+0
This reverts commit 667e14e7bd759a77e732c4de09fb978ee3816eaf
2020-05-14docs: update calendar, add news item, and link releases notes for 20.0.7Dylan Baker3-7/+4
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5041>
2020-05-14docs/relnotes Add sha256 sums to 20.0.7Dylan Baker1-1/+1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5041>
2020-05-14docs: Add release notes for 20.0.7Dylan Baker1-0/+160
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5041>
2020-05-14intel: Silence unused parameter warning in __intel_log_use_argsIan Romanick1-1/+1
...in every file that includes intel_log.h. In file included from src/intel/vulkan/anv_private.h:93, from src/intel/vulkan/genX_cmd_buffer.c:27: src/intel/common/intel_log.h: In function ‘__intel_log_use_args’: src/intel/common/intel_log.h:75:34: warning: unused parameter ‘format’ [-Wunused-parameter] Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4994>
2020-05-14anv: Silence unused parameter warning in anv_image_get_clear_color_addrIan Romanick1-1/+1
...in every file that includes anv_private.h. In file included from src/intel/vulkan/genX_cmd_buffer.c:27: src/intel/vulkan/anv_private.h: In function ‘anv_image_get_clear_color_addr’: src/intel/vulkan/anv_private.h:3690:57: warning: unused parameter ‘device’ [-Wunused-parameter] Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4994>
2020-05-14anv/tests: Silence unused parameter warnings in mainIan Romanick6-6/+6
src/intel/vulkan/tests/block_pool_no_free.c: In function ‘main’: src/intel/vulkan/tests/block_pool_no_free.c:147:14: warning: unused parameter ‘argc’ [-Wunused-parameter] src/intel/vulkan/tests/block_pool_no_free.c:147:27: warning: unused parameter ‘argv’ [-Wunused-parameter] src/intel/vulkan/tests/block_pool_grow_first.c: In function ‘main’: src/intel/vulkan/tests/block_pool_grow_first.c:27:14: warning: unused parameter ‘argc’ [-Wunused-parameter] src/intel/vulkan/tests/block_pool_grow_first.c:27:27: warning: unused parameter ‘argv’ [-Wunused-parameter] src/intel/vulkan/tests/state_pool.c: In function ‘main’: src/intel/vulkan/tests/state_pool.c:36:14: warning: unused parameter ‘argc’ [-Wunused-parameter] src/intel/vulkan/tests/state_pool.c:36:27: warning: unused parameter ‘argv’ [-Wunused-parameter] src/intel/vulkan/tests/state_pool_padding.c: In function ‘main’: src/intel/vulkan/tests/state_pool_padding.c:27:14: warning: unused parameter ‘argc’ [-Wunused-parameter] src/intel/vulkan/tests/state_pool_padding.c:27:27: warning: unused parameter ‘argv’ [-Wunused-parameter] src/intel/vulkan/tests/state_pool_no_free.c: In function ‘main’: src/intel/vulkan/tests/state_pool_no_free.c:115:14: warning: unused parameter ‘argc’ [-Wunused-parameter] src/intel/vulkan/tests/state_pool_no_free.c:115:27: warning: unused parameter ‘argv’ [-Wunused-parameter] src/intel/vulkan/tests/state_pool_free_list_only.c: In function ‘main’: src/intel/vulkan/tests/state_pool_free_list_only.c:35:14: warning: unused parameter ‘argc’ [-Wunused-parameter] src/intel/vulkan/tests/state_pool_free_list_only.c:35:27: warning: unused parameter ‘argv’ [-Wunused-parameter] v2: Use 'int main(void)' instead. Suggested by Jason. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4994>
2020-05-14anv/tests: Don't rely on assert or changing NDEBUG in testsIan Romanick8-31/+59
This is the last part of the fix for #2903. v2: Add test_common.h. Fixes: f7c56475d25 ("anv/tests: compile to something sensible in release builds") Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4994>
2020-05-14aco: fix WQM coalescingDaniel Schürmann1-1/+3
get_reg_specified() doesn't handle special registers like SCC. Fixes: a5fc96b533418dc2d68f17f3f19ac5f82d59b978 ('aco: coalesce parallelcopies during register allocation') Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5036>
2020-05-14anv: Fix descriptor set clean-up on BO allocation failureJason Ekstrand1-1/+1
This was a bit of rebase fail when writing 682c81bdfb. We stopped freeing descriptor sets back to the pool and started calling vk_object_base_finish. This commit reverts a that hunk should have never made its way into the final patch. Fixes: 682c81bdfb "vulkan,anv: Add a base object struct type" Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: Mark Janes <mark.a.janes@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5032>
2020-05-14anv: Call vk_object_base_finish for image viewsJason Ekstrand1-0/+1
Fixes: 682c81bdfb7 "vulkan,anv: Add a base object struct type" Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5032>
2020-05-14zink: correct PIPE_SHADER_CAP_MAX_SHADER_IMAGESErik Faye-Lund1-0/+4
We don't support shader-images yet, so this is premature to expose. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5024>
2020-05-14zink: do not expose real value for PIPE_CAP_MAX_VIEWPORTSErik Faye-Lund1-1/+1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5024>
2020-05-14meta: Remove support for multisample blitsIan Romanick2-407/+15
Since i965 no longer uses this function for blitting color buffers, there is no driver left that will ever support multisample textures and use _mesa_meta_BlitFramebuffer. v2: Delete blit_state::msaa_shaders and enum blit_msaa_shader. text data bss dec hex filename 12243286 1344936 1290748 14878970 e308fa before/lib64/dri/i965_dri.so 12240398 1344936 1290748 14876082 e2fdb2 after/lib64/dri/i965_dri.so Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14meta: Coalesce the GLSL and FF paths in meta_clearIan Romanick1-14/+9
text data bss dec hex filename 12243286 1344936 1290748 14878970 e308fa before/lib64/dri/i965_dri.so 12243286 1344936 1290748 14878970 e308fa after/lib64/dri/i965_dri.so Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14meta: Use same vertex coordinates for GLSL and FF clearsIan Romanick1-12/+8
text data bss dec hex filename 12243446 1344936 1290748 14879130 e3099a before/lib64/dri/i965_dri.so 12243286 1344936 1290748 14878970 e308fa after/lib64/dri/i965_dri.so Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14meta: Stop frobbing MatrixModeIan Romanick2-33/+21
text data bss dec hex filename 12243510 1344936 1290748 14879194 e309da before/lib64/dri/i965_dri.so 12243446 1344936 1290748 14879130 e3099a after/lib64/dri/i965_dri.so v2: Use _mesa_load_matrix to set the projection matrix instead of frobbing dirty bits directly. Suggested by Jason. Clean up some comments in the neighborhood. Since glOrtho isn't called, there's no point in mentioning it in the comment. Only _mesa_load_identity_matrix on the projection matrix when it isn't set to an ortho matrix. Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14mesa: Add function to calculate an orthographic projectionIan Romanick2-10/+38
Unlike the existing _math_matrix_ortho, the new _math_float_ortho function just stores the calculated matrix in an array of floats. It does not multiply the new matrix with data already stored. text data bss dec hex filename 12243486 1344936 1290748 14879170 e309c2 before/lib64/dri/i965_dri.so 12243510 1344936 1290748 14879194 e309da after/lib64/dri/i965_dri.so Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14mesa: Add matrix utility functions to load matricesIan Romanick2-15/+31
These are basically DSA versions of glLoadIdentity() and glLoadMatrix() that are available for internal Mesa use. text data bss dec hex filename 12243574 1344936 1290748 14879258 e30a1a before/lib64/dri/i965_dri.so 12243486 1344936 1290748 14879170 e309c2 after/lib64/dri/i965_dri.so Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14meta: Remove support for clearing integer buffersIan Romanick2-54/+2
Since i965 no longer uses this function for clearing color buffers, there is no driver left that will ever support integer textures and use _mesa_meta_glsl_Clear. As a side note, the has_integer_textures check was rubbish anyway because meta always smashes the API to API_OPENGL_COMPAT. text data bss dec hex filename 12244406 1344936 1290748 14880090 e30d5a before/lib64/dri/i965_dri.so 12243574 1344936 1290748 14879258 e30a1a after/lib64/dri/i965_dri.so Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14meta: Make _mesa_meta_setup_sampler staticIan Romanick2-11/+8
text data bss dec hex filename 12244854 1344936 1290748 14880538 e30f1a before/lib64/dri/i965_dri.so 12244406 1344936 1290748 14880090 e30d5a after/lib64/dri/i965_dri.so v2: Put static on the function definition too. Suggested by Paulo. v3: Reformat prototype. Suggested by Jason. Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> [v2] Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14meta: Make _mesa_meta_texture_object_from_renderbuffer staticIan Romanick2-8/+7
text data bss dec hex filename 12244974 1344936 1290748 14880658 e30f92 before/lib64/dri/i965_dri.so 12244854 1344936 1290748 14880538 e30f1a after/lib64/dri/i965_dri.so v2: Put static on the function definition too. Suggested by Paulo. v3: Reformat prototype. Suggested by Jason. Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> [v2] Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14i965: Assert that blorp always handles color blitsIan Romanick2-0/+5
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/856>
2020-05-14nir/validate: validate the stride for deref_ptr_as_arrayKarol Herbst1-0/+1
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4068>
2020-05-14nir/deref: copy ptr_stride when rematerializingKarol Herbst1-1/+4
Signed-off-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4068>
2020-05-14targets/opencl: fix build against LLVM>=10 with Polly supportJan Palus1-0/+8
see https://bugs.llvm.org/show_bug.cgi?id=44870 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4511>
2020-05-14freedreno: Avoid duplicate BO relocs in FD_RINGBUFFER_OBJECTs.Eric Anholt1-3/+17
For the piglit drawoverhead case, 5/18 of the objects' relocs were duplicated. We can dedupe them at object create time (since objects are long-lived) and avoid repeated relocation work at emit time. nohw drawoverhead program statechange throughput 2.34082% +/- 0.645832% (n=10). Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5020>
2020-05-14freedreno: Fix resource layout dump loop.Eric Anholt1-1/+1
Apparently I've never dumped a fully populated slices array, so the 0-init always terminated the loop. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5020>
2020-05-14zink: disable vkCmdResolveImage when respecting render-conditionErik Faye-Lund1-1/+2
vkCmdResolveImage doesn't respect render-condition, so let's fall back to blitter in this case instead. Fixes: 80d7cc6f129 ("zink: enable conditional rendering if available") Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5008>