diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-07-18 08:24:24 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-07-18 08:24:24 +0200 |
commit | fc61780b35af913801d72086456f493f63197da6 (patch) | |
tree | f85891288a7bd988da9f0f15ae64e5c63f00d493 /gfx/angle/src/libANGLE/renderer/d3d/d3d9/Image9.cpp | |
parent | 69f7f9e5f1475891ce11cc4f431692f965b0cd30 (diff) | |
parent | 50d3e596bbe89c95615f96eb71f6bc5be737a1db (diff) | |
download | UXP-fc61780b35af913801d72086456f493f63197da6.tar UXP-fc61780b35af913801d72086456f493f63197da6.tar.gz UXP-fc61780b35af913801d72086456f493f63197da6.tar.lz UXP-fc61780b35af913801d72086456f493f63197da6.tar.xz UXP-fc61780b35af913801d72086456f493f63197da6.zip |
Merge commit '50d3e596bbe89c95615f96eb71f6bc5be737a1db' into Basilisk-releasev2018.07.18
# Conflicts:
# browser/app/profile/firefox.js
# browser/components/preferences/jar.mn
Diffstat (limited to 'gfx/angle/src/libANGLE/renderer/d3d/d3d9/Image9.cpp')
-rwxr-xr-x | gfx/angle/src/libANGLE/renderer/d3d/d3d9/Image9.cpp | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Image9.cpp b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Image9.cpp index ad2c41584..24c1e9150 100755 --- a/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Image9.cpp +++ b/gfx/angle/src/libANGLE/renderer/d3d/d3d9/Image9.cpp @@ -61,7 +61,7 @@ gl::Error Image9::generateMip(IDirect3DSurface9 *destSurface, IDirect3DSurface9 ASSERT(sourceDesc.Height == 1 || sourceDesc.Height / 2 == destDesc.Height); const d3d9::D3DFormat &d3dFormatInfo = d3d9::GetD3DFormatInfo(sourceDesc.Format); - ASSERT(d3dFormatInfo.info().mipGenerationFunction != NULL); + ASSERT(d3dFormatInfo.info->mipGenerationFunction != NULL); D3DLOCKED_RECT sourceLocked = {0}; result = sourceSurface->LockRect(&sourceLocked, NULL, D3DLOCK_READONLY); @@ -85,9 +85,8 @@ gl::Error Image9::generateMip(IDirect3DSurface9 *destSurface, IDirect3DSurface9 ASSERT(sourceData && destData); - d3dFormatInfo.info().mipGenerationFunction(sourceDesc.Width, sourceDesc.Height, 1, sourceData, - sourceLocked.Pitch, 0, destData, destLocked.Pitch, - 0); + d3dFormatInfo.info->mipGenerationFunction(sourceDesc.Width, sourceDesc.Height, 1, sourceData, + sourceLocked.Pitch, 0, destData, destLocked.Pitch, 0); destSurface->UnlockRect(); sourceSurface->UnlockRect(); @@ -295,6 +294,7 @@ void Image9::unlock() if (mSurface) { HRESULT result = mSurface->UnlockRect(); + UNUSED_ASSERTION_VARIABLE(result); ASSERT(SUCCEEDED(result)); } } @@ -475,17 +475,17 @@ gl::Error Image9::copyToSurface(IDirect3DSurface9 *destSurface, const gl::Box &a // into the target pixel rectangle. gl::Error Image9::loadData(const gl::Box &area, const gl::PixelUnpackState &unpack, - GLenum inputType, + GLenum type, const void *input, bool applySkipImages) { // 3D textures are not supported by the D3D9 backend. ASSERT(area.z == 0 && area.depth == 1); - ASSERT(getSizedInputFormat(inputType) == mInternalFormat); + const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(mInternalFormat); GLuint inputRowPitch = 0; ANGLE_TRY_RESULT( - formatInfo.computeRowPitch(area.width, unpack.alignment, unpack.rowLength), + formatInfo.computeRowPitch(type, area.width, unpack.alignment, unpack.rowLength), inputRowPitch); ASSERT(!applySkipImages); ASSERT(unpack.skipPixels == 0); @@ -523,10 +523,11 @@ gl::Error Image9::loadCompressedData(const gl::Box &area, const void *input) const gl::InternalFormat &formatInfo = gl::GetInternalFormatInfo(mInternalFormat); GLsizei inputRowPitch = 0; - ANGLE_TRY_RESULT(formatInfo.computeRowPitch(area.width, 1, 0), inputRowPitch); + ANGLE_TRY_RESULT(formatInfo.computeRowPitch(GL_UNSIGNED_BYTE, area.width, 1, 0), inputRowPitch); GLsizei inputDepthPitch = 0; - ANGLE_TRY_RESULT(formatInfo.computeDepthPitch(area.height, 0, inputDepthPitch), - inputDepthPitch); + ANGLE_TRY_RESULT( + formatInfo.computeDepthPitch(GL_UNSIGNED_BYTE, area.width, area.height, 1, 0, 0), + inputDepthPitch); const d3d9::TextureFormat &d3d9FormatInfo = d3d9::GetTextureFormatInfo(mInternalFormat); |