Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Laszlo Agocs
qtrhi
Commits
fe83f8b2
Commit
fe83f8b2
authored
Jan 09, 2019
by
Laszlo Agocs
Browse files
mtl: Report readback buffers to prof
parent
f3518b10
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/rhi/qrhimetal.mm
View file @
fe83f8b2
...
...
@@ -1081,6 +1081,10 @@ void QRhiMetal::enqueueResourceUpdates(QRhiCommandBuffer *cb, QRhiResourceUpdate
textureFormatInfo
(
aRb
.
format
,
aRb
.
pixelSize
,
&
bpl
,
&
aRb
.
bufSize
);
aRb
.
buf
=
[
d
->
dev
newBufferWithLength
:
aRb
.
bufSize
options
:
MTLResourceStorageModeShared
];
QRHI_PROF_F
(
newReadbackBuffer
(
quint64
(
quintptr
(
aRb
.
buf
)),
texD
?
static_cast
<
QRhiResource
*>
(
texD
)
:
static_cast
<
QRhiResource
*>
(
swapChainD
),
aRb
.
bufSize
));
ensureBlit
();
[
blitEnc
copyFromTexture
:
src
sourceSlice:
aRb
.
desc
.
layer
...
...
@@ -1253,6 +1257,7 @@ void QRhiMetal::executeDeferredReleases(bool forced)
void
QRhiMetal
::
finishActiveReadbacks
(
bool
forced
)
{
QVarLengthArray
<
std
::
function
<
void
()
>
,
4
>
completedCallbacks
;
QRhiProfilerPrivate
*
rhiP
=
profilerPrivateOrNull
();
for
(
int
i
=
d
->
activeReadbacks
.
count
()
-
1
;
i
>=
0
;
--
i
)
{
const
QRhiMetalData
::
ActiveReadback
&
aRb
(
d
->
activeReadbacks
[
i
]);
...
...
@@ -1264,6 +1269,8 @@ void QRhiMetal::finishActiveReadbacks(bool forced)
memcpy
(
aRb
.
result
->
data
.
data
(),
p
,
aRb
.
bufSize
);
[
aRb
.
buf
release
];
QRHI_PROF_F
(
releaseReadbackBuffer
(
quint64
(
quintptr
(
aRb
.
buf
))));
if
(
aRb
.
result
->
completed
)
completedCallbacks
.
append
(
aRb
.
result
->
completed
);
...
...
todo.txt
View file @
fe83f8b2
mtl: report readback temp buf
multiwindow_threaded should demo pulling out the device and importing to another rhi
mtl: reduce set*
advanced blend modes
...
...
@@ -17,6 +16,7 @@ anisotropic
gl: more ubuf types
more QImage->tex formats
if tex adjust its size (e.g. npot on gl), should QImage get scaled automatically?
pool staging/readback buffers?
d3d, gl, mtl: cache shader sources?
gl: ubuf structs, arrays
test cubemap face as target
...
...
@@ -47,6 +47,7 @@ dxc for d3d as an alternative to fxc?
hlsl -> dxc -> spirv -> spirv-cross hmmm...
+++ done
mtl: report readback temp buf
vk: support instanceStepRate via VK_EXT_vertex_attribute_divisor
resize to 0 width or height fails (vk, d3d)
vk: rendering hangs sometimes when minimize and back on some systems?
...
...
Write
Preview
Supports
Markdown
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