Commit ca5a6949 authored by Laszlo Agocs's avatar Laszlo Agocs

Switch to a ChangeFrequently flag for textures

...instead of ChangeInfrequently. This way the common case
(not changing the image data afterwards) is the default.
parent 17287c46
......@@ -370,7 +370,7 @@ class Q_RHI_EXPORT QRhiTexture : public QRhiResource
public:
enum Flag {
RenderTarget = 1 << 0,
ChangesInfrequently = 1 << 1, // hint for backend not to keep staging resources around
ChangesFrequently = 1 << 1, // hint for backend to keep staging resources around
CubeMap = 1 << 2,
MipMapped = 1 << 3
};
......
......@@ -1681,7 +1681,7 @@ void QRhiVulkan::commitResourceUpdates(QRhiCommandBuffer *cb, QRhiResourceUpdate
copyInfos.count(), copyInfos.constData());
utexD->lastActiveFrameSlot = currentFrameSlot;
utexD->stagingFrameSlot = currentFrameSlot;
if (utexD->m_flags.testFlag(QRhiTexture::ChangesInfrequently))
if (!utexD->m_flags.testFlag(QRhiTexture::ChangesFrequently))
pendingStagingReleaseTextures.insert(utexD);
imageBarrier(cb, u.tex,
......
......@@ -8,18 +8,19 @@ d3d: msaa (onscreen)
mtl: msaa (onscreen)
test cubemap
test cubemap face as target
mipmap gen (?)
cbuffer alignment rule chaos - figure out what to recommend to users
compressed textures
copyimage (color and ds, no resolve or transforms here)
msaa offscreen (msaa texture? renderbuffer?)
resolveimage (color and ds, only to resolve samples)
threading options? secondary command lists?
mipmap generation?
figure sg out for minimizing viewport/scissor cmds
d3d device loss
more what-if-resource-rebuilt cases
tex/QImage formats
anisotropic
compressed textures
adopt texture, buffer, ...
copyimage (color and ds, no resolve or transforms here)
msaa offscreen (msaa texture? renderbuffer?)
resolveimage (color and ds, only to resolve samples)
d3d: support DxcCompiler (in addition to d3dcompiler?) when runtime compiling hlsl?
test FrameOpDeviceLost somehow
gl: more ubuf types
......@@ -29,7 +30,7 @@ d3d, gl, mtl: cache shader sources?
advanced blend modes?
resize to 0 width or height fails (vk)
gl: ubuf structs, arrays
gl: target QOpenGLWindow ...
gl: target QOpenGLWindow/Widget?
vk: subpasses?
compute?
tessellation?
......@@ -42,6 +43,7 @@ bytecode (fxc/dxc) for d3d?
bytecode for metal?
+++ done
texture ChangesInfrequently -> ChangesFrequently
mtl: depth-stencil
mtl: buffer logic is borked
mtl: fix Dynamic for non-uniform buffers
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment