qt5base-lts/tests/manual/rhi
Laszlo Agocs 7de0f3e9cc rhi: Clean up some inconsistencies
Some of the offsets are already quint32 in the API (vertex input
attributes, dynamic offsets, offsets in draw calls), matching the
reality of the underlying 3D APIs, but many buffer-related functions
use int as of now, simply because that used to be the default choice,
and the same goes for sizes (such as buffer or range sizes). This is
not quite consistent and should be cleaned up if for nothing else then
just to make the classes consistent, but also because no 3D API use a
signed type for offsets, sizes, and strides. (except OpenGL for some)

When it comes to strides (for vertex inputs and raw image texture
uploads), those are already all quint32s. This is straightforward
because most of the 3D APIs use 32-bit uints for these regardless of
the architecture.

Sizes and offsets are often architecture-dependent (Vulkan, Metal),
but there is at least one API where they are always 32-bit even on
64-bit Windows (UINT == unsigned int, D3D11). In addition, we do not
really care about buffer or texture data larger than 4 GB, at least
not without realistic use cases and real world testing, which are
quite unlikely to materialize for now (esp. since we still have the
width/height of 2D textures limited to 16 or 32K in many cases even on
desktops, whereas 2GB+ buffers are not guaranteed in practice even
when an API seemingly allows it).

In any case, the important change here is the signed->unsigned
switch. A number of casts can now be removed here and there in the
backends, because the offsets and sizes are now unsigned as well,
matching the underlying API reality. The size can be potentially
increased later on with minimal effort, if that becomes necessary for
some reason.

Change-Id: I404dbc365ac397eaeeb3bd2da9ce7eb98916da5f
Reviewed-by: Inho Lee <inho.lee@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2022-07-12 17:16:37 +02:00
..
compressedtexture_bc1 Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
compressedtexture_bc1_subupload rhi: Clean up some inconsistencies 2022-07-12 17:16:37 +02:00
computebuffer Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
computeimage Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
cubemap Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
cubemap_render Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
cubemap_scissor Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
float16texture_with_compute Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
floattexture rhi: Clean up some inconsistencies 2022-07-12 17:16:37 +02:00
geometryshader Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
hellominimalcrossgfxtriangle rhi: metal: Switch back to presentDrawable 2022-06-28 10:47:41 +02:00
instancing Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
mrt Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
msaarenderbuffer Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
msaatexture Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
multiwindow Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
multiwindow_threaded Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
noninstanced Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
offscreen Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
polygonmode Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
rhiwidget Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
shadowmap Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
shared Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
tessellation Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
tex3d Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
texturearray Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
texuploads Use SPDX license identifiers 2022-05-16 16:37:38 +02:00
triquadcube rhi: Fix a manual test 2022-07-07 16:07:18 +02:00
CMakeLists.txt Compose render-to-texture widgets through QRhi 2022-03-11 21:25:00 +01:00
rhi.pro rhi: Add support for 3D textures 2021-05-31 17:16:57 +02:00