aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine
Commit message (Collapse)AuthorAgeFilesLines
* gallium: remove PIPE_BIND_TRANSFER_READ/WRITEMarek Olšák2016-09-088-19/+6
| | | | | | | | not used in any useful way Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
* Introduce .editorconfigEric Engestrom2016-08-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | A few weeks ago, Jose Fonseca suggested [0] we use .editorconfig files to try and enforce the formatting of the code, to which Michel Dänzer suggested [1] we start by importing the existing .dir-locals.el settings. The first draft was discussed in the RFC [2]. These .editorconfig are a first step, one that has the advantage of requiring little to no intervention from the devs once the settings files are in place, but the settings are very limited. This does have the advantage of applying while the code is being written. This doesn't replace the need for more comprehensive formatting tools such as clang-format & clang-tidy, but those reformat the code after the fact. [0] https://lists.freedesktop.org/archives/mesa-dev/2016-June/121545.html [1] https://lists.freedesktop.org/archives/mesa-dev/2016-June/121639.html [2] https://lists.freedesktop.org/archives/mesa-dev/2016-July/123431.html Acked-by: Nicolai Hähnle <[email protected]> Acked-by: Eric Anholt <[email protected]> Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Jose Fonseca <[email protected]>
* st/nine: fix unreachable() typoEric Engestrom2016-08-301-1/+1
| | | | | Signed-off-by: Eric Engestrom <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
* gallium: add a pipe_context parameter to resource_get_handleMarek Olšák2016-08-251-1/+2
| | | | | | | | radeonsi needs to do some operations (DCC decompression) for OpenGL-OpenCL interop and this is the only way to make it coherent with the current context. It can optionally be set to NULL. Reviewed-by: Brian Paul <[email protected]>
* st/nine: Fix invalid attempt to use indirect draws.Trevor Davenport2016-08-101-0/+1
| | | | | | | | Since commit 6d7177f01b231e9fe79a558c28d2b562a218d7ea, radeonsi would take a different path if info->indirect_params was not initialized properly. Nine was not initializating this field. Signed-off-by: Marek Olšák <[email protected]>
* gallium: add a pipe_context parameter to fence_finishMarek Olšák2016-08-101-3/+3
| | | | | | | | required by glClientWaitSync (GL 4.5 Core spec) that can optionally flush the context Reviewed-by: Rob Clark <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: add render_condition_enable param to clear_render_target/depth_stencilMarek Olšák2016-08-102-4/+4
| | | | | Reviewed-by: Roland Scheidegger <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]>
* gallium: split transfer_inline_write into buffer and texture callbacksMarek Olšák2016-07-234-14/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | to reduce the call indirections with u_resource_vtbl. The worst call tree you could get was: - u_transfer_inline_write_vtbl - u_default_transfer_inline_write - u_transfer_map_vtbl - driver_transfer_map - u_transfer_unmap_vtbl - driver_transfer_unmap That's 6 indirect calls. Some drivers only had 5. The goal is to have 1 indirect call for drivers that care. The resource type can be determined statically at most call sites. The new interface is: pipe_context::buffer_subdata(ctx, resource, usage, offset, size, data) pipe_context::texture_subdata(ctx, resource, level, usage, box, data, stride, layer_stride) v2: fix whitespace, correct ilo's behavior Reviewed-by: Nicolai Hähnle <[email protected]> Acked-by: Roland Scheidegger <[email protected]>
* st/nine: Use offset_units_unscaledAxel Davy2016-06-255-11/+13
| | | | | | | | | | | | offset_units_unscaled enables proper support for depth bias for gallium nine. Use it if available. Solves issues with some games using depth bias. For example: https://github.com/iXit/Mesa-3D/issues/220 Signed-off-by: Axel Davy <[email protected]>
* Remove wrongly repeated words in commentsGiuseppe Bilotta2016-06-231-1/+1
| | | | | | | | | | | | | | | | | Clean up misrepetitions ('if if', 'the the' etc) found throughout the comments. This has been done manually, after grepping case-insensitively for duplicate if, is, the, then, do, for, an, plus a few other typos corrected in fly-by v2: * proper commit message and non-joke title; * replace two 'as is' followed by 'is' to 'as-is'. v3: * 'a integer' => 'an integer' and similar (originally spotted by Jason Ekstrand, I fixed a few other similar ones while at it) Signed-off-by: Giuseppe Bilotta <[email protected]> Reviewed-by: Chad Versace <[email protected]>
* st/nine: Minor change to support musl libcWang He2016-05-182-8/+9
| | | | | | | | | | | A few changes to support musl libc as well. In particular fpu_control.h is glibc specific. fenv.h doesn't enable to do exactly what we want either, so instead use assembly directly. Signed-off-by: Wang He <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Enable D3DPMISCCAPS_PERSTAGECONSTANTPatrick Rudolph2016-05-181-1/+1
| | | | | | | | | | Nine already supports the feature. There are no failing WINE tests for per stage constants. Enabling D3DPMISCCAPS_PERSTAGECONSTANT as it fixes https://github.com/iXit/Mesa-3D/issues/205 Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Fix usage of rasterizer multisample bit.Axel Davy2016-05-184-10/+32
| | | | | | | | | | | pipe_rasterizer multisample bit should be enabled only when really wanting to do multisampling, thus we should disable when not having msaa render target. This fixes some depth calculation precision issues on radeon. Also disable it when depth and stencil tests are disabled, since in that case multisampling is same as not multisampled. Signed-off-by: Axel Davy <[email protected]>
* st/nine: ATOC has effect only with ALPHATESTENABLEAxel Davy2016-05-183-2/+13
| | | | | | | ATOC extension does something only when alpha test is enabled. Use a second bit to encode the difference with ATIATOC. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add debug string for ATOCAxel Davy2016-05-181-0/+1
| | | | | | We were missing a debug string for this format. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add asserts for output/input packingAxel Davy2016-05-181-0/+2
| | | | | | | | | | Nine doesn't support vs output/ps input packing. We haven't found any application requiring that, and implementing it properly is complex. Add asserts for now. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Use correct PIPE_HANDLE_USAGE flag for frontbuffer copyAxel Davy2016-05-181-5/+8
| | | | | | | When taking screenshots we do a copy from the frontbuffer to an allocated buffer (which we then copy to a ram buffer). Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix output shift calculationAxel Davy2016-05-181-2/+2
| | | | | | We were getting it wrong for negative values. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix CheckDeviceFormat advertising for surfacesAxel Davy2016-05-181-0/+12
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Improve buffer placementAxel Davy2016-05-181-4/+30
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix buffer bind flagsAxel Davy2016-05-181-3/+3
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix buffer locking flags handlingAxel Davy2016-05-182-29/+22
| | | | | | | | | Our behaviour was not entirely similar to what the docs and our tests describe. Drop d3dlock_buffer_to_pipe_transfer_usage. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Improve loggingPatrick Rudolph2016-05-186-0/+12
| | | | | | | Add missing DBG calls in dtors. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Use WINE thread for threadpoolPatrick Rudolph2016-05-184-12/+52
| | | | | | | | | Use present interface 1.2 function ID3DPresent_CreateThread to create the thread for threadpool. Creating the thread with WINE prevents some rarely occuring crashes. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Don't present if window is occludedPatrick Rudolph2016-05-181-5/+6
| | | | | | | | | | | | | The problem is that if one d3d present call fails, because of our occlusion check in present method, the next presentation call will send the same pixmap to the Xserver again, without waiting it is released, which is wrong. Move the present call after occlusion check to return and prevent Xpixmaps errors. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Use new function to query for resolution mismatchPatrick Rudolph2016-05-183-1/+18
| | | | | | | | | Any third party app might change the current screen resolution. Poll for resolution mismatch to force a device reset. Required for non ex devices only. Signed-off-by: Patrick Rudolph <[email protected]> Reviewed-by: Axel Davy <[email protected]>
* st/nine: Implement BumpEnvMap for ffAxel Davy2016-05-181-24/+54
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Format conversion for volumes in UpdateTextureAxel Davy2016-05-181-8/+0
| | | | | | | We were doing the conversion for surfaces, but not yet volumes. Now that volumes can do conversion, use it. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Remove one useless function outputAxel Davy2016-05-182-4/+4
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add support for X8L8V8U8Axel Davy2016-05-182-3/+13
| | | | | | | | | | | | | | X8L8V8U8 support should be common. Some more recent cards do support this format, but not L6V5U5. Add fallback for this format to have it alwaus supported. L6V5U5 conversion rule apparently differs a bit from the normal spec, and thus the gallium equivalent format leads to slightly wrong colors. Since some recent cards do not support it, do not support it either. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add format fallback with conversion to volumesAxel Davy2016-05-182-9/+110
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add format fallback with conversion to surfacesAxel Davy2016-05-182-1/+72
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix Pointsize in programmable shaderAxel Davy2016-05-188-68/+48
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix ff pointscale computationAxel Davy2016-05-181-9/+18
| | | | Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix header of GetIndicesAxel Davy2016-05-181-2/+1
| | | | | | | There is a mistake in the online documentation, the function only has 2 arguments. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Increase minor d3dadapter9drm ABIAxel Davy2016-05-182-1/+4
| | | | | | | | | | | Version 0.1 allows to assume that the second element of the IDirect3D* structures will be a pointer to the internal nine vtable. This is useful if the gallium nine user wants to wrap some interfaces. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix leak after ctor failuresAxel Davy2016-05-181-0/+2
| | | | | | | Previously ctor failures would not unreference the device. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Add ColorFill test for compressed texturesAxel Davy2016-05-181-0/+8
| | | | | | | ColorFill should contain alignment checks for compressed textures. Signed-off-by: Axel Davy <[email protected]>
* st/nine: PositionT and Tessfactor are forbidden as PS inputAxel Davy2016-05-181-3/+5
| | | | | | | According to wine tests, they are forbidden as PS input, which makes sense. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix some shader failures not triggering errorAxel Davy2016-05-181-2/+5
| | | | | | | Some failures during shader translation would not raise errors before this patch. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Forbid POSITION0 for PS3.0Axel Davy2016-05-181-0/+5
| | | | | | POSITION0 input is forbidden for PS3.0 apparently. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Rework UpdateTexture ChecksAxel Davy2016-05-182-35/+68
| | | | | | | | | | | Our code did match the user documentation of the function quite well (except for format check). However the DDI documentation and wine tests show that documentation was not correct. Thus adapt our code to fit the best possible to the -real- spec. Signed-off-by: Axel Davy <[email protected]>
* st/nine: Use bufs instead of Flags for ClearAxel Davy2016-05-181-2/+2
| | | | | | | | bufs doesn't contain depthstencil if there is z buffer mismatch. This is the behaviour we want. Signed-off-by: Axel Davy <[email protected]>
* Treewide: Remove Elements() macroJan Vesely2016-05-176-48/+48
| | | | | Signed-off-by: Jan Vesely <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* gallium: remove helpers converting to/from TGSI_PROCESSOR_*Marek Olšák2016-04-221-12/+1
| | | | Acked-by: Jose Fonseca <[email protected]>
* gallium: use PIPE_SHADER_* everywhere, remove TGSI_PROCESSOR_*Marek Olšák2016-04-222-11/+11
| | | | Acked-by: Jose Fonseca <[email protected]>
* gallium: merge PIPE_SWIZZLE_* and UTIL_FORMAT_SWIZZLE_*Marek Olšák2016-04-222-22/+22
| | | | | | | | Use PIPE_SWIZZLE_* everywhere. Use X/Y/Z/W/0/1 instead of RED, GREEN, BLUE, ALPHA, ZERO, ONE. The new enum is called pipe_swizzle. Acked-by: Jose Fonseca <[email protected]>
* gallium: add external usage flags to resource_from(get)_handle (v2)Marek Olšák2016-03-091-1/+3
| | | | | | | | | This will allow drivers to make better decisions about texture sharing for DRI2, DRI3, Wayland, and OpenCL. v2: add read/write flags, take advantage of __DRI_IMAGE_USE_BACKBUFFER Reviewed-by: Axel Davy <[email protected]>
* st/nine: Fix second Multithreading issue with MANAGED buffersAxel Davy2016-02-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | Here is another threading issue with MANAGED buffers: Thread 1: buffer creation Thread 1: buffer lock Thread 2: Draw call Thread 1: writes data Thread 1: Unlock Without this patch, the buffer is initially dirty and in the list of things to upload after its creation. The draw call will then upload the data and unset the dirty flag, and the Unlock won't trigger a second upload. Fixes regression introduced by cc0114f30b587a10766ec212afb3ad356099ef23: "st/nine: Implement Managed vertex/index buffers" Cc: "11.2" <[email protected]> Signed-off-by: Axel Davy <[email protected]>
* st/nine: Fix Multithreading issue with MANAGED buffersAxel Davy2016-02-291-2/+6
| | | | | | | | | | | | | | | | | | | | d3d calls are protected by mutexes, however if app is doing in two threads: Thread 1: buffer Lock Thread 2: Draw call Thread 1: writes data Thread 1: Unlock Then before this patch, the Draw call would begin to upload the buffer. Solves this by moving the moment we add the buffer to the queue of things to upload (We move it from Lock time to Unlock time). Cc: "11.2" <[email protected]> Signed-off-by: Axel Davy <[email protected]>