diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-06-12 17:39:41 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-06-15 15:34:05 +0200 |
commit | 9b8d4a9e453b23f7b5b70280ee822f7f3a475261 (patch) | |
tree | b3266327294cbb0b82f58417e44e85379acf6465 /tests/manual/rhi/msaarenderbuffer/msaarenderbuffer.cpp | |
parent | ed231455cc22f6280be917780013584020d208d8 (diff) |
rhi manual tests: Prevent warnings with MSVC
The QPair changes trigger warnings about size_t vs. quint32.
We made offsets and sizes 32-bit in the QRhi API to emphasize that
some of the graphics APIs are using 32-bit sizes still. It's a bit
unfortunate that pairs now generate warnings when the size does not
match. Just cast as needed.
Change-Id: I88504eed8be6f4bdb2205b3671e2c2a9db9fcb1e
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'tests/manual/rhi/msaarenderbuffer/msaarenderbuffer.cpp')
-rw-r--r-- | tests/manual/rhi/msaarenderbuffer/msaarenderbuffer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/manual/rhi/msaarenderbuffer/msaarenderbuffer.cpp b/tests/manual/rhi/msaarenderbuffer/msaarenderbuffer.cpp index 9ce6c3ec5e..26ea484d9e 100644 --- a/tests/manual/rhi/msaarenderbuffer/msaarenderbuffer.cpp +++ b/tests/manual/rhi/msaarenderbuffer/msaarenderbuffer.cpp @@ -155,7 +155,7 @@ void Window::customInit() }); inputLayout.setAttributes({ { 0, 0, QRhiVertexInputAttribute::Float2, 0 }, - { 0, 1, QRhiVertexInputAttribute::Float3, 2 * sizeof(float) } + { 0, 1, QRhiVertexInputAttribute::Float3, quint32(2 * sizeof(float)) } }); d.triPs->setVertexInputLayout(inputLayout); d.triPs->setShaderResourceBindings(d.triSrb); @@ -186,7 +186,7 @@ void Window::customInit() }); inputLayout.setAttributes({ { 0, 0, QRhiVertexInputAttribute::Float2, 0 }, - { 0, 1, QRhiVertexInputAttribute::Float2, 2 * sizeof(float) } + { 0, 1, QRhiVertexInputAttribute::Float2, quint32(2 * sizeof(float)) } }); d.ps->setVertexInputLayout(inputLayout); d.ps->setShaderResourceBindings(d.srb); @@ -241,7 +241,7 @@ void Window::customRender() cb->setGraphicsPipeline(d.triPs); cb->setViewport({ 0, 0, float(d.rb->pixelSize().width()), float(d.rb->pixelSize().height()) }); cb->setShaderResources(); - QRhiCommandBuffer::VertexInput vbufBinding(d.vbuf, sizeof(vertexData)); + QRhiCommandBuffer::VertexInput vbufBinding(d.vbuf, quint32(sizeof(vertexData))); cb->setVertexInput(0, 1, &vbufBinding); cb->draw(3); cb->endPass(); |