Commit 1395134c by Jamie Madill Committed by Commit Bot

Remove more uses of gl::ErrorOrResult.

Only gl::LinkResult remains. Bug: angleproject:2753 Change-Id: I5e9c68c11453e8ab9db4908451957d7b3db0b110 Reviewed-on: https://chromium-review.googlesource.com/c/1254044Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarFrank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent 4d422c29
...@@ -753,15 +753,16 @@ GLuint Context::createRenderbuffer() ...@@ -753,15 +753,16 @@ GLuint Context::createRenderbuffer()
return mState.mRenderbuffers->createRenderbuffer(); return mState.mRenderbuffers->createRenderbuffer();
} }
void Context::tryGenPaths(GLsizei range, GLuint *createdOut)
{
ANGLE_CONTEXT_TRY(mState.mPaths->createPaths(mImplementation.get(), range, createdOut));
}
GLuint Context::genPaths(GLsizei range) GLuint Context::genPaths(GLsizei range)
{ {
auto resultOrError = mState.mPaths->createPaths(mImplementation.get(), range); GLuint created = 0;
if (resultOrError.isError()) tryGenPaths(range, &created);
{ return created;
handleError(resultOrError.getError());
return 0;
}
return resultOrError.getResult();
} }
// Returns an unused framebuffer name // Returns an unused framebuffer name
......
...@@ -1656,6 +1656,9 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl ...@@ -1656,6 +1656,9 @@ class Context final : public egl::LabeledObject, angle::NonCopyable, public angl
void detachSampler(GLuint sampler); void detachSampler(GLuint sampler);
void detachProgramPipeline(GLuint pipeline); void detachProgramPipeline(GLuint pipeline);
// A small helper method to facilitate using the ANGLE_CONTEXT_TRY macro.
void tryGenPaths(GLsizei range, GLuint *createdOut);
void initRendererString(); void initRendererString();
void initVersionStrings(); void initVersionStrings();
void initExtensionStrings(); void initExtensionStrings();
......
...@@ -345,8 +345,10 @@ PathManager::PathManager() ...@@ -345,8 +345,10 @@ PathManager::PathManager()
{ {
} }
ErrorOrResult<GLuint> PathManager::createPaths(rx::GLImplFactory *factory, GLsizei range) Error PathManager::createPaths(rx::GLImplFactory *factory, GLsizei range, GLuint *createdOut)
{ {
*createdOut = 0;
// Allocate client side handles. // Allocate client side handles.
const GLuint client = mHandleAllocator.allocateRange(static_cast<GLuint>(range)); const GLuint client = mHandleAllocator.allocateRange(static_cast<GLuint>(range));
if (client == HandleRangeAllocator::kInvalidHandle) if (client == HandleRangeAllocator::kInvalidHandle)
...@@ -365,7 +367,8 @@ ErrorOrResult<GLuint> PathManager::createPaths(rx::GLImplFactory *factory, GLsiz ...@@ -365,7 +367,8 @@ ErrorOrResult<GLuint> PathManager::createPaths(rx::GLImplFactory *factory, GLsiz
const auto id = client + i; const auto id = client + i;
mPaths.assign(id, new Path(impl)); mPaths.assign(id, new Path(impl));
} }
return client; *createdOut = client;
return NoError();
} }
void PathManager::deletePaths(GLuint first, GLsizei range) void PathManager::deletePaths(GLuint first, GLsizei range)
......
...@@ -243,7 +243,7 @@ class PathManager : public ResourceManagerBase<HandleRangeAllocator> ...@@ -243,7 +243,7 @@ class PathManager : public ResourceManagerBase<HandleRangeAllocator>
public: public:
PathManager(); PathManager();
ErrorOrResult<GLuint> createPaths(rx::GLImplFactory *factory, GLsizei range); Error createPaths(rx::GLImplFactory *factory, GLsizei range, GLuint *numCreated);
void deletePaths(GLuint first, GLsizei range); void deletePaths(GLuint first, GLsizei range);
Path *getPath(GLuint handle) const; Path *getPath(GLuint handle) const;
bool hasPath(GLuint handle) const; bool hasPath(GLuint handle) const;
......
...@@ -468,22 +468,23 @@ gl::Error BlitGL::blitColorBufferWithShader(const gl::Framebuffer *source, ...@@ -468,22 +468,23 @@ gl::Error BlitGL::blitColorBufferWithShader(const gl::Framebuffer *source,
return gl::NoError(); return gl::NoError();
} }
gl::ErrorOrResult<bool> BlitGL::copySubTexture(const gl::Context *context, gl::Error BlitGL::copySubTexture(const gl::Context *context,
TextureGL *source, TextureGL *source,
size_t sourceLevel, size_t sourceLevel,
GLenum sourceComponentType, GLenum sourceComponentType,
TextureGL *dest, TextureGL *dest,
gl::TextureTarget destTarget, gl::TextureTarget destTarget,
size_t destLevel, size_t destLevel,
GLenum destComponentType, GLenum destComponentType,
const gl::Extents &sourceSize, const gl::Extents &sourceSize,
const gl::Rectangle &sourceArea, const gl::Rectangle &sourceArea,
const gl::Offset &destOffset, const gl::Offset &destOffset,
bool needsLumaWorkaround, bool needsLumaWorkaround,
GLenum lumaFormat, GLenum lumaFormat,
bool unpackFlipY, bool unpackFlipY,
bool unpackPremultiplyAlpha, bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha) bool unpackUnmultiplyAlpha,
bool *copySucceededOut)
{ {
ASSERT(source->getType() == gl::TextureType::_2D); ASSERT(source->getType() == gl::TextureType::_2D);
ANGLE_TRY(initializeResources()); ANGLE_TRY(initializeResources());
...@@ -496,7 +497,8 @@ gl::ErrorOrResult<bool> BlitGL::copySubTexture(const gl::Context *context, ...@@ -496,7 +497,8 @@ gl::ErrorOrResult<bool> BlitGL::copySubTexture(const gl::Context *context,
GLenum status = mFunctions->checkFramebufferStatus(GL_FRAMEBUFFER); GLenum status = mFunctions->checkFramebufferStatus(GL_FRAMEBUFFER);
if (status != GL_FRAMEBUFFER_COMPLETE) if (status != GL_FRAMEBUFFER_COMPLETE)
{ {
return false; *copySucceededOut = false;
return gl::NoError();
} }
BlitProgramType blitProgramType = getBlitProgramType(sourceComponentType, destComponentType); BlitProgramType blitProgramType = getBlitProgramType(sourceComponentType, destComponentType);
...@@ -566,7 +568,8 @@ gl::ErrorOrResult<bool> BlitGL::copySubTexture(const gl::Context *context, ...@@ -566,7 +568,8 @@ gl::ErrorOrResult<bool> BlitGL::copySubTexture(const gl::Context *context,
mStateManager->bindVertexArray(mVAO, 0); mStateManager->bindVertexArray(mVAO, 0);
mFunctions->drawArrays(GL_TRIANGLES, 0, 3); mFunctions->drawArrays(GL_TRIANGLES, 0, 3);
return true; *copySucceededOut = true;
return gl::NoError();
} }
gl::Error BlitGL::copySubTextureCPUReadback(const gl::Context *context, gl::Error BlitGL::copySubTextureCPUReadback(const gl::Context *context,
...@@ -653,13 +656,14 @@ gl::Error BlitGL::copySubTextureCPUReadback(const gl::Context *context, ...@@ -653,13 +656,14 @@ gl::Error BlitGL::copySubTextureCPUReadback(const gl::Context *context,
return gl::NoError(); return gl::NoError();
} }
gl::ErrorOrResult<bool> BlitGL::copyTexSubImage(TextureGL *source, gl::Error BlitGL::copyTexSubImage(TextureGL *source,
size_t sourceLevel, size_t sourceLevel,
TextureGL *dest, TextureGL *dest,
gl::TextureTarget destTarget, gl::TextureTarget destTarget,
size_t destLevel, size_t destLevel,
const gl::Rectangle &sourceArea, const gl::Rectangle &sourceArea,
const gl::Offset &destOffset) const gl::Offset &destOffset,
bool *copySucceededOut)
{ {
ANGLE_TRY(initializeResources()); ANGLE_TRY(initializeResources());
...@@ -670,7 +674,8 @@ gl::ErrorOrResult<bool> BlitGL::copyTexSubImage(TextureGL *source, ...@@ -670,7 +674,8 @@ gl::ErrorOrResult<bool> BlitGL::copyTexSubImage(TextureGL *source,
GLenum status = mFunctions->checkFramebufferStatus(GL_FRAMEBUFFER); GLenum status = mFunctions->checkFramebufferStatus(GL_FRAMEBUFFER);
if (status != GL_FRAMEBUFFER_COMPLETE) if (status != GL_FRAMEBUFFER_COMPLETE)
{ {
return false; *copySucceededOut = false;
return gl::NoError();
} }
mStateManager->bindTexture(dest->getType(), dest->getTextureID()); mStateManager->bindTexture(dest->getType(), dest->getTextureID());
...@@ -679,13 +684,15 @@ gl::ErrorOrResult<bool> BlitGL::copyTexSubImage(TextureGL *source, ...@@ -679,13 +684,15 @@ gl::ErrorOrResult<bool> BlitGL::copyTexSubImage(TextureGL *source,
destOffset.y, sourceArea.x, sourceArea.y, sourceArea.width, destOffset.y, sourceArea.x, sourceArea.y, sourceArea.width,
sourceArea.height); sourceArea.height);
return true; *copySucceededOut = true;
return gl::NoError();
} }
gl::ErrorOrResult<bool> BlitGL::clearRenderableTexture(TextureGL *source, gl::Error BlitGL::clearRenderableTexture(TextureGL *source,
GLenum sizedInternalFormat, GLenum sizedInternalFormat,
int numTextureLayers, int numTextureLayers,
const gl::ImageIndex &imageIndex) const gl::ImageIndex &imageIndex,
bool *clearSucceededOut)
{ {
ANGLE_TRY(initializeResources()); ANGLE_TRY(initializeResources());
...@@ -713,7 +720,8 @@ gl::ErrorOrResult<bool> BlitGL::clearRenderableTexture(TextureGL *source, ...@@ -713,7 +720,8 @@ gl::ErrorOrResult<bool> BlitGL::clearRenderableTexture(TextureGL *source,
else else
{ {
UnbindAttachments(mFunctions, GL_FRAMEBUFFER, bindTargets); UnbindAttachments(mFunctions, GL_FRAMEBUFFER, bindTargets);
return false; *clearSucceededOut = false;
return gl::NoError();
} }
} }
else else
...@@ -737,7 +745,8 @@ gl::ErrorOrResult<bool> BlitGL::clearRenderableTexture(TextureGL *source, ...@@ -737,7 +745,8 @@ gl::ErrorOrResult<bool> BlitGL::clearRenderableTexture(TextureGL *source,
else else
{ {
UnbindAttachments(mFunctions, GL_FRAMEBUFFER, bindTargets); UnbindAttachments(mFunctions, GL_FRAMEBUFFER, bindTargets);
return false; *clearSucceededOut = false;
return gl::NoError();
} }
} }
else else
...@@ -767,14 +776,16 @@ gl::ErrorOrResult<bool> BlitGL::clearRenderableTexture(TextureGL *source, ...@@ -767,14 +776,16 @@ gl::ErrorOrResult<bool> BlitGL::clearRenderableTexture(TextureGL *source,
else else
{ {
UnbindAttachments(mFunctions, GL_FRAMEBUFFER, bindTargets); UnbindAttachments(mFunctions, GL_FRAMEBUFFER, bindTargets);
return false; *clearSucceededOut = false;
return gl::NoError();
} }
} }
} }
} }
UnbindAttachments(mFunctions, GL_FRAMEBUFFER, bindTargets); UnbindAttachments(mFunctions, GL_FRAMEBUFFER, bindTargets);
return true; *clearSucceededOut = true;
return gl::NoError();
} }
gl::Error BlitGL::clearRenderbuffer(RenderbufferGL *source, GLenum sizedInternalFormat) gl::Error BlitGL::clearRenderbuffer(RenderbufferGL *source, GLenum sizedInternalFormat)
......
...@@ -66,22 +66,23 @@ class BlitGL : angle::NonCopyable ...@@ -66,22 +66,23 @@ class BlitGL : angle::NonCopyable
const gl::Rectangle &destArea, const gl::Rectangle &destArea,
GLenum filter); GLenum filter);
gl::ErrorOrResult<bool> copySubTexture(const gl::Context *context, gl::Error copySubTexture(const gl::Context *context,
TextureGL *source, TextureGL *source,
size_t sourceLevel, size_t sourceLevel,
GLenum sourceComponentType, GLenum sourceComponentType,
TextureGL *dest, TextureGL *dest,
gl::TextureTarget destTarget, gl::TextureTarget destTarget,
size_t destLevel, size_t destLevel,
GLenum destComponentType, GLenum destComponentType,
const gl::Extents &sourceSize, const gl::Extents &sourceSize,
const gl::Rectangle &sourceArea, const gl::Rectangle &sourceArea,
const gl::Offset &destOffset, const gl::Offset &destOffset,
bool needsLumaWorkaround, bool needsLumaWorkaround,
GLenum lumaFormat, GLenum lumaFormat,
bool unpackFlipY, bool unpackFlipY,
bool unpackPremultiplyAlpha, bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha); bool unpackUnmultiplyAlpha,
bool *copySucceededOut);
gl::Error copySubTextureCPUReadback(const gl::Context *context, gl::Error copySubTextureCPUReadback(const gl::Context *context,
TextureGL *source, TextureGL *source,
...@@ -98,18 +99,20 @@ class BlitGL : angle::NonCopyable ...@@ -98,18 +99,20 @@ class BlitGL : angle::NonCopyable
bool unpackPremultiplyAlpha, bool unpackPremultiplyAlpha,
bool unpackUnmultiplyAlpha); bool unpackUnmultiplyAlpha);
gl::ErrorOrResult<bool> copyTexSubImage(TextureGL *source, gl::Error copyTexSubImage(TextureGL *source,
size_t sourceLevel, size_t sourceLevel,
TextureGL *dest, TextureGL *dest,
gl::TextureTarget destTarget, gl::TextureTarget destTarget,
size_t destLevel, size_t destLevel,
const gl::Rectangle &sourceArea, const gl::Rectangle &sourceArea,
const gl::Offset &destOffset); const gl::Offset &destOffset,
bool *copySucceededOut);
gl::ErrorOrResult<bool> clearRenderableTexture(TextureGL *source,
GLenum sizedInternalFormat, gl::Error clearRenderableTexture(TextureGL *source,
int numTextureLayers, GLenum sizedInternalFormat,
const gl::ImageIndex &imageIndex); int numTextureLayers,
const gl::ImageIndex &imageIndex,
bool *clearSucceededOut);
gl::Error clearRenderbuffer(RenderbufferGL *source, GLenum sizedInternalFormat); gl::Error clearRenderbuffer(RenderbufferGL *source, GLenum sizedInternalFormat);
......
...@@ -482,33 +482,21 @@ Error FramebufferGL::readPixels(const gl::Context *context, ...@@ -482,33 +482,21 @@ Error FramebufferGL::readPixels(const gl::Context *context,
bool cannotSetDesiredRowLength = bool cannotSetDesiredRowLength =
packState.rowLength && !GetImplAs<ContextGL>(context)->getNativeExtensions().packSubimage; packState.rowLength && !GetImplAs<ContextGL>(context)->getNativeExtensions().packSubimage;
gl::Error retVal = gl::NoError();
if (cannotSetDesiredRowLength || useOverlappingRowsWorkaround) if (cannotSetDesiredRowLength || useOverlappingRowsWorkaround)
{ {
retVal = readPixelsRowByRow(context, area, readFormat, readType, packState, pixels); return readPixelsRowByRow(context, area, readFormat, readType, packState, pixels);
} }
else
{
gl::ErrorOrResult<bool> useLastRowPaddingWorkaround = false;
if (workarounds.packLastRowSeparatelyForPaddingInclusion)
{
useLastRowPaddingWorkaround = ShouldApplyLastRowPaddingWorkaround(
gl::Extents(area.width, area.height, 1), packState, packBuffer, readFormat,
readType, false, pixels);
}
if (useLastRowPaddingWorkaround.isError()) bool useLastRowPaddingWorkaround = false;
{ if (workarounds.packLastRowSeparatelyForPaddingInclusion)
retVal = useLastRowPaddingWorkaround.getError(); {
} ANGLE_TRY(ShouldApplyLastRowPaddingWorkaround(gl::Extents(area.width, area.height, 1),
else packState, packBuffer, readFormat, readType,
{ false, pixels, &useLastRowPaddingWorkaround));
retVal = readPixelsAllAtOnce(context, area, readFormat, readType, packState, pixels,
useLastRowPaddingWorkaround.getResult());
}
} }
return retVal; return readPixelsAllAtOnce(context, area, readFormat, readType, packState, pixels,
useLastRowPaddingWorkaround);
} }
Error FramebufferGL::blit(const gl::Context *context, Error FramebufferGL::blit(const gl::Context *context,
......
...@@ -169,11 +169,10 @@ gl::Error TextureGL::setImage(const gl::Context *context, ...@@ -169,11 +169,10 @@ gl::Error TextureGL::setImage(const gl::Context *context,
if (workarounds.unpackLastRowSeparatelyForPaddingInclusion) if (workarounds.unpackLastRowSeparatelyForPaddingInclusion)
{ {
bool apply; bool apply = false;
ANGLE_TRY_RESULT( ANGLE_TRY(ShouldApplyLastRowPaddingWorkaround(size, unpack, unpackBuffer, format, type,
ShouldApplyLastRowPaddingWorkaround(size, unpack, unpackBuffer, format, type, nativegl::UseTexImage3D(getType()), pixels,
nativegl::UseTexImage3D(getType()), pixels), &apply));
apply);
// The driver will think the pixel buffer doesn't have enough data, work around this bug // The driver will think the pixel buffer doesn't have enough data, work around this bug
// by uploading the last row (and last level if 3D) separately. // by uploading the last row (and last level if 3D) separately.
...@@ -288,11 +287,10 @@ gl::Error TextureGL::setSubImage(const gl::Context *context, ...@@ -288,11 +287,10 @@ gl::Error TextureGL::setSubImage(const gl::Context *context,
{ {
gl::Extents size(area.width, area.height, area.depth); gl::Extents size(area.width, area.height, area.depth);
bool apply; bool apply = false;
ANGLE_TRY_RESULT( ANGLE_TRY(ShouldApplyLastRowPaddingWorkaround(size, unpack, unpackBuffer, format, type,
ShouldApplyLastRowPaddingWorkaround(size, unpack, unpackBuffer, format, type, nativegl::UseTexImage3D(getType()), pixels,
nativegl::UseTexImage3D(getType()), pixels), &apply));
apply);
// The driver will think the pixel buffer doesn't have enough data, work around this bug // The driver will think the pixel buffer doesn't have enough data, work around this bug
// by uploading the last row (and last level if 3D) separately. // by uploading the last row (and last level if 3D) separately.
...@@ -812,11 +810,10 @@ gl::Error TextureGL::copySubTextureHelper(const gl::Context *context, ...@@ -812,11 +810,10 @@ gl::Error TextureGL::copySubTextureHelper(const gl::Context *context,
sourceFormatContainSupersetOfDestFormat && sourceComponentType == destComponentType && sourceFormatContainSupersetOfDestFormat && sourceComponentType == destComponentType &&
!destSRGB) !destSRGB)
{ {
bool copySucceded = false; bool copySucceeded = false;
ANGLE_TRY_RESULT(blitter->copyTexSubImage(sourceGL, sourceLevel, this, target, level, ANGLE_TRY(blitter->copyTexSubImage(sourceGL, sourceLevel, this, target, level, sourceArea,
sourceArea, destOffset), destOffset, &copySucceeded));
copySucceded); if (copySucceeded)
if (copySucceded)
{ {
return gl::NoError(); return gl::NoError();
} }
...@@ -827,14 +824,13 @@ gl::Error TextureGL::copySubTextureHelper(const gl::Context *context, ...@@ -827,14 +824,13 @@ gl::Error TextureGL::copySubTextureHelper(const gl::Context *context,
if (!destSRGB && if (!destSRGB &&
nativegl::SupportsNativeRendering(functions, getType(), destLevelInfo.nativeInternalFormat)) nativegl::SupportsNativeRendering(functions, getType(), destLevelInfo.nativeInternalFormat))
{ {
bool copySucceded = false; bool copySucceeded = false;
ANGLE_TRY_RESULT(blitter->copySubTexture( ANGLE_TRY(blitter->copySubTexture(
context, sourceGL, sourceLevel, sourceComponentType, this, target, context, sourceGL, sourceLevel, sourceComponentType, this, target, level,
level, destComponentType, sourceImageDesc.size, sourceArea, destOffset, destComponentType, sourceImageDesc.size, sourceArea, destOffset, needsLumaWorkaround,
needsLumaWorkaround, sourceLevelInfo.sourceFormat, unpackFlipY, sourceLevelInfo.sourceFormat, unpackFlipY, unpackPremultiplyAlpha,
unpackPremultiplyAlpha, unpackUnmultiplyAlpha), unpackUnmultiplyAlpha, &copySucceeded));
copySucceded); if (copySucceeded)
if (copySucceded)
{ {
return gl::NoError(); return gl::NoError();
} }
...@@ -1550,9 +1546,8 @@ gl::Error TextureGL::initializeContents(const gl::Context *context, ...@@ -1550,9 +1546,8 @@ gl::Error TextureGL::initializeContents(const gl::Context *context,
int levelDepth = mState.getImageDesc(imageIndex).size.depth; int levelDepth = mState.getImageDesc(imageIndex).size.depth;
bool clearSucceeded = false; bool clearSucceeded = false;
ANGLE_TRY_RESULT( ANGLE_TRY(blitter->clearRenderableTexture(this, nativeInternalFormat, levelDepth,
blitter->clearRenderableTexture(this, nativeInternalFormat, levelDepth, imageIndex), imageIndex, &clearSucceeded));
clearSucceeded);
if (clearSucceeded) if (clearSucceeded)
{ {
return gl::NoError(); return gl::NoError();
......
...@@ -1390,17 +1390,19 @@ uint8_t *MapBufferRangeWithFallback(const FunctionsGL *functions, ...@@ -1390,17 +1390,19 @@ uint8_t *MapBufferRangeWithFallback(const FunctionsGL *functions,
} }
} }
gl::ErrorOrResult<bool> ShouldApplyLastRowPaddingWorkaround(const gl::Extents &size, gl::Error ShouldApplyLastRowPaddingWorkaround(const gl::Extents &size,
const gl::PixelStoreStateBase &state, const gl::PixelStoreStateBase &state,
const gl::Buffer *pixelBuffer, const gl::Buffer *pixelBuffer,
GLenum format, GLenum format,
GLenum type, GLenum type,
bool is3D, bool is3D,
const void *pixels) const void *pixels,
bool *shouldApplyOut)
{ {
if (pixelBuffer == nullptr) if (pixelBuffer == nullptr)
{ {
return false; *shouldApplyOut = false;
return gl::NoError();
} }
// We are using an pack or unpack buffer, compute what the driver thinks is going to be the // We are using an pack or unpack buffer, compute what the driver thinks is going to be the
...@@ -1428,7 +1430,8 @@ gl::ErrorOrResult<bool> ShouldApplyLastRowPaddingWorkaround(const gl::Extents &s ...@@ -1428,7 +1430,8 @@ gl::ErrorOrResult<bool> ShouldApplyLastRowPaddingWorkaround(const gl::Extents &s
ANGLE_TRY_CHECKED_MATH(checkedEndByte.IsValid()); ANGLE_TRY_CHECKED_MATH(checkedEndByte.IsValid());
return checkedEndByte.ValueOrDie() > static_cast<size_t>(pixelBuffer->getSize()); *shouldApplyOut = checkedEndByte.ValueOrDie() > static_cast<size_t>(pixelBuffer->getSize());
return gl::NoError();
} }
std::vector<ContextCreationTry> GenerateContextCreationToTry(EGLint requestedType, bool isMesaGLX) std::vector<ContextCreationTry> GenerateContextCreationToTry(EGLint requestedType, bool isMesaGLX)
......
...@@ -42,7 +42,6 @@ enum class MultiviewImplementationTypeGL ...@@ -42,7 +42,6 @@ enum class MultiviewImplementationTypeGL
}; };
VendorID GetVendorID(const FunctionsGL *functions); VendorID GetVendorID(const FunctionsGL *functions);
std::string GetDriverVersion(const FunctionsGL *functions);
// Helpers for extracting the GL helper objects out of a context // Helpers for extracting the GL helper objects out of a context
const FunctionsGL *GetFunctionsGL(const gl::Context *context); const FunctionsGL *GetFunctionsGL(const gl::Context *context);
...@@ -84,13 +83,14 @@ uint8_t *MapBufferRangeWithFallback(const FunctionsGL *functions, ...@@ -84,13 +83,14 @@ uint8_t *MapBufferRangeWithFallback(const FunctionsGL *functions,
size_t length, size_t length,
GLbitfield access); GLbitfield access);
gl::ErrorOrResult<bool> ShouldApplyLastRowPaddingWorkaround(const gl::Extents &size, gl::Error ShouldApplyLastRowPaddingWorkaround(const gl::Extents &size,
const gl::PixelStoreStateBase &state, const gl::PixelStoreStateBase &state,
const gl::Buffer *pixelBuffer, const gl::Buffer *pixelBuffer,
GLenum format, GLenum format,
GLenum type, GLenum type,
bool is3D, bool is3D,
const void *pixels); const void *pixels,
bool *shouldApplyOut);
struct ContextCreationTry struct ContextCreationTry
{ {
......
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