summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
Commit message (Collapse)AuthorAgeFilesLines
* gallium/hud: add glthread countersMarek Olšák2017-06-263-0/+91
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: add API-thread-busy for monitoring the thread loadMarek Olšák2017-06-263-4/+22
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: add hud_pane::hud pointerMarek Olšák2017-06-262-3/+6
| | | | | | for later use Reviewed-by: Timothy Arceri <[email protected]>
* mesa/glthread: add glthread "perf" counters and pass them to gallium HUDMarek Olšák2017-06-263-0/+15
| | | | | | | | | | | for HUD integration in following commits. This valuable profiling data will allow us to see on the HUD how well glthread is able to utilize parallelism. This is better than benchmarking, because you can see exactly what's happening and you don't have to be CPU-bound. u_threaded_context has the same counters. Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: move struct hud_context to hud_private.hMarek Olšák2017-06-262-46/+48
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* gallium/hud: rename API-thread-busy to main-thread-busyMarek Olšák2017-06-263-5/+5
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* util: move pipe_thread_is_self from gallium to src/utilMarek Olšák2017-06-261-11/+0
| | | | Reviewed-by: Timothy Arceri <[email protected]>
* gallium/radeon: pass create_screen flags to r600_common_screen_initMarek Olšák2017-06-231-4/+4
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: allow passing 'unsigned flags' to create_screen()Marek Olšák2017-06-239-46/+47
| | | | | | for drirc options Reviewed-by: Nicolai Hähnle <[email protected]>
* cso: inline a few frequently-used functionsMarek Olšák2017-06-222-31/+26
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* cso: don't return errors from sampler functionsMarek Olšák2017-06-222-18/+8
| | | | | | No code checks the errors. Reviewed-by: Nicolai Hähnle <[email protected]>
* cso: don't track the number of sampler states boundMarek Olšák2017-06-221-36/+23
| | | | | | | | | | | | This removes 2 loops from hot codepaths and adds 1 loop to a rare codepath (restore_sampler_states), and makes sanitize_hash() slightly worse. Sampler states, when bound, are not unbound for draw calls that don't need them. That's OK, because bound sampler states don't add any overhead. This results in lower CPU overhead in most cases. Reviewed-by: Nicolai Hähnle <[email protected]>
* egl: turn one more boolean `int` into a `bool`Eric Engestrom2017-06-211-1/+1
| | | | | | | | | | Same as the previous commit, but this one was split out because it's a bit more complicated: this field is given as a pointer to a function, so the function had to be changed as well, and the function was use in a bunch of places, which needed updating as well. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* gallium/vbuf: avoid segfault when we get invalid glDrawRangeElements()Brian Paul2017-06-201-1/+15
| | | | | | | | | | | | | | | | | | | A common user error is to call glDrawRangeElements() with the 'end' argument being one too large. If we use the vbuf module to translate some vertex attributes this error can cause us to read past the end of the mapped hardware buffer, resulting in a crash. This patch adjusts the vertex count to avoid that issue. Typically, the vertex_count gets decremented by one. This fixes crashes with the Unigine Tropics and Sanctuary demos with older VMware hardware versions. The issue isn't hit with VGPU10 because we don't hit this fallback. No piglit changes. CC: [email protected] Reviewed-by: Marek Olšák <[email protected]>
* gallium/vbuf: add some const qualifiersBrian Paul2017-06-201-12/+13
| | | | | | Helps understandability a bit. Reviewed-by: Marek Olšák <[email protected]>
* translate: whitespace fixes in translate_generic.cBrian Paul2017-06-201-199/+206
|
* gallium/hud: support GALLIUM_HUD_DUMP_DIR feature on WindowsBrian Paul2017-06-161-6/+30
| | | | | | | Use a dummy implementation of the access() function. Use \ path separator. Add a few comments. Reviewed-by: Neha Bhende <[email protected]>
* draw: check for line_width != 1.0f in validate_pipeline()Brian Paul2017-06-151-3/+4
| | | | | | | | | We shouldn't use the wide line stage if the line width is 1. This check isn't strictly needed because all drivers are (now) specifying a line wide threshold of at least 1.0 pixels, but let's play it safe. Reviewed-by: Charmaine Lee <[email protected]>
* draw: whitespace and formatting fixesBrian Paul2017-06-152-60/+58
| | | | Trivial.
* gallium: Add renderonly-based support for pl111+vc4.Eric Anholt2017-06-153-0/+31
| | | | | | | | | | | | | | | | | | | This follows the model of imx (display) and etnaviv (render): pl111 is a display-only device, so when asked to do GL for it, we see if we have a vc4 renderer, make the vc4 screen, and have vc4 call back to pl111 to do scanout allocations. The difference from etnaviv is that we share the same BO between vc4 and pl111, rather than having a vc4 bo and a pl11 bo and copies between the two. The only mismatch between their requirements is that vc4 requires 4-pixel (at 32bpp) stride alignment, while pl111 requires that stride match width. The kernel will reject any modesets to an incorrect stride, so the 3D driver doesn't need to worry about that. v2: Rebase on Android rework, drop unused include. v3: Fix another Android bug, from Rob Herring's build-testing. Reviewed-by: Christian Gmeiner <[email protected]>
* etnaviv: Only use renderonly_get_handle for GEM handles.Eric Anholt2017-06-151-0/+1
| | | | | | | | | | | | Note that for requests for Prime FDs or flink names, we return handles to the etanviv BO, not the scanout BO. This is at least better than previous behavior of returning GEM handles for a request for an FD or flink name. And add an assert that renderonly_get_handle is only used for getting the GEM handle. Signed-off-by: Eric Anholt <[email protected]> Reviewed-by: Christian Gmeiner <[email protected]>
* gallium/util: Break recursion in pipe_resource_referenceMichel Dänzer2017-06-151-2/+8
| | | | | | | | | | | | | | | | | | | | It calling itself recursively prevented it from being inlined, resulting in a copy being generated in every compilation unit referencing it. This bloated the text segment of the Gallium mega-driver *_dri.so by ~4%, and might also have impacted performance. Fixes: ecd6fce2611e ("mesa/st: support lowering multi-planar YUV") v2: * Add comment above pipe_resource_next_reference [Samuel Pitoiset] v3: * Use loop to unreference the full chain of resources referenced via the next members [Timothy Arceri] v4: * Stop chasing ->next chain at the first sub-resource which isn't destroyed [Nicolai Hähnle] Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: add missing 'static' to tgsi_is_bindless_image_file()Samuel Pitoiset2017-06-141-1/+1
| | | | | | | | This should fix compilation errors in some situations. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101418 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: record bindless samplers/images usageSamuel Pitoiset2017-06-142-0/+49
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* tgsi/ureg: accept TGSI_FILE_{CONSTANT,INPUT} for dst registersSamuel Pitoiset2017-06-141-2/+0
| | | | | | | | | For example, TGSI_OPCODE_STORE for bindless images might use a constant buffer or a shader input. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* tc: add ARB_bindless_texture supportSamuel Pitoiset2017-06-143-1/+133
| | | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/util: whitespace, formatting fixes in u_upload_mgr.cBrian Paul2017-06-131-25/+29
| | | | Reviewed-by: Marek Olšák <[email protected]>
* vl,omx,va,vdpau,xvmc: don't set the priv pointer in context_createMarek Olšák2017-06-121-1/+1
| | | | | | Unused and radeonsi ignores it anyway. Acked-by: Nicolai Hähnle <[email protected]>
* gallium: fixed modulo zero crashes in tgsi interpreter (v2)Marius Gräfe2017-06-101-20/+20
| | | | | | | | | | | | | softpipe throws integer division by zero exceptions on windows when using % with integers in a geometry shader. v2: Made error results consistent with existing div/mod zero handling in tgsi. 64 bit signed integer division by zero returns zero like in micro_idiv, unsigned returns ~0u like in micro_udiv. Modulo operations always set all result bits to one (like in micro_umod). Reviewed-by: Roland Scheidegger <[email protected]>
* util: Move u_dynarray to src/utilThomas Helland2017-06-072-115/+0
| | | | | | | This will be used as the basis for unification Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* util/u_queue: add an option to set the minimum thread priorityMarek Olšák2017-06-071-1/+1
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_blitter: use 2D_ARRAY for cubemap blits if possibleMarek Olšák2017-06-072-19/+36
| | | | | | | | so that we can use TXF. The cubemap blit pixel shader code size: 148 -> 92 bytes Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_blitter: use TXF if possibleMarek Olšák2017-06-071-102/+190
| | | | | | | | | | | | | | | | | | This fixes piglit: arb_texture_view-rendering-r32ui TEX (image_sample) flushes denorms to 0 with FP32 textures on GCN, but such a texture can contain integer data written using an integer render view. If we do a transfer blit with TEX, denorms are flushed to 0. Luckily, TXF (image_load) doesn't do that. TXF also doesn't need to load the sampler state, so blit shaders don't have to do s_load_dwordx4. TXF doesn't do CLAMP_TO_EDGE, so it can only be used if the src box is in bounds, or if we clamp manually (this commit doesn't). Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_blitter: use TEX_LZ if it's supportedMarek Olšák2017-06-071-4/+8
| | | | | | | The sampler views always have first_level == last_level. Now radeonsi doesn't have to use the WQM. (a few SALU removed) Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/util: add _LZ and TXF options to simple shadersMarek Olšák2017-06-075-32/+75
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/ureg: add TEX/TXF_LZ opcodes to uregMarek Olšák2017-06-071-0/+2
| | | | Reviewed-by: Nicolai Hähnle <[email protected]>
* tree-wide: remove trailing backslashEric Engestrom2017-06-073-3/+3
| | | | | | | | | Simple search for a backslash followed by two newlines. If one of the newlines were to be removed, this would cause issues, so let's just remove these trailing backslashes. Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
* gallium/u_threaded: fixes for MSVCBrian Paul2017-06-051-7/+9
| | | | | | | | | | Replace some static assertions with runtime assertions. The static asserts don't work/fail on MSVC, despite the offsets being multiples of 16 (checked with softpipe). Use correct parameter types for a few gallium context functions. Reviewed-by: Marek Olšák <[email protected]>
* tgsi/scan: fix scanning fragment shaders with PrimID and Position/FaceMarek Olšák2017-06-051-7/+10
| | | | | | | | Not relevant to radeonsi, because Position/Face are system values with radeonsi, while this codepath is for drivers where Position and Face are ordinary inputs. Reviewed-by: Brian Paul <[email protected]>
* gallium/u_threaded: remove 16 bytes from tc_batchMarek Olšák2017-06-052-3/+0
| | | | | | All other sentinels occupy what is otherwise unused space. Reviewed-by: Samuel Pitoiset <[email protected]>
* gallium/u_threaded: align batches and call slots to 16 bytesMarek Olšák2017-06-052-3/+17
| | | | | | not sure if this helps Reviewed-by: Samuel Pitoiset <[email protected]>
* Android: use bionic pthread_barrier_* if possibleChih-Wei Huang2017-06-051-1/+1
| | | | | | | | | The pthread_barrier_* functions were introduced to bionic since Nougat. Signed-off-by: Chih-Wei Huang <[email protected]> Acked-by: Tapani Pälli <[email protected]> Acked-by: Emil Velikov <[email protected]>
* gallium: Add TGSI shader token for ARB_post_depth_coverageLyude2017-06-021-0/+1
| | | | | Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
* gallium/os: use mmap64 for AndroidRob Herring2017-05-251-18/+3
| | | | | | | | | Simplify the handling of mmap for Android by using mmap64 instead. mmap64 may have not existed for Android when this was written, but it's been around since 2013. Reviewed-by: Emil Velikov <[email protected]> Signed-off-by: Rob Herring <[email protected]>
* tgsi: remove unused tgsi_is_passthrough_shader()Samuel Pitoiset2017-05-242-79/+0
| | | | | Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Elie Tournier <[email protected]>
* auxiliary/vl: use vl_*_screen_create stubs when building w/o platformEmil Velikov2017-05-193-15/+35
| | | | | | | | | | | | | | | | | | | | Provide a dummy stub when the user has opted w/o said platform, thus we can build the binaries without unnecessarily requiring X11/other headers. In order to avoid build and link-time issues, we remove the HAVE_DRI3 guards in the VA and VDPAU state-trackers. With this change st/va will return VA_STATUS_ERROR_ALLOCATION_FAILED instead of VA_STATUS_ERROR_UNIMPLEMENTED. That is fine since upstream users of libva such as vlc and mpv do little error checking, let alone distinguish between the two. Cc: Leo Liu <[email protected]> Cc: Guttula, Suresh <[email protected]> Cc: [email protected] Cc: Christian König <[email protected]> Signed-off-by: Emil Velikov <[email protected]>
* configure: check once for DRI3 dependenciesEmil Velikov2017-05-191-0/+1
| | | | | | | | | | | | | | | | Currently we are having the XCB_DRI3 dependencies duplicated, partially. Just do a once-off check and add all of the respective CFLAGS/LIBS where needed. As a nice side effect this helps us solve a couple of FIXMEs. DRI3 is not a thing w/o X11 so disable it in such cases. Cc: [email protected] Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
* gallium/u_threaded: add a fast path for unbinding shader buffersMarek Olšák2017-05-181-3/+9
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium/u_threaded: add a fast path for unbinding shader imagesMarek Olšák2017-05-181-4/+10
| | | | | Reviewed-by: Samuel Pitoiset <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* tgsi: store the sampler view type directly in the instructionSamuel Pitoiset2017-05-183-6/+18
| | | | | | | | | | | RadeonSI needs to do a special lowering for Gather4 with integer formats, but with bindless samplers we just can't access the index. Instead, store the return type in the instruction like the target. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>