summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/rhi/qrhi
Commit message (Collapse)AuthorAgeFilesLines
* RHI: Remove old native texture APIPaul Olav Tvete2020-01-061-50/+0
| | | | | | Task-number: QTBUG-78570 Change-Id: I8c4850828ac03319ac923a26c2e985883956c286 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* RHI: new native texture APIPaul Olav Tvete2019-12-051-0/+67
| | | | | | | | | | | | The new version takes/returns a value that can be unpacked and passed to other functions without knowing which backend is in use. The old API will be removed in a later change when dependent modules have been updated Task-number: QTBUG-78570 Change-Id: I18d928ceef3cb617c0c509ecccb345551a7990af Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* rhi: Allow testing QRhiRenderPassDescriptors for compatibilityLaszlo Agocs2019-11-271-0/+317
| | | | | | | | | | | | | | | | | | | | For Metal and Vulkan this needs actual work because that's where the concept of renderpass descriptors is relevant. GL and D3D can just return true always. The big benefit of this is that Qt Quick can now compare renderpass descriptors via isCompatible() for its pipeline cache (similarly to how it is already using isLayoutCompatible() for srbs), and so renderpass descriptors for layers (Item.layer, ShaderEffect) will typically be compatible and so can pick up pipelines created by other layers from the cache. Also add autotests for shader resource binding and renderpass descriptor compatibility. Task-number: QTBUG-80318 Change-Id: I0008bc51c4ee13b0113d2c8caf799e1257f18a18 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Enable QRhi Metal backend on iOSLaszlo Agocs2019-11-271-1/+1
| | | | | | | | | | While we are at it, remove the Border and MirrorOnce wrap modes that have not been supported on OpenGL, because they are unsupported with Metal+iOS as well. Task-number: QTBUG-78580 Change-Id: I0db94b9d3a6125b3bb5d7b1db5d02a42cd94d2c2 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Avoid EGL_BAD_MATCH in tst_qrhi autotestLaszlo Agocs2019-10-311-0/+3
| | | | | | | | | | Call adjustedFormat() as advised by the docs: "Applications are advised to set this format on their QWindow in order to avoid potential BAD_MATCH failures." Task-number: QTBUG-79659 Change-Id: Ibf415fb0ee64bdd3f01d4ba744244bce811c0d27 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Autotest for rendering a triangle into a windowLaszlo Agocs2019-10-091-0/+159
| | | | | Change-Id: Id1562ff8cf7c6bc7e5bd147bb628f3d9dd57f2b5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Autotest rendering with uniform bufferLaszlo Agocs2019-10-099-0/+246
| | | | | Change-Id: I4251f31494680c78e90a08a2b471cb1af08ecd81 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Autotest rendering a textured quadLaszlo Agocs2019-10-099-0/+188
| | | | | | Task-number: QTBUG-78971 Change-Id: I0e7e0f3c00f9509031f7b4a8a389e51c915f01c2 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Enable the qrhi autotest on WinRTLaszlo Agocs2019-10-093-0/+44
| | | | | | | | | | | | There is no onscreen support for WinRT in the D3D11 backend yet. However, offscreen operations (rendering into a texture) should work. One catch is that there is no D3DCompile available for deployed WinRT apps. So ship the intermediate format (DXBC output from fxc) in the .qsb files. Change-Id: Ic0aba4b817c27d13dcf3af41bf7612d799382655 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* rhi: Autotest rendering a triangleLaszlo Agocs2019-10-097-30/+239
| | | | | | | | | Also improve (docs and runtime checks) and test the minimum set of required data to create a graphics pipeline. Task-number: QTBUG-78971 Change-Id: If5c14f1ab1ff3cf70f168fde585f05fc9d28ec91 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: gl: Add a feature flag for reading back non-zero mip levelsLaszlo Agocs2019-10-091-5/+12
| | | | | | | | | The joys of "level - Specifies the mipmap level of the texture image to be attached, which must be 0." for glFramebufferTexture2D in OpenGL ES 2.0. Change-Id: Iaf19502f48d7ba73b26abb72535bfa6696a1e182 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Autotest basic texture operationsLaszlo Agocs2019-10-091-13/+395
| | | | | | | | | | | | ...and make the Null backend able to deal with these, for RGBA8 textures at least. Naturally it is all QImage and QPainter under the hood. Also fix a bug in the OpenGL backend, as discovered by the autotest: the size from the readback did not reflect the mip level. Task-number: QTBUG-78971 Change-Id: Ie424b268bf5feb09021099b67068f4418a9b583e Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Add support for buffer readbacksLaszlo Agocs2019-10-091-1/+108
| | | | | | | | | | | | | | | | | | | | | | | | | This also marks the beginnings of significantly extending autotesting of the resource and rendering functionality in QRhi. Also involves fixing up the buffer operation lists like we did for textures before. This is to ensure updates and reads on the same batch execute in the correct order. So just have two lists: one with buffer, one with texture operations. Also simplify the struct layouts. No need for those inner structs with many duplicate members. This reduces the size even, since using a union was never an option here. Also switch to a VLA, the size is around 253 KB per batch. The Null backend now keeps track of the QRhiBuffer data so it can return valid results in readbacks. Task-number: QTBUG-78984 Task-number: QTBUG-78986 Task-number: QTBUG-78971 Task-number: QTBUG-78883 Change-Id: I9694bd7fec523a4e71cf8a5c77c828123ebbb3bd Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Exercise nativeHandles() in qrhi testLaszlo Agocs2019-10-091-2/+244
| | | | | | | Task-number: QTBUG-78971 Task-number: QTBUG-78972 Change-Id: Ibce10caf1ccd74ae7efead9579f4a4342ef896b8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Introduce the Qt graphics abstraction as private QtGui helpersLaszlo Agocs2019-06-135-0/+289
Comes with backends for Vulkan, Metal, Direct3D 11.1, and OpenGL (ES). All APIs are private for now. Shader conditioning (i.e. generating a QRhiShader in memory or on disk from some shader source code) is done via the tools and APIs provided by qt-labs/qtshadertools. The OpenGL support follows the cross-platform tradition of requiring ES 2.0 only, while optionally using some (ES) 3.x features. It can operate in core profile contexts as well. Task-number: QTBUG-70287 Change-Id: I246f2e36d562e404012c05db2aa72487108aa7cc Reviewed-by: Lars Knoll <lars.knoll@qt.io>