mesa/src
Iago Toral Quiroga 0f2d1dfe65 v3d: use the GPU to record primitives written to transform feedback
We can use the PRIMITIVE_COUNTS_FEEDBACK packet to write various primitive
counts to a buffer, including the number of primives written to transform
feedback buffers, which will handle buffer overflow correctly.

There are a couple of caveats with this:

Primitive counters are reset when we emit a 'Tile Binning Mode Configuration'
packet, which can happen in the middle of a primitives query, so we need to
read the buffer when we submit a job and accumulate the counts in the context
so we don't lose them.

We also need to do the same when we switch primitive type during transform
feedback so we can compute the correct number of recorded vertices from
the number of primitives. This is necessary so we can provide an accurate
vertex count for draw from transform feedback.

v2:
 - When computing the number of vertices for a primitive, pass in the base
   primitive, since that is what the hardware will count.
 - No need to update primitive counts when switching primitive types if
   the base primitives are the same.
 - Log perf warning when mapping the primitive counts BO for readback (Eric).
 - Only emit the primitive counts packet once at job end (Eric).
 - Use u_upload mechanism for the primitive counts buffer (Eric).
 - Use the XML to generate indices into the primitive counters buffer (Eric).

Fixes piglit tests:
spec/ext_transform_feedback/overflow-edge-cases
spec/ext_transform_feedback/query-primitives_written-bufferrange
spec/ext_transform_feedback/query-primitives_written-bufferrange-discard
spec/ext_transform_feedback/change-size base-shrink
spec/ext_transform_feedback/change-size base-grow
spec/ext_transform_feedback/change-size offset-shrink
spec/ext_transform_feedback/change-size offset-grow
spec/ext_transform_feedback/change-size range-shrink
spec/ext_transform_feedback/change-size range-grow
spec/ext_transform_feedback/intervening-read prims-written

Reviewed-by: Eric Anholt <eric@anholt.net>
2019-08-08 08:36:52 +02:00
..
amd radv/gfx10: Enable DCC for storage images. 2019-08-07 02:13:07 +02:00
broadcom v3d: use the GPU to record primitives written to transform feedback 2019-08-08 08:36:52 +02:00
compiler nir/builder: Add nir_b2i 2019-08-06 18:03:10 -04:00
drm-shim meson: replace libmesa_util with idep_mesautil 2019-08-03 00:08:37 +00:00
egl util: add anon_file.h for all memfd/temp file usage 2019-08-07 22:57:55 +00:00
etnaviv etnaviv: fix a null pointer dereference 2019-08-05 15:31:43 +02:00
freedreno mesa: freedreno: Android.registers.mk: Fix up register xml.h file generation 2019-08-07 02:18:38 +00:00
gallium v3d: use the GPU to record primitives written to transform feedback 2019-08-08 08:36:52 +02:00
gbm meson: replace last uses of libxmlconfig with idep_xmlconfig 2019-08-03 00:08:37 +00:00
getopt
glx glx: drop unnecessary pointer deref for function calls 2019-08-04 11:26:20 +01:00
gtest
hgl
imgui
intel anv: support GetSwapchainGrallocUsage2ANDROID for Android 2019-08-08 05:08:01 +00:00
loader mesa: Rename GLX_USE_TLS to USE_ELF_TLS. 2019-08-03 20:18:17 +02:00
mapi mesa: add EXT_shader_image_load_store glBindImageTextureEXT function 2019-08-06 17:40:53 -04:00
mesa st/mesa: eliminate unnecessary redirection 2019-08-07 21:33:56 -07:00
panfrost panfrost: Take into account a index_bias for glDrawElementsBaseVertex calls 2019-08-06 17:18:19 -07:00
util util/hash_table: Fix hashing in clears on 32-bit 2019-08-08 07:42:52 +02:00
vulkan meson: replace last uses of libxmlconfig with idep_xmlconfig 2019-08-03 00:08:37 +00:00
meson.build v3d: Introduce a DRM shim for calling out to the simulator. 2019-07-25 08:56:19 -07:00
SConscript