Skip to content

Commit

Permalink
Bug 1501134 - Don't consider snorm compatible with unorm for CopyTexI…
Browse files Browse the repository at this point in the history
…mage. r=kvark

Differential Revision: https://phabricator.services.mozilla.com/D9464

--HG--
extra : moz-landing-system : lando
  • Loading branch information
kdashg committed Oct 24, 2018
1 parent 9978e85 commit 7ec52f3
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions dom/canvas/WebGLTextureUpload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1867,21 +1867,7 @@ ValidateCopyDestUsage(WebGLContext* webgl,

const auto dstFormat = dstUsage->format;

const auto fnNarrowType = [&](webgl::ComponentType type) {
switch (type) {
case webgl::ComponentType::NormInt:
case webgl::ComponentType::NormUInt:
// These both count as "fixed-point".
return webgl::ComponentType::NormInt;

default:
return type;
}
};

const auto srcType = fnNarrowType(srcFormat->componentType);
const auto dstType = fnNarrowType(dstFormat->componentType);
if (dstType != srcType) {
if (dstFormat->componentType != srcFormat->componentType) {
webgl->ErrorInvalidOperation("For sized internalFormats, source and dest"
" component types must match. (source: %s, dest:"
" %s)",
Expand Down

0 comments on commit 7ec52f3

Please sign in to comment.