summaryrefslogtreecommitdiffstats
path: root/src/gui/rhi
Commit message (Collapse)AuthorAgeFilesLines
* Be explicit about QDataStream serialization: explicit casts to intThiago Macieira2019-11-141-3/+3
| | | | | | | The reader uses int variables, so use the same in the writer. Change-Id: I1496b069cc534f1a838dfffd15c94c7cacd3dd93 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* rhi: Use Q_GLOBAL_STATIC for QRhiGles2 GL program cacheTor Arne Vestbø2019-10-241-3/+3
| | | | | | | | Defers initialization until actually needed. Change-Id: Idb09dbad0dfa602949d381ee61565d9050e77e7c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* rhi: metal: Fix and clean up committing resource bindingsLaszlo Agocs2019-10-241-45/+51
| | | | | | | | | | | | | | Make it readable by using names instead of mere indices for the stages. There is an important fix in there as well: when in a render pass, only resource for VERTEX and FRAGMENT are taken into account, while in a compute pass those are skipped. This ensures that we do not send messages to a nil or invalid MTLRender/ComputeCommandEncoder. (nil would not be an error but the other is fatal) Task-number: QTBUG-79447 Change-Id: Ibef108cb7c82b5b0fdd2a299cd89fbebe8c3606a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: metal: Remap resource bindings based on the QShader tableLaszlo Agocs2019-10-242-31/+73
| | | | | | | | | | ...when available. Fall back to the QRhi (i.e. SPIR-V) binding point otherwise (which becomes unsafe once shadertools bumps its SPIRV-Cross snapshot, but is fine for existing .qsb files) Task-number: QTBUG-79368 Change-Id: I2d452fdd4efb484867732c358171a800d3261dcd Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Store a native resource binding map in QShaderLaszlo Agocs2019-10-243-18/+135
| | | | | | | | | The deserializer remains compatible with .qsb files without this additional section. Task-number: QTBUG-79368 Change-Id: I03e2a634febbd88da7f6a4369f104855ea31e3af Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: Enhance swapchain size query docsLaszlo Agocs2019-10-211-2/+24
| | | | | | | | | | | Inspired by a recent Qt Quick fix. Make sure we make it clear that QRhi-based rendering code should base output size calculations (e.g. for setViewport() and similar) on the pixel size reported from QRhiSwapChain, instead of going to the QWindow. Change-Id: I2fc22972162ccc6307ac07ceb7766c746d5f562a Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: gl: Do not let external rendering trash our vaoLaszlo Agocs2019-10-152-7/+22
| | | | | | Task-number: QTBUG-79221 Change-Id: Ie8e6376f79c816071c12962dc054838aeaabcaa5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Autotest for rendering a triangle into a windowLaszlo Agocs2019-10-091-1/+1
| | | | | Change-Id: Id1562ff8cf7c6bc7e5bd147bb628f3d9dd57f2b5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Autotest rendering a textured quadLaszlo Agocs2019-10-091-0/+2
| | | | | | Task-number: QTBUG-78971 Change-Id: I0e7e0f3c00f9509031f7b4a8a389e51c915f01c2 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Fix non-base level copy and readback wrt source sizeLaszlo Agocs2019-10-094-17/+19
| | | | | | | | | | | | When the source size is not explicitly specified, we take the entire subresource. However, just using the texture's size is wrong: when the source level in a copy or readback is not 0, the size for the corresponding mip level has to be used instead. This fixes occasional crashes with Metal in the autotest. Change-Id: I99f689feef93ec86dffdc9e82d6bfdaf5c1eb041 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Autotest rendering a triangleLaszlo Agocs2019-10-098-4/+61
| | | | | | | | | 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-097-11/+41
| | | | | | | | | 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: gl: Switch GetBufferSubData emulation to MapBufferRangeLaszlo Agocs2019-10-093-13/+19
| | | | | | | | | | | | | Use only APIs that are in GLES 3.0. glMapBuffer() is an old OES extension, stop bothering with that. Not the least because ANGLE claims supporting it and then fails the map. (not that we care much about ANGLE, but, for instance, the qrhi autotest is run with ANGLE configurations as well in the CI, so have to still take care of it for the duration of Qt 5.x) Change-Id: I29140402cedffe0430f920ee0c061673257c3aa1 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Autotest basic texture operationsLaszlo Agocs2019-10-093-12/+114
| | | | | | | | | | | | ...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>
* Make QRhi::create() return false when there is no MTLDeviceLaszlo Agocs2019-10-091-0/+5
| | | | | | | | | | | | | | The interesting part here is that sending messages to a null object is valid in Objective-C, so without an explicit check it is not necessarily straightforward to discover that we do not have working rendering. (because the application won't just simply crash) Do the right thing now and return false like other backends do. Task-number: QTBUG-78994 Change-Id: I0d3c4a49a3fc78f9149f8af4fe67d581e74daae7 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Add support for buffer readbacksLaszlo Agocs2019-10-0912-440/+752
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Convert a few sizeof(array)/sizeof(element0) fors to range forsAlbert Astals Cid2019-10-041-8/+8
| | | | | | | | Increases readability Change-Id: I81ea915517fd2cd6bc2780f37ba8d8097c63f44b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add TriangleFan pipeline topologyPaul Olav Tvete2019-10-036-2/+20
| | | | | | | | | | | | Triangle fan drawing is only supported on some platforms. The feature flag QRhi::TriangleFanTopology is set accordingly. In general, TriangleStrip topology will be more efficient on most GPUs. However, if polygon data is already stored as triangle fans, the CPU savings may be more significant. Change-Id: I9704fad751d2119eac8791074f58942dd9315601 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* rhi: vulkan: Disable vkmemalloc's own synchronizationLaszlo Agocs2019-10-031-0/+3
| | | | | | | | No need for those mutexes. Task-number: QTBUG-78908 Change-Id: I60c32df1f8729098f1894eff7c71e7fbcbd23ecf Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: Remove QVectors from the data description structs as wellLaszlo Agocs2019-10-039-200/+254
| | | | | | | | | | | | | | | As usual, keep some QVector overloads around to allow Qt Quick to compile. Color attachments and vertex input bindings get an at(index) type of accessor, unlike any other of similar lists. This is because there the index is significant, and sequential iteration is not the only type of operation that is performed. Sometimes a lookup based on an index will be needed as well. Task-number: QTBUG-78883 Change-Id: I3882941f09e94ee2f179e0e9b8161551f0d5dae7 Reviewed-by: Christian Strømme <christian.stromme@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: Speed up buffer and texture trackingLaszlo Agocs2019-09-304-32/+30
| | | | | | Task-number: QTBUG-78862 Change-Id: If278bd55530081cbbdbab8dd6e14d86e28da558e Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Remove QVector in the API of QRhiResource subclassesLaszlo Agocs2019-09-308-27/+58
| | | | | | | | | | | | | | | | | | | | | | | | | Forcing users to go through a QVector, when in practice they almost always want to source the data from an initializer list, a QVarLengthArray, or a plain C array, is not ideal. Especially since we can reason about the maximum number of elements in the vast majority of use cases for all the affected lists. QRhiResource is also not copyable so we do not need the usual machinery offered by containers. So switch to a QVarLengthArray. Note that a resource is not a container. The only operations we are interested in is to be able to source data either via an initializer list or by iterating on something, and to be able to extract the data, in case a user wishes to set up another resource based on the existing one. In some cases a QVector overload is kept for source compatibility with other modules (Qt Quick). These may be removed in the future. Also do a similar QVector->QVarLengthArray change in the srb-related data in the backends. Change-Id: I6f5b2ebd8e75416ce0cca0817bb529446a4cb664 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* De-d-pointer QRhiShaderResourceBindingLaszlo Agocs2019-09-307-190/+118
| | | | | | | | | | | | | | | | | Sad to see this go since the d pointer pattern with implicit sharing would have been perfect for this class, had this been a public API. However, as binary compatibility will not be a concern for QRhi classes, it is wasteful to allocate memory on every QRhiShaderResourceBinding. This allows users, such as Qt Quick, to use QRhiShaderResourceBinding as a cheap, simple, value class, without having to invent their own alternatives in performance critical places. The change brings a not insignficant improvement in certain qmlbench scenes (the ones with thousands of unbatched geometry nodes). Change-Id: I6d1dced6498d9ad625f90ead78bc0a417ea99ed8 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Share and enable shader disk cache in QRhi OpenGL backendLaszlo Agocs2019-09-302-15/+123
| | | | | | | | | | | | | | | The expectation for it is to function identically to what we get with QOpenGLShaderProgram. (same environment variables, same logging categories, etc.). QOpenGLProgramBinaryCache is now shared between the QOpenGL convenience classes (like QOpenGLShaderProgram) and QRhi. To achieve more modularity and to prepare for QOpenGLShaderProgram and friends moving out of QtGui, this class cannot depend on QOpenGLShader* anymore. This involves adding some minor conversions between QRhi and QOpenGL enums for example. Change-Id: I2f4664e074823ea536281aea8006a6db159a7381 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Ensure drawable size atomicity within a frameLaszlo Agocs2019-09-295-75/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert surfacePixelSize() to be a getter only. With Metal this will mean returning the "live" layer size (and so not the layer.drawableSize), which is in line with what we expect with other backends. Instead, we leave it to the swapchain's buildOrResize() to "commit" the size by setting drawableSize on the layer. With typical application or Qt Quick logic this ensures that layer.drawableSize is set once and stays static until we get to process the next resize - on the rendering thread. This of course would still mean that there was a race when a client queries surfacePixelSize() to set the depth-stencil buffer size that is associated with a swapchain. (because that must happen before calling buildOrResize() according to the current semantics) That can however be solved in a quite elegant way, it turns out, because we already have a flag that indicates if a QRhiRenderBuffer is used in combination with (and only in combination with) a swapchain. If we simply say that setting the UsedWithSwapChainOnly flag provides automatic sizing as well (so no setPixelSize() call is needed), clients can simply get rid of the problematic surfacePixelSize() query and everything works. Task-number: QTBUG-78641 Change-Id: Ib1bfc9ef8531bcce033d1f1e5d4d5b4984d6d69f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* rhi: gl: Remove fake uniform buffer offset alignment requirementLaszlo Agocs2019-09-281-1/+3
| | | | | Change-Id: I5408e53f90c1c19836c400659bac15a8690c6ae8 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* rhi: d3d11: Make tdr header privateLaszlo Agocs2019-09-282-2/+18
| | | | | | | Forgot the _p suffix. Change-Id: I48225418fd40d45020b016b59578fcc1944d15c0 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: gl: Fix not resetting color write bits when switching pipelineLaszlo Agocs2019-09-261-0/+1
| | | | | | | | | | This was visible in the triquadcube test when enabling transparent window background: the cube on the left was rendered incorrectly because alpha was not written out due to not setting glColorMask() back to the defaults when switching to another pipeline. Change-Id: I7a8c94072e0b68a58fffcc8c1a200e3940dcad44 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: metal: Eliminate redundant setCullMode and setFrontFaceWinding callsLaszlo Agocs2019-09-262-2/+18
| | | | | | Task-number: QTBUG-78605 Change-Id: Icc3a9636055b5f45418da28cc05aa02e19370c02 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: Unify handling of special cases for scissor and viewport rectsLaszlo Agocs2019-09-263-21/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | With OpenGL a scissor (or viewport) rectangle is not allowed to have a negative width or height. Everything else is allowed. This is also the semantic we wish to keep for QRhiViewport and QRhiScissor. This raises some problems. For instance, when we do bottom-left - top-left rectangle conversion, the case of partially out of bounds rects needs to be taken into account. Otherwise, Qt Quick ends up in wrong scissoring in certain cases, typically when the QQuickWindow size is decreased so the content does not fit because that will then start generating negative x, y scissors for clipping (which is perfectly valid but the QRhi backends need to be able to deal with it) Then there is the problem of having to clamp width and height carefully, because some validation layers for some APIs will reject a viewport or scissor with partially out of bounds rectangles. To verify all this, add a new manual test, based on the cubemap one. (cubemap was chosen because that is an ideal test scene as it fills the viewport completely, and so it is visually straightforward when a scissor rectangle is moving around over it) Fixes: QTBUG-78702 Change-Id: I60614836432ea9934fc0dbd0ac7e88931f476542 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* Follow platform plugin change wrt layer sizeLaszlo Agocs2019-09-231-1/+4
| | | | | | | | | | | | | Have to set the drawableSize ourselves. This is not yet fully correct in the sense that does not ensure what the platform plugin patch tries to enable, namely atomic frames when it comes to the drawable size. Going to fix that up in separate patches, maybe it will need some QRhi API changes as well so won't mix that in here. Change-Id: I47a3816930bc6a87a2c96d4a6c4c85b2577147dc Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Another load() -> loadRelaxed()Laszlo Agocs2019-09-181-1/+1
| | | | | | Change-Id: Iab74325da3bd0a22c1f69856b038d0b5615e4e63 Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* rhi: gl: Pick up context lossLaszlo Agocs2019-09-1313-31/+76
| | | | | | | | ...and change the return value of makeThreadLocalNativeContextCurrent() to a bool since we expect this to mirror QOpenGLContext::makeCurrent(). Change-Id: I339507152e461fe28fcf7fe777165e6d0072f055 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: metal: Configure the layer's opaque property as appropriateLaszlo Agocs2019-09-121-0/+12
| | | | | | Task-number: QTBUG-78089 Change-Id: I6cd95e24d38562cf1931c107bb6b719e340583a8 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: Add a flag to indicate preferring a software adapterLaszlo Agocs2019-09-124-4/+60
| | | | | | | ...if there is one and the concept is applicable in the first place. Change-Id: Iab202c1c1cdd229f4910159de4cae7ce30805ea9 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: vulkan: Report device lostLaszlo Agocs2019-09-122-30/+38
| | | | | | | | | | | | Typically caught in vkQueueSubmit(). The WaitIdles that can be hit upon cleanup must be guarded by !deviceLost because they inexplicably cause an infinite blocking wait when the device was already reported as lost. (with NVIDIA at least) Change-Id: I7142e2461e1aed9ee3068b2b963cdf2c678ca4e0 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: Better handling of device lossLaszlo Agocs2019-09-1213-3/+90
| | | | | | | Starting with D3D11. The other backends will follow later. Change-Id: I4f165c9f1743df0fb00bdce1e898917575bf5f6e Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: Clarify the swapchain alpha flag docsLaszlo Agocs2019-09-121-2/+10
| | | | | Change-Id: Iff0edf0ae40b830af0209403d899def922e6088c Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: gl: Avoid crash when reading back the swapchain backbufferLaszlo Agocs2019-09-121-1/+2
| | | | | Change-Id: I9a632c06d8b9e666d99d0f135d3396d2de03f92a Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: d3d11: Fix enabling alpha compositingLaszlo Agocs2019-09-121-5/+16
| | | | | | Task-number: QTBUG-78089 Change-Id: I4e33665947debe007abcb976641e515224fa8451 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: Make the clang code model happy as much as we canLaszlo Agocs2019-09-127-464/+470
| | | | | | | | | | | | | | | | When interfacing with reality (i.e. native platform APIs provided in C, ObjC, or COM), each of the APIs has its own idea of what types it likes to use for sizes, points, rects, etc. Out of the hundreds of warnings Qt Creator throws at us with the default clang check level when opening one of the rhi backends not a single one is useful. Regardless, let's try getting rid of what we can. This mostly involves throwing in int/uint conversions in order to get the signedness change warnings to shut up. The things that are either unacceptable to change or are beyond our control are left untouched. Change-Id: I6e4cb7cd373bf48dc990eaf83344242bbf30bd66 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: d3d11: Add the device lost testing machineryLaszlo Agocs2019-09-125-1/+290
| | | | | | | | | | | | | | | | | | | The device can be lost when physically removing the graphics adapter, disabling the driver (Device Manager), upgrading/uninstalling the graphics driver, and when it is reset due to an error. Some of these can (and should) be tested manually, but the last one has a convenient, programmatic way of triggering: by triggering the timeout detection and recovery (TDR) of WDDM. A compute shader with an infinite loop should trigger this after 2 seconds by default. All tests in tests/manual/rhi can now be started with a --curse <count> argument where <count> specifies the number of frames to render before breaking the device. Qt Quick will get an environment variable with similar semantics in a separate patch. Change-Id: I4b6f8d977a15b5b89d686b3973965df6435810ae Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* rhi: gl, metal, d3d: Reuse shader objects when source is the sameLaszlo Agocs2019-09-0913-141/+315
| | | | | | | | | | | | | | | | | | Now that Qt Quick's batch renderer misses one level of shader source caching due to the nature of pipeline state objects, it can be useful to keep and reuse shader objects when the hash of the source code matches. The goal here is to allow Qt Quick to be on par with what the direct OpenGL path has when it comes to caching shader sources and compilation results. The program binary disk cache is not in scope in this patch. Also adds QRhi::releaseCachedResources(), similarly to what the scenegraph has. This can be called to clear caches such as the shader object cache we keep here. Change-Id: Ie3d81d823f61fa65ec814439e882c498f7774d43 Reviewed-by: Christian Strømme <christian.stromme@qt.io>
* qrhid3d11: Remove unused variable blockDimMårten Nordheim2019-09-071-1/+0
| | | | | | | Clang emits a warning Change-Id: Ie2bf77248df2b2ecf23e24429688563f9725dd0d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* rhi: metal: Avoid upsetting validation in viewport and scissorLaszlo Agocs2019-09-061-2/+35
| | | | | | | | | | | | | | | | | When running with the threaded render loop of Qt Quick, it could be that the drawable changes size while the render thread prepares the command buffer with setViewport and setScissor. Those have no chance to see such changes, which is normally not a big problem because the resize will get processed eventually. However, in debug builds running in XCode, Metal validation checks the viewport and scissor rects against the (more or less) actual drawable size, and so would abort Qt Quick apps from time to time when resizing the window interactively. To solve this, we just query the drawable size in setViewport/setScissor to keep validation happy. Change-Id: I451f398bd1f88e3f49ea4624fc45bbb4b70e7f07 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Fix some qdoc warnings in 5.14Friedemann Kleint2019-09-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mark QCalendarBackend as internal since it is in a private header and fix some issues in the QCalendar related classes. src/corelib/time/qcalendar.cpp:201: (qdoc) warning: clang found diagnostics parsing \fn int QCalendarBackend::daysInMonth(int month, int year) const error: incomplete type 'QCalendarBackend' named in nested name specifier (repeats) src/corelib/time/qdatetime.cpp:1426: (qdoc) warning: Unknown command '\override' (repeats) src/corelib/time/qcalendar.cpp:642: (qdoc) warning: Undocumented enum item 'Last' in QCalendar::System src/corelib/time/qcalendar.cpp:642: (qdoc) warning: Undocumented enum item 'User' in QCalendar::System src/corelib/time/qcalendar.cpp:744: (qdoc) warning: Undocumented parameter 'year' in QCalendar::isLeapYear() src/corelib/time/qcalendar.cpp:923: (qdoc) warning: Can't link to 'dateTimeString()' (repeats) src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'year' in QCalendar::partsFromDate() src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'month' in QCalendar::partsFromDate() src/corelib/time/qcalendar.cpp:893: (qdoc) warning: No such parameter 'day' in QCalendar::partsFromDate() src/corelib/time/qdatetime.cpp:1425: (qdoc) warning: Undocumented parameter 'nmonths' in QDate::addMonths() src/corelib/time/qdatetime.cpp:1467: (qdoc) warning: Undocumented parameter 'nyears' in QDate::addYears() src/corelib/statemachine/qstatemachine.cpp:2522: (qdoc) warning: Undocumented enum item 'StateMachineChildModeSetToParallelError' in QStateMachine::Error src/corelib/kernel/qtimer.cpp:602: (qdoc) warning: Undocumented parameter 'connectionType' in QTimer::callOnTimeout() src/corelib/time/qcalendar.cpp:159: (qdoc) warning: Undocumented parameter 'name' in QCalendarBackend::QCalendarBackend() src/corelib/time/qcalendar.cpp:159: (qdoc) warning: Undocumented parameter 'id' in QCalendarBackend::QCalendarBackend() src/corelib/time/qcalendar.cpp:529: (qdoc) warning: Can't link to 'registerCalendar()' src/corelib/time/qcalendar.cpp:529: (qdoc) warning: Can't link to 'fromName()' src/corelib/time/qcalendar.cpp:178: (qdoc) warning: Can't link to 'QCalendar::fromEnum()' src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Undocumented parameter 'jd' in QCalendarBackend::dayOfWeek() src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Can't link to 'weekDayName()' src/corelib/time/qcalendar.cpp:405: (qdoc) warning: Can't link to 'standaloneWeekDayName()' src/corelib/time/qcalendar.cpp:268: (qdoc) warning: Can't link to 'daysInMonth()' src/corelib/time/qcalendar.cpp:268: (qdoc) warning: Can't link to 'isLeapYear()' src/corelib/time/qcalendar.cpp:295: (qdoc) warning: Can't link to 'daysInMonth()' src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isLuniSolar()' src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isSolar()' src/corelib/time/qcalendar.cpp:313: (qdoc) warning: Can't link to 'isLunar()' src/corelib/time/qcalendar.cpp:340: (qdoc) warning: Can't link to 'daysInMonth()' src/corelib/time/qcalendar.cpp:357: (qdoc) warning: Can't link to 'daysInMonth()' src/corelib/time/qcalendar.cpp:544: (qdoc) warning: Can't link to 'fromName()' Change-Id: Ia2fabefb917f8e4cfa361044d9b754717276f4aa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* rhi: vulkan: Introduce secondary command buffer usageLaszlo Agocs2019-08-2913-172/+484
| | | | | | | | | | | As an option. Must opt in via setting ExternalContentsInPass in the flags for beginFrame(). It is somewhat unfortunate to require declaring this up front, but forcing using secondary command buffers always, even though beginExternal() may not be used in many applications, would be an overkill. Change-Id: I8d52bcab40c96f89f140c4c7877b6c459925e3c7 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: vulkan: Add missing VK_QUERY_RESULT_WAIT_BITLaszlo Agocs2019-08-291-1/+2
| | | | | | | Mainly to get the validation layer from newer Vulkan SDKs to shut up. Change-Id: I3a00d2e7b5617eb1656625b1b2a919bb3c07feb9 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: Attempt to fix up the logic around beginExternal()Laszlo Agocs2019-08-296-67/+102
| | | | | | | | | | | | | | | | | | | | | | | | | Mainly for Vulkan where it lacked the recording of the still queued commands. Uncovered by Qt Quick examples that integrate custom Vulkan rendering. This still has an issue that needs to be tackled separately. (we probably will switch to using a dedicated secondary command buffer with RENDER_PASS_CONTINUE_BIT for the external commands, and then just have a vkCmdExecuteCommands in our own queue instead of recording everything in beginExternal). The possibility of losing glMemoryBarrier() calls due to begin/endExternal() with the OpenGL backend is fixed too. The logic here mirrors Vulkan to some extent except that we do not have a concept of (and so the trouble with) renderpass instances. Clean up around the implementations of finish() as well. Attempting to share code via a "flushCommandBuffer" function is admirable but is not worth it since some semantics are different. (finish() cannot be called within a begin/endPass, unlike begin/endExternal). Change-Id: I5137db598d6a40d484e53678f5c919abf750d9ed Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* rhi: vulkan: Expose the VkRenderPass via the usual mechanismsLaszlo Agocs2019-08-295-0/+38
| | | | | | | | | Qt Quick in turn will expose it via QSGRendererInterface. Essential when adding custom Vulkan rendering into a Qt Quick application because the custom pipeline state objects will need to reference a VkRenderPass. Change-Id: Idf4092cfc3937830fb8123164081059b0d8d030e Reviewed-by: Andy Nichols <andy.nichols@qt.io>