summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
Commit message (Collapse)AuthorAgeFilesLines
* st/dri: invalidate_resource depth/stencil before flush_resourceJonathan Marek2019-01-291-7/+7
| | | | | | | | | | | | This allows freedreno to be aware of the depth invalidate when flushing batches on flush_resource. AFAIK, the only other driver which might care about this change is vc4, where I think it should help by allowing the depth invalidate to work with GALLIUM_HUD. Signed-off-by: Jonathan Marek <[email protected]> Reviewed-by: Eric Anholt <[email protected]>
* st/nine: Enable debug info if NDEBUG is not setAxel Davy2019-01-2611-26/+26
| | | | | | | | | | We want to have debug info as well if using meson's debugoptimized when ndebug is off. v2: use u_debug functions that do something even if DEBUG is not set. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Immediately upload user provided texturesAxel Davy2019-01-261-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | Fixes regression caused by 42d672fa6a766363e5703f119607f7c7975918aa st/nine: Bind src not dst in nine_context_box_upload Before that patch, for user provided textures, when the texture was destroyed, the safety check for pending uploads, which according to the code "Following condition cannot happen currently", was flushing the queue and thus triggering the upload. After the patch, the texture destruction was delayed after the upload. However the user frees the texture buffer, as it thinks the texture released. Instead of reverting the faulty patch, this patch instead flushes the csmt queue right away after queuing the upload for this type of textures. This is more future-proof, as we may want to bind the surface for other reasons in the future. Signed-off-by: Axel Davy <[email protected]> Cc: 18.3 <[email protected]>
* meson/vdpau: add missing soversionEric Engestrom2019-01-251-1/+8
| | | | | | | | | | | | | | | This mirrors what autotools does in src/gallium/state_trackers/vdpau/Makefile.am and src/gallium/targets/vdpau/Makefile.am: VDPAU_MAJOR = 1 VDPAU_MINOR = 0 libvdpau_gallium_la_LDFLAGS = -version-number $(VDPAU_MAJOR):$(VDPAU_MINOR) Reported-by: Igor Gnatenko <[email protected]> Fixes: 68076b87474e7959c161 "meson: build gallium vdpau state tracker" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* gallium: use put image shm2 path (v2)Dave Airlie2019-01-251-5/+12
| | | | | | | | | | | This fixes the drisw paths to use the new shm2 interface, so that we don't trigger the X server overflow checks when the x offset is non-zero. This just hides the versioning in drisw, and either passes the src_x or adds the offset fixup for the fallback path. Cc: <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
* st/dri: fix dri2_format_table for argb1555 and rgb565Marek Olšák2019-01-141-1/+1
| | | | | | | | | The bug caused that rgb565 framebuffers used argb1555. Fixes: 433ca3127a3b94bfe9a513e7c7ce594e09e1359f Reviewed-by: Kristian H. Kristensen <[email protected]> Reviewed-by: Rob Clark <[email protected]>
* st/va: Return correct status from vlVaQuerySurfaceStatusIndrajit Das2019-01-091-0/+31
| | | | | | | | | This ensures that during encoding, applications can get the correct status of the surface before submitting more operations on the same. Reviewed-by: Leo Liu <[email protected]> Signed-off-by: Indrajit Das <[email protected]>
* clover/meson: Ignore 'svn' suffix when computing CLANG_RESOURCE_DIRPierre Moreau2019-01-081-1/+1
| | | | | | | | | | | | | | | The version exported by LLVM in its CMake configuration files can include the “svn” suffix when building a development version (for example “8.0.0svn”). However the exported clang headers are still found under “lib/clang/8.0.0/”, without the “svn” suffix. Meson takes care of removing the “svn” suffix from the version when using the dependency’s `version()` method. This processing is already performed in “configure.ac” when using autotools. Signed-off-by: Pierre Moreau <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* meson: Override C++ standard to gnu++11 when building with altivec on ppc64Dylan Baker2018-12-281-0/+3
| | | | | | | | | | Otherwise there will be symbol collisions for the vector name. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=108943 Distro Bug: https://bugs.gentoo.org/673622 Fixes: 42ea0631f108d82554339530d6c88aa1b448af1e ("meson: build clover") Acked-by: Matt Turner <[email protected]>
* st/nine: Increase the limit of cached ff shadersAxel Davy2018-12-231-2/+2
| | | | | | | | 100 is too small for some games, which triggers recompilations every frame. Increase to 1024. Signed-off-by: Axel Davy <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* st/nine: Add src reference to nine_context_range_uploadAxel Davy2018-12-233-1/+8
| | | | | | | | | | Just like nine_context_box_upload, nine_context_range_upload should reference the src, which holds the ram source buffer. Fixes: https://github.com/iXit/Mesa-3D/issues/327 Signed-off-by: Axel Davy <[email protected]> Tested-by: Dieter Nützel <[email protected]> Cc: [email protected]
* st/nine: Bind src not dst in nine_context_box_uploadAxel Davy2018-12-234-6/+6
| | | | | | | | | | | | nine_context_box_upload uploads a ram buffer (from src) to a pipe_resource (dst). We already have a refcount on the pipe_resource, what needs to be protected from release is the ram buffer, thus a reference to src. Signed-off-by: Axel Davy <[email protected]> Tested-by: Dieter Nützel <[email protected]> Cc: [email protected]
* st/nine: Fix volumetexture dtor on ctor failureAxel Davy2018-12-231-1/+2
| | | | | | | | | | The dtor is called on allocation failure, thus we must check the volumes are allocated before trying to release them. Signed-off-by: Axel Davy <[email protected]> Tested-by: Dieter Nützel <[email protected]> Cc: [email protected]
* st/nine: Switch to presentation buffer if resize is detectedAxel Davy2018-12-231-1/+36
| | | | | | | | | This enables to match the window size on resize on all cases, as it only works currently with presentation buffers. Signed-off-by: Axel Davy <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* st/nine: Use helper to release swapchain buffers laterAxel Davy2018-12-232-8/+42
| | | | | | | | | | | This patch introduces a structure to release the present_handles only when they are fully released by the server, thus making "DestroyD3DWindowBuffer" actually release the buffer right away when called. Signed-off-by: Axel Davy <[email protected]> Tested-by: Dieter Nützel <[email protected]>
* st/dri: replace format conversion functions with single mapping tableLucas Stach2018-12-182-352/+149
| | | | | | | | | | | | | | | | Each time I have to touch the buffer import/export functions in the dri state tracker I get lost in the maze of functions converting between DRI_IMAGE_FOURCC, DRI_IMAGE_FORMAT, DRI_IMAGE_COMPONENTS and pipe format. Rip it out and replace by a single table, which defines the correspondence between the different representations. Also this now stores all the known representations in the __DRIimageRec, to avoid the loss of information we currently have when importing a buffer with a fourcc, which doesn't have a corresponding dri format. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* st/dri: allow both render and sampler compatible dma-buf formatsLucas Stach2018-12-181-12/+18
| | | | | | | | | | | | | | Currently all the EGL APIs are missing a way to specify how an imported dma-buf is intended to be used. Demanding the format to be both usable for sampling and rendering artificially restricts the list of formats a driver is able to import. Looking at how the Intel driver implements those DRI2 image APIs it doesn't distinguish between render or sampler compatible formats. So this patch aligns behavior between Intel and Gallium based drivers. Signed-off-by: Lucas Stach <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* clover: Fix build after clang r348827Jan Vesely2018-12-161-1/+6
| | | | | | | | | | CodeGenOptions were moved to Basic. Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Aaron Watry <[email protected]> Tested-by: Aaron Watry <[email protected]> Reviewed-by: Kai Wasserbäch <[email protected]> CC: [email protected]
* drisw: Use separate drisw_loader_funcs for shmMichal Srb2018-12-051-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | The original code was modifying the global drisw_lf variable, which is bad when there are multiple contexts in single process, each initialized with different loader. One may support put_image_shm and the other not. Since there are currently only two possible combinations, lets create two global tables, one for each. Lets make them const, since we won't change them and they can be shared. This fixes crash in VLC. It used two GL contexts (each in different thread), one was initialized by its Qt GUI, the other by its video output plugin. The first one set the put_image_shm=drisw_put_image_shm, the second did not, but since the same structure was used, the drisw_put_image_shm was used too. Then it crashed because the second loader did not have putImageShm set. Downstream bug: https://bugzilla.opensuse.org/show_bug.cgi?id=1113533 v2: Added Fixes and described the VLC bug. Fixes: 63c427fa71a ("drisw: use putImageShm if available") Signed-off-by: Michal Srb <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* st/xvmc: Add X11 include path.Vinson Lee2018-11-301-0/+1
| | | | | | | | | | | | | This patch fixes this build error. CC tests/xvmc_bench.o In file included from tests/xvmc_bench.c:35: tests/testlib.h:38:10: fatal error: 'X11/Xlib.h' file not found ^~~~~~~~~~~~ Signed-off-by: Vinson Lee <[email protected]> Cc: [email protected] Reviewed-by: Emil Velikov <[email protected]>
* st/xa: Fix a memory leakThomas Hellstrom2018-11-291-0/+1
| | | | | | | | | Free the context after destruction. Cc: [email protected] Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* st/nine: Allow 'triple buffering' with thread_submitAxel Davy2018-11-212-17/+50
| | | | | | | | The path allowing triple buffering behaviour wasn't implemented yet for thread_submit Signed-off-by: Axel Davy <[email protected]> Tested-by: Andre Heider <[email protected]>
* st/xa: Bump minorThomas Hellstrom2018-11-141-1/+1
| | | | | | | | Bump minor to signal support for new formats and higher precision solid pictures. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/xa: Support Component Alpha with trivial blendingThomas Hellstrom2018-11-143-17/+35
| | | | | | | | | Support Component Alpha for those composite operations that do not require per-channel alpha blending. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
* st/xa: Minor renderer cleanupsThomas Hellstrom2018-11-141-12/+12
| | | | | | | | | constify function arguments to clean up the code a bit. Reported-by: Brian Paul <[email protected]> Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
* st/xa: Fix transformations when we have both source and mask samplersThomas Hellstrom2018-11-141-68/+49
| | | | | | | | | In the case when we had both source and mask samplers, transformations were typically not applied correctly. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
* st/xa: Support a couple of new formatsThomas Hellstrom2018-11-142-9/+29
| | | | | Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/xa: Support higher color precision for solid picturesThomas Hellstrom2018-11-142-26/+100
| | | | | | | | The only solid fill picture type we supported only had 8 bit color channels. Add a new solid picture type that supports float channels. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/xa: Render update. Better support for solid picturesThomas Hellstrom2018-11-145-440/+225
| | | | | | | | | | | | Remove unused and obsolete code for gradients and component-alpha Support solid source- and mask pictures using a variable number of samplers in the composite pipeline rather than the fixed number we used before. Tested using rendercheck for XA. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* st/nine: clean up thead shutdown sequence a bitAndre Heider2018-11-091-4/+2
| | | | | | | Just break out of the loop instead, it does the same thing. Signed-off-by: Andre Heider <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: plug thread related leaksAndre Heider2018-11-092-0/+9
| | | | | Signed-off-by: Andre Heider <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: fix stack corruption due to ABI mismatchAndre Heider2018-11-091-1/+13
| | | | | | | | | | | | | | This fixes various crashes and hangs when using nine's 'thread_submit' feature. On 64bit, the thread function's data argument would just be NULL. On 32bit, the data argument would be garbage depending on the compiler flags (in my case -march>=core2). Fixes: f3fa7e3068512d ("st/nine: Use WINE thread for threadpool") Cc: [email protected] Signed-off-by: Andre Heider <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/va: fix incorrect use of resource_destroyMarek Olšák2018-11-051-4/+2
| | | | | | | Fixes: 4373dd32154 ("st/va: Support YUV formats in vaCreateSurfaces") Cc: Drew Davenport <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
* gallium/util: move memory debug declarations into u_debug_galliumDylan Baker2018-10-301-0/+1
| | | | | Tested-by: Brian Paul <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
* gallium: rework PIPE_HANDLE_USAGE_* flagsMarek Olšák2018-10-308-23/+18
| | | | Only radeonsi uses them, so adjust them to match its needs.
* st/dri: remove leftover local variableEric Engestrom2018-10-301-1/+0
| | | | | | | | Left over from the cleanup in 6ccc435e7ad92bb0ba77d "pipe-loader: move dup(fd) within pipe_loader_drm_probe_fd" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
* clover: add missing meson build dependencyEric Engestrom2018-10-291-1/+1
| | | | | | Fixes: 42ea0631f108d82554339 "meson: build clover" Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Dylan Baker <[email protected]>
* st/nine: Handle window resize when a presentation buffer is usedAxel Davy2018-10-261-1/+30
| | | | | | | | | | | | | | | | | | Usually when a window is resized, the app calls d3d to resize the back buffer to the window size. In some cases, it is not done, and it expects the output resizes to the window size, even if the back buffer size is unchanged. This patch introduces the behaviour when a presentation buffer is used. ID3DPresent_GetWindowInfo is a function available with D3DPresent v1.0, and thus we don't need to check if the function is available. The function had been introduced to implement this very feature. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Reduce MaxSimultaneousTextures to 8Axel Davy2018-10-262-9/+8
| | | | | | | | | | | | Windows drivers don't set this flag (which affects ff) to more than 8. Do the same in case some games check for 8. v2: Remove any dependence on MaxSimultaneousTextures. For non-ff the number of textures is 16 when the device is able of vs/ps3. Add this requirement of 16 textures to the driver requirements. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Enable shadow mapping for ps 1.XAxel Davy2018-10-263-10/+14
| | | | | | | | | | We didn't implement shadow textures for ps 1.X, assuming the case couldn't happen... Well it does. Fixes: https://github.com/iXit/Mesa-3D/issues/261 Signed-off-by: Axel Davy <[email protected]>
* st/nine: Do not set unused states for stateblocksAxel Davy2018-10-261-21/+3
| | | | | | | | A lot of these states are used only for the context, and are unused for stateblocks (which just uses the changed.* fields instead for a lot of them). Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix aliasing states for stateblocksAxel Davy2018-10-261-2/+1
| | | | | | | | | | | | | | | | | | | | | If NINE_STATE_FF_MATERIAL is set, the stateblock will upload its recorded materials matrix. If NINE_STATE_FF_LIGHTING is set, the lighting set is uploaded. These flags could be set by a NineDevice9_SetTransform call or by setting some states related to ff, but that shouldn't trigger these stateblock behaviours. We don't need to follow the context states dirtied by render states. NINE_STATE_FF_VSTRANSF is exactly the state controlling stateblock updates of transformation matrices, NINE_STATE_FF is too broad. These two changes avoid setting the two mentionned states when we shouldn't. Fixes: https://github.com/iXit/Mesa-3D/issues/320 Signed-off-by: Axel Davy <[email protected]>
* st/nine: Never update device changed.* fieldsAxel Davy2018-10-264-48/+59
| | | | | | | | | The device state changed.* field are never used. These fields are used only for stateblocks. Avoid setting them at all for clarity. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Capture also default matrices for D3DSBT_ALLAxel Davy2018-10-263-24/+41
| | | | | | | | | | We avoid allocating space for never unused matrices. However we must do as if we had captured them. Thus when a D3DSBT_ALL stateblock apply has fewer matrices than device state, allocate the default matrices for the stateblock before applying. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Mark transform matrices dirty for D3DSBT_ALLAxel Davy2018-10-261-1/+12
| | | | | | | | D3DSBT_ALL stateblocks capture the transform matrices. Fixes some d3d test programs not displaying properly. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Don't update unused world matricesAxel Davy2018-10-261-0/+6
| | | | | | | | | | | | | | While to the application we have to track accurately all 256 world matrices (including in stateblocks), hw vertex processing enables to set a limit to the number of world matrices the hardware can access to in the advertised caps, which is 8 for nine. Thus don't bother in the stateblock code to send the updated values for the unreachable matrices. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Remove two unused states.Axel Davy2018-10-262-3/+1
| | | | | | | NINE_STATE_MATERIAL was used incorrectly at one location. Replace it with the correct state. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Remove commented nine_context_apply_stateblockAxel Davy2018-10-261-230/+0
| | | | | | | | | | | | At some point the project was to adapt the commented version to csmt. The csmt rework enabled to fix some state aliasing issues between stateblocks and internal state updates. The commented version needs a lot of work to work with that. Just drop it. Signed-off-by: Axel Davy <[email protected]>
* st/va: get mjpeg slice headerBoyuan Zhang2018-10-233-2/+164
| | | | | | | | Move the previous get_mjpeg_slice_heaeder function and eoi from "radeon/vcn" to "st/va". Signed-off-by: Boyuan Zhang <[email protected]> Reviewed-by: Leo Liu <[email protected]>
* android: Build kms_swrast for the Android platformRob Herring2018-10-221-0/+1
| | | | | | Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Emil Velikov <[email protected]>