return (rawPitch + alignment - 1) & ~(alignment - 1);
}
-
- GLsizei ComputeCompressedPitch(GLsizei width, GLenum format)
+ inline GLsizei ComputeCompressedPitch(GLsizei width, GLenum format)
{
return ComputeCompressedSize(width, 1, format);
}
namespace egl\r
{\r
\r
+sw::Format ConvertFormatType(GLenum format, GLenum type);\r
sw::Format SelectInternalFormat(GLenum format, GLenum type);\r
GLsizei ComputePitch(GLsizei width, GLenum format, GLenum type, GLint alignment);\r
-GLsizei ComputeCompressedPitch(GLsizei width, GLenum format);\r
GLsizei ComputeCompressedSize(GLsizei width, GLsizei height, GLenum format);\r
\r
static inline sw::Resource *getParentResource(egl::Texture *texture)\r
sw::Rect dstRect = { 0, 0, width, height };\r
rect.clip(0, 0, renderTarget->getWidth(), renderTarget->getHeight());\r
\r
- sw::Surface externalSurface(width, height, 1, egl::SelectInternalFormat(format, type), pixels, outputPitch, outputPitch * outputHeight);\r
+ sw::Surface externalSurface(width, height, 1, egl::ConvertFormatType(format, type), pixels, outputPitch, outputPitch * outputHeight);\r
sw::SliceRect sliceRect(rect);\r
sw::SliceRect dstSliceRect(dstRect);\r
device->blit(renderTarget, sliceRect, &externalSurface, dstSliceRect, false);\r