- Apr 28, 2020
-
-
Andreas Baierl authored
It is possible to upload the index buffer with glBufferData and bind it to GL_ARRAY_BUFFER. The data needs to be accessed with PIPE_BIND_VERTEX_BUFFER then. Add the possibility to also split these draws. We don't create a shadow memory for that case in order to avoid creating this shadow buffer every time we map a vertex buffer resource. Instead, we map the GPU memory while preparing the draw directly before calculating the splitted draw data. This seems to be the solution with the least overhead. An example for that is dEQP-GLES2.functional.buffer.write.use.index_array.array Signed-off-by:
Andreas Baierl <ichgeh@imkreisrum.de>
-
Andreas Baierl authored
Use panfrosts index_cache mechanism to store the calculated min/max values for the splitted draws. Also do some small cleanups in the code. Signed-off-by:
Andreas Baierl <ichgeh@imkreisrum.de>
-
Andreas Baierl authored
No need to pass the single values Signed-off-by:
Andreas Baierl <ichgeh@imkreisrum.de>
-
Andreas Baierl authored
The min/max indices belong to the resource, not to the context, so move them. Signed-off-by:
Andreas Baierl <ichgeh@imkreisrum.de>
-
Andreas Baierl authored
The blob splits indexed draws in cases when the index buffer is not contiguous. This is done as soon as we have a gap > 8 in the index buffer. Example: index_buffer = [0, 10, 2] -> results in a single draw (0~10) index_buffer = [0, 11, 2] -> results in two draws (0~2), (10) So it seems, that the blob uses a gap of 11 - 2 = 9, from which on draws are splitted. This effort tries to implement this behaviour. What it mainly does, is: 1) Allocate shadow CPU memory when a buffer for indices is created. This is currently only done, if the buffer is bound with PIPE_BIND_BUFFER_INDEX. There is a deqp test (functional.buffer.write.use.index_array.array), which uses PIPE_BIND_BUFFER_VERTEX to upload the indices. This case isn't handled in this MR, the blob does that split though. 2) Copy the dirty part of the shadow buffer back to GPU mem during unmapping 3) Within the indexed draw we do some more or less magic things :) We memcpy that shadow memory to a temporary one, do a quick sort on it and see how many draws we need, when splitting the draws, if the gap between the used indices is > 8. This can still be improved. We can use a better algorithm, to find the gaps and we should probably think about how to avoid the memcpy and qsort with each draw. 4) Fill an array of struct (ctx->minmax) with corresponding min/ max values depending on the number of draws we calculated for usage in VS CMD stream creation. 5) Use correct addresses for varyings and attributes including the right offset 6) Use the ctx->minmax array and create VS CMDS while iteration through the array The main issue on this effort is, that we need to get benchmarks, if this really is an optimization and if so, what the best value of the gap is. We have to get some benchmarks first to drop the WIP. Signed-off-by:
Andreas Baierl <ichgeh@imkreisrum.de>
-
Andreas Baierl authored
Prepare panfrosts index cache to take a pointer. We need this for the follow-up lima commits, which can split an indexed draw based on the index buffer. The information we need for the splitting will be saved in an array. The index cache will keep a pointer to that array. If we call _get and _add with a NULL-pointer, nothing new is done. Signed-off-by:
Andreas Baierl <ichgeh@imkreisrum.de>
-
- Apr 22, 2020
-
-
Andreas Baierl authored
Though this has neither positive nor negative effects, reorder the cmds to be blob-equivalent. Signed-off-by:
Andreas Baierl <ichgeh@imkreisrum.de>
-
Lionel Landwerlin authored
v2: Bump check to I915_PARAM_HAS_CONTEXT_ISOLATION (v4.16) (Ken) Signed-off-by:
Lionel Landwerlin <lionel.g.landwerlin@intel.com> Cc: <mesa-stable@lists.freedesktop.org> Closes: mesa/mesa#2803 Reviewed-by:
Kenneth Graunke <kenneth@whitecape.org> Part-of: <mesa/mesa!4643>
-
Samuel Pitoiset authored
Exclude WSI related tests in CI. Signed-off-by:
Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by:
Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <!4656>
-
Faith Ekstrand authored
i965 is the only driver that ever linked to this code and it's been doing it in BLORP for a long time now. The only possible case where it would have fallen back to meta was for depth/stencil but that should have ended starting with 6cec618e. Rip out the dead code. Acked-by:
Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by:
Marek Olšák <marek.olsak@amd.com> Part-of: <mesa/mesa!4622>
-
Alyssa Rosenzweig authored
Signed-off-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4671>
-
Alyssa Rosenzweig authored
Affects Bifrost. Signed-off-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4671>
-
Alyssa Rosenzweig authored
Only for a moment. Signed-off-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4671>
-
Alyssa Rosenzweig authored
Signed-off-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4671>
-
Alyssa Rosenzweig authored
Signed-off-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4671>
-
Alyssa Rosenzweig authored
We may generate either texture type. Signed-off-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4671>
-
Alyssa Rosenzweig authored
For tex. Signed-off-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4671>
-
Alyssa Rosenzweig authored
Signed-off-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4671>
-
Alyssa Rosenzweig authored
Signed-off-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4671>
-
Alyssa Rosenzweig authored
Signed-off-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4671>
-
Alyssa Rosenzweig authored
Signed-off-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4671>
-
Alyssa Rosenzweig authored
Signed-off-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4671>
-
Alyssa Rosenzweig authored
Signed-off-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4671>
-
Kenneth Graunke authored
I deleted one too many inst->saturate = ... lines. This one must stay. Fixes: b7c47c4f ("intel/compiler: Drop nir_lower_to_source_mods() and related handling.") Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net> Part-of: <mesa/mesa!4669>
-
Roman Stratiienko authored
Signed-off-by:
Roman Stratiienko <roman.stratiienko@nure.ua> Reviewed-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <!4634>
-
- Apr 21, 2020
-
-
Emma Anholt authored
Since we consume NIR, we get FRAG_RESULT_DEPTH in .x. Something must have been working out for this code to not be trying to get an undefined value, but go ahead and drop it now. Part-of: <mesa/mesa!4668>
-
Jonathan Marek authored
The BLIT scissor must be set correctly for tu_store_gmem_attachment. Fixes this deqp test: dEQP-VK.pipeline.multisample_shader_builtin.sample_id.137_191_1.samples Signed-off-by:
Jonathan Marek <jonathan@marek.ca> Part-of: <mesa/mesa!4666>
-
Andres Gomez authored
This change was missing after acf7e73b "(gitlab-ci: make explicit tracie is gitlab specific)". Fixes: acf7e73b "(gitlab-ci: make explicit tracie is gitlab specific)". Signed-off-by:
Andres Gomez <agomez@igalia.com> Reviewed-by:
Alexandros Frantzis <alexandros.frantzis@collabora.com> Reviewed-by:
Rohan Garg <rohan.garg@collabora.com> Part-of: <mesa/mesa!4638>
-
Emil Velikov authored
For GLVND reasons the client/platform extensions strings should be split. While in the non GLVND case they're one big string. Currently we handle this distinction at run-time for not obvious reason. Adding additional code and complexity. Swap those with a few well placed #if USE_LIBGLVND guards. As a side result this removes a minor memory leak due to the concatenation in the non GLVND case. Signed-off-by:
Emil Velikov <emil.velikov@collabora.com> Part-of: <mesa/mesa!4491>
-
Erik Faye-Lund authored
The signedness of enums are undefined, so on platforms with signed enums, this isn't going to work. One such platform is Microsoft Windows. So let's just use an unsigned here instead. Fixes: b1c4c4c7 ("mesa/gallium: automatically lower alpha-testing") Acked-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <mesa/mesa!4648>
-
Jesse Natalie authored
Acked-by:
Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <!4648>
-
Kenneth Graunke authored
I think we're unanimous in wanting to drop nir_lower_to_source_mods. It's a bit of complexity to handle in the backend, but perhaps more importantly, would be even more complexity to handle in nir_search. And, it turns out that since we made other compiler improvements in the last few years, they no longer appear to buy us anything of value. Summarizing the results from shader-db from this patch: - Icelake (scalar mode) Instruction counts: - 411 helped, 598 hurt (out of 139,470 shaders) - 99.2% of shaders remain unaffected. The average increase in instruction count in hurt programs is 1.78 instructions. - total instructions in shared programs: 17214951 -> 17215206 (<.01%) - instructions in affected programs: 1143879 -> 1144134 (0.02%) Cycles: - 1042 helped, 1357 hurt - total cycles in shared programs: 365613294 -> 365882263 (0.07%) - cycles in affected programs: 138155497 -> 138424466 (0.19%) - Haswell (both scalar and vector modes) Instruction counts: - 73 helped, 1680 hurt (out of 139,470 shaders) - 98.7% of shaders remain unaffected. The average increase in instruction count in hurt programs is 1.9 instructions. - total instructions in shared programs: 14199527 -> 14202262 (0.02%) - instructions in affected programs: 446499 -> 449234 (0.61%) Cycles: - 5253 helped, 5559 hurt - total cycles in shared programs: 359996545 -> 360038731 (0.01%) - cycles in affected programs: 155897127 -> 155939313 (0.03%) Given that ~99% of shader-db remains unaffected, and the affected programs are hurt by about 1-2 instructions - which are all cheap ALU instructions - this is unlikely to be measurable in terms of any real performance impact that would affect users. So, drop them and simplify the backend, and hopefully enable other future simplifications in NIR. Reviewed-by: Eric Anholt <eric@anholt.net> [v1] Reviewed-by:
Jason Ekstrand <jason@jlekstrand.net> Reviewed-by:
Ian Romanick <ian.d.romanick@intel.com> Part-of: <mesa/mesa!4616>
-
Dylan Baker authored
In meson 0.54.0 I fixed the llvm cmake dependency to return "not found" if shared linking is requested. This means that for 0.54.0 and later we don't need to do anything, and for earlier versions we only need to change the logic to force the config-tool method if shared linking is required. Fixes: 821cf694 ("meson: Use cmake to find LLVM when building for window") Acked-by:
Marek Olšák <marek.olsak@amd.com> Reviewed-by:
Eric Engestrom <eric@engestrom.ch> Part-of: <mesa/mesa!4556>
-
Dylan Baker authored
This moves the fi_types to a new mesa_private.h and removes the imports.c file. The vast majority of this patch is just removing pound includes of imports.h and fixing up the recursive includes. Reviewed-by:
Marek Olšák <marek.olsak@amd.com> Reviewed-by:
Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by:
Matt Turner <mattst88@gmail.com> Part-of: <!3024>
-
Dylan Baker authored
I don't know why removing imports.h suddenly makes clang realize that this function can not return in a non-debug build, but it does. Unreachable is better because it doesn't have this problem. Reviewed-by:
Marek Olšák <marek.olsak@amd.com> Reviewed-by:
Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by:
Matt Turner <mattst88@gmail.com> Part-of: <mesa/mesa!3024>
-
Dylan Baker authored
I'm not really sure where else to put it. Since imports.h only has two things left in it (neither of which are abstractions for smoothing away libc differences) I'd like to get them out of there. macros.h is the only place I can think of to put this macro. Reviewed-by:
Marek Olšák <marek.olsak@amd.com> Reviewed-by:
Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by:
Matt Turner <mattst88@gmail.com> Part-of: <mesa/mesa!3024>
-
Dylan Baker authored
MSVC 2015 and newer has perfectly valid snprintf and vsnprintf implementations, let's just use those. Reviewed-by:
Marek Olšák <marek.olsak@amd.com> Reviewed-by:
Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by:
Matt Turner <mattst88@gmail.com> Part-of: <mesa/mesa!3024>
-
Dylan Baker authored
Reviewed-by:
Marek Olšák <marek.olsak@amd.com> Reviewed-by:
Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by:
Matt Turner <mattst88@gmail.com> Part-of: <!3024>
-
Dylan Baker authored
Mesa has one of these in imports.h, so u_memory needs one as well. This is the version from mesa ported. Reviewed-by:
Marek Olšák <marek.olsak@amd.com> Reviewed-by:
Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by:
Matt Turner <mattst88@gmail.com> Part-of: <!3024>
-
Dylan Baker authored
Reviewed-by:
Marek Olšák <marek.olsak@amd.com> Reviewed-by:
Kristian H. Kristensen <hoegsberg@google.com> Reviewed-by:
Matt Turner <mattst88@gmail.com> Part-of: <!3024>
-