mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 1878930 - r/RawBuffer/Span/: TexImage: Don't copy desc. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D202026
This commit is contained in:
parent
cc11a296b3
commit
56c7f1eafc
@ -929,23 +929,7 @@ void WebGLTexture::TexStorage(TexTarget target, uint32_t levels,
|
||||
void WebGLTexture::TexImage(uint32_t level, GLenum respecFormat,
|
||||
const uvec3& offset, const webgl::PackingInfo& pi,
|
||||
const webgl::TexUnpackBlobDesc& src) {
|
||||
Maybe<RawBuffer<>> cpuDataView;
|
||||
if (src.cpuData) {
|
||||
cpuDataView = Some(RawBuffer<>{src.cpuData->Data()});
|
||||
}
|
||||
const auto srcViewDesc = webgl::TexUnpackBlobDesc{src.imageTarget,
|
||||
src.size,
|
||||
src.srcAlphaType,
|
||||
std::move(cpuDataView),
|
||||
src.pboOffset,
|
||||
src.structuredSrcSize,
|
||||
src.image,
|
||||
src.sd,
|
||||
src.dataSurf,
|
||||
src.unpacking,
|
||||
src.applyUnpackTransforms};
|
||||
|
||||
const auto blob = webgl::TexUnpackBlob::Create(srcViewDesc);
|
||||
const auto blob = webgl::TexUnpackBlob::Create(src);
|
||||
if (!blob) {
|
||||
MOZ_ASSERT(false);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user