Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
qtrhi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Laszlo Agocs
qtrhi
Commits
f1fb7bc9
Commit
f1fb7bc9
authored
Dec 05, 2018
by
Laszlo Agocs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify the resolve and copy api a bit
parent
7689f46a
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
3 additions
and
24 deletions
+3
-24
examples/rhi/msaarenderbuffer/msaarenderbuffer.cpp
examples/rhi/msaarenderbuffer/msaarenderbuffer.cpp
+1
-1
src/rhi/qrhi.cpp
src/rhi/qrhi.cpp
+0
-15
src/rhi/qrhi.h
src/rhi/qrhi.h
+1
-4
src/rhi/qrhigles2.cpp
src/rhi/qrhigles2.cpp
+0
-2
src/rhi/qrhivulkan.cpp
src/rhi/qrhivulkan.cpp
+1
-1
todo.txt
todo.txt
+0
-1
No files found.
examples/rhi/msaarenderbuffer/msaarenderbuffer.cpp
View file @
f1fb7bc9
...
...
@@ -238,7 +238,7 @@ void Window::customRender()
// add the resolve (msaa renderbuffer -> non-msaa texture)
u
=
m_r
->
nextResourceUpdateBatch
();
u
->
resolve
RenderBuffer
(
d
.
tex
,
d
.
rb
);
u
->
resolve
Texture
(
d
.
tex
,
{
d
.
rb
}
);
cb
->
endPass
(
u
);
// onscreen (quad)
...
...
src/rhi/qrhi.cpp
View file @
f1fb7bc9
...
...
@@ -459,26 +459,11 @@ void QRhiResourceUpdateBatch::copyTexture(QRhiTexture *dst, QRhiTexture *src, co
d
->
textureCopies
.
append
({
dst
,
src
,
desc
});
}
void
QRhiResourceUpdateBatch
::
copyTexture
(
QRhiTexture
*
dst
,
QRhiTexture
*
src
)
{
d
->
textureCopies
.
append
({
dst
,
src
,
QRhiTextureCopyDescription
()
});
}
void
QRhiResourceUpdateBatch
::
resolveTexture
(
QRhiTexture
*
dst
,
const
QRhiTextureResolveDescription
&
desc
)
{
d
->
textureResolves
.
append
({
dst
,
desc
});
}
void
QRhiResourceUpdateBatch
::
resolveTexture
(
QRhiTexture
*
dst
,
QRhiTexture
*
src
)
{
d
->
textureResolves
.
append
({
dst
,
src
});
}
void
QRhiResourceUpdateBatch
::
resolveRenderBuffer
(
QRhiTexture
*
dst
,
QRhiRenderBuffer
*
src
)
{
d
->
textureResolves
.
append
({
dst
,
src
});
}
void
QRhiResourceUpdateBatch
::
readBackTexture
(
const
QRhiReadbackDescription
&
rb
,
QRhiReadbackResult
*
result
)
{
d
->
textureReadbacks
.
append
({
rb
,
result
});
...
...
src/rhi/qrhi.h
View file @
f1fb7bc9
...
...
@@ -1023,11 +1023,8 @@ public:
void
uploadStaticBuffer
(
QRhiBuffer
*
buf
,
const
void
*
data
);
void
uploadTexture
(
QRhiTexture
*
tex
,
const
QRhiTextureUploadDescription
&
desc
);
void
uploadTexture
(
QRhiTexture
*
tex
,
const
QImage
&
image
);
// shortcut
void
copyTexture
(
QRhiTexture
*
dst
,
QRhiTexture
*
src
,
const
QRhiTextureCopyDescription
&
desc
);
void
copyTexture
(
QRhiTexture
*
dst
,
QRhiTexture
*
src
);
// shortcut
void
copyTexture
(
QRhiTexture
*
dst
,
QRhiTexture
*
src
,
const
QRhiTextureCopyDescription
&
desc
=
QRhiTextureCopyDescription
());
void
resolveTexture
(
QRhiTexture
*
dst
,
const
QRhiTextureResolveDescription
&
desc
);
void
resolveTexture
(
QRhiTexture
*
dst
,
QRhiTexture
*
src
);
// shortcut
void
resolveRenderBuffer
(
QRhiTexture
*
dst
,
QRhiRenderBuffer
*
src
);
// shortcut
void
readBackTexture
(
const
QRhiReadbackDescription
&
rb
,
QRhiReadbackResult
*
result
);
// This is not normally needed, textures that have an upload or are used
...
...
src/rhi/qrhigles2.cpp
View file @
f1fb7bc9
...
...
@@ -1107,7 +1107,6 @@ void QRhiGles2::executeCommandBuffer(QRhiCommandBuffer *cb)
break
;
case
QGles2CommandBuffer
::
Command
::
CopyTex
:
{
// ugh...
GLuint
fbo
;
f
->
glGenFramebuffers
(
1
,
&
fbo
);
f
->
glBindFramebuffer
(
GL_FRAMEBUFFER
,
fbo
);
...
...
@@ -1131,7 +1130,6 @@ void QRhiGles2::executeCommandBuffer(QRhiCommandBuffer *cb)
if
(
texD
)
{
result
->
pixelSize
=
texD
->
m_pixelSize
;
result
->
format
=
texD
->
m_format
;
// this is going to be suboptimal but will do for now
f
->
glGenFramebuffers
(
1
,
&
fbo
);
f
->
glBindFramebuffer
(
GL_FRAMEBUFFER
,
fbo
);
const
GLenum
targetBase
=
texD
->
m_flags
.
testFlag
(
QRhiTexture
::
CubeMap
)
?
GL_TEXTURE_CUBE_MAP_POSITIVE_X
:
texD
->
target
;
...
...
src/rhi/qrhivulkan.cpp
View file @
f1fb7bc9
...
...
@@ -2228,7 +2228,7 @@ void QRhiVulkan::enqueueResourceUpdates(QRhiCommandBuffer *cb, QRhiResourceUpdat
VkBufferImageCopy
copyDesc
;
memset
(
&
copyDesc
,
0
,
sizeof
(
copyDesc
));
copyDesc
.
bufferOffset
=
0
;
copyDesc
.
imageSubresource
.
aspectMask
=
VK_IMAGE_ASPECT_COLOR_BIT
;
// ### no depth for now
copyDesc
.
imageSubresource
.
aspectMask
=
VK_IMAGE_ASPECT_COLOR_BIT
;
copyDesc
.
imageSubresource
.
mipLevel
=
aRb
.
desc
.
level
;
copyDesc
.
imageSubresource
.
baseArrayLayer
=
aRb
.
desc
.
layer
;
copyDesc
.
imageSubresource
.
layerCount
=
1
;
...
...
todo.txt
View file @
f1fb7bc9
...
...
@@ -14,7 +14,6 @@ mtl: color renderbuffer
gl: tex formats (texture, readback)
gl: srgb
gl: readback and resolve could be made more optimal by taking a rt as source
test cubemap
test cubemap face as target
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment