/third_party/skia/third_party/externals/dawn/src/dawn_native/d3d12/ |
D | TextureCopySplitter.cpp | 26 uint32_t bytesPerRow) { in ComputeTexelOffsets() argument 27 ASSERT(bytesPerRow != 0); in ComputeTexelOffsets() 28 uint32_t byteOffsetX = offset % bytesPerRow; in ComputeTexelOffsets() 32 byteOffsetY / bytesPerRow * blockInfo.height, 0}; in ComputeTexelOffsets() 36 uint32_t bytesPerRow, in OffsetToFirstCopiedTexel() argument 41 bufferOffset.y * bytesPerRow / blockInfo.height; in OffsetToFirstCopiedTexel() 58 uint32_t bytesPerRow) { in Compute2DTextureCopySubresource() argument 61 ASSERT(bytesPerRow % blockInfo.byteSize == 0); in Compute2DTextureCopySubresource() 105 blockInfo, static_cast<uint32_t>(offset - alignedOffset), bytesPerRow); in Compute2DTextureCopySubresource() 112 if (copyBytesPerRowPitch + byteOffsetInRowPitch <= bytesPerRow) { in Compute2DTextureCopySubresource() [all …]
|
D | UtilsD3D12.cpp | 182 const uint32_t bytesPerRow, in CopyBufferTo2DTextureWithCopySplit() argument 191 textureCopy.origin, copySize, blockInfo, offset, bytesPerRow, rowsPerImage); in CopyBufferTo2DTextureWithCopySplit() 193 const uint64_t bytesPerLayer = bytesPerRow * rowsPerImage; in CopyBufferTo2DTextureWithCopySplit() 215 bufferOffsetForNextLayer, bytesPerRow, texture, textureCopy.mipLevel, in CopyBufferTo2DTextureWithCopySplit() 227 const uint32_t bytesPerRow, in CopyBufferTo3DTexture() argument 236 textureCopy.origin, copySize, blockInfo, offset, bytesPerRow, rowsPerImage); in CopyBufferTo3DTexture() 239 bufferResource, 0, bytesPerRow, texture, in CopyBufferTo3DTexture() 247 const uint32_t bytesPerRow, in RecordCopyBufferToTexture() argument 255 CopyBufferTo3DTexture(commandContext, textureCopy, bufferResource, offset, bytesPerRow, in RecordCopyBufferToTexture() 261 bytesPerRow, rowsPerImage, copySize, texture, in RecordCopyBufferToTexture() [all …]
|
D | TextureCopySplitter.h | 80 uint32_t bytesPerRow); 86 uint32_t bytesPerRow, 93 uint32_t bytesPerRow,
|
/third_party/skia/third_party/externals/dawn/src/utils/ |
D | TestUtils.cpp | 54 layout.bytesPerRow = GetMinimumBytesPerRow(format, layout.mipSize.width); in GetTextureDataCopyLayoutForTextureAtLevel() 62 layout.bytesPerImage = layout.bytesPerRow * appliedRowsPerImage; in GetTextureDataCopyLayoutForTextureAtLevel() 65 RequiredBytesInCopy(layout.bytesPerRow, appliedRowsPerImage, layout.mipSize, format); in GetTextureDataCopyLayoutForTextureAtLevel() 68 layout.texelBlocksPerRow = layout.bytesPerRow / bytesPerTexel; in GetTextureDataCopyLayoutForTextureAtLevel() 75 uint64_t RequiredBytesInCopy(uint64_t bytesPerRow, in RequiredBytesInCopy() argument 86 return RequiredBytesInCopy(bytesPerRow, rowsPerImage, widthInBlocks, heightInBlocks, in RequiredBytesInCopy() 90 uint64_t RequiredBytesInCopy(uint64_t bytesPerRow, in RequiredBytesInCopy() argument 100 uint64_t bytesPerImage = bytesPerRow * rowsPerImage; in RequiredBytesInCopy() 104 uint64_t lastImageBytes = bytesPerRow * (heightInBlocks - 1) + lastRowBytes; in RequiredBytesInCopy() 110 uint64_t GetTexelCountInCopyRegion(uint64_t bytesPerRow, in GetTexelCountInCopyRegion() argument [all …]
|
D | TestUtils.h | 25 uint32_t bytesPerRow; member 41 uint64_t RequiredBytesInCopy(uint64_t bytesPerRow, 45 uint64_t RequiredBytesInCopy(uint64_t bytesPerRow, 52 uint64_t GetTexelCountInCopyRegion(uint64_t bytesPerRow,
|
D | WGPUHelpers.cpp | 183 uint32_t bytesPerRow, in CreateImageCopyBuffer() argument 187 imageCopyBuffer.layout = CreateTextureDataLayout(offset, bytesPerRow, rowsPerImage); in CreateImageCopyBuffer() 206 uint32_t bytesPerRow, in CreateTextureDataLayout() argument 210 textureDataLayout.bytesPerRow = bytesPerRow; in CreateTextureDataLayout()
|
/third_party/skia/third_party/externals/dawn/src/tests/unittests/d3d12/ |
D | CopySplitTests.cpp | 44 uint32_t bytesPerRow; member 72 utils::RequiredBytesInCopy(bufferSpec.bytesPerRow, bufferSpec.rowsPerImage, in ValidateFootprints() 93 utils::RequiredBytesInCopy(bufferSpec.bytesPerRow, copy.bufferSize.height, in ValidateFootprints() 200 bufferSpec.bytesPerRow / textureSpec.texelBlockSizeInBytes * texelsPerBlock; in ValidateBufferOffset() 253 os << "BufferSpec(" << bufferSpec.offset << ", " << bufferSpec.bytesPerRow << ", " in operator <<() 325 uint32_t bytesPerRow = Align(textureSpec.texelBlockSizeInBytes * textureSpec.width, in BaseBufferSpecs() local 333 BufferSpec{alignNonPow2(0, textureSpec.texelBlockSizeInBytes), bytesPerRow, in BaseBufferSpecs() 335 BufferSpec{alignNonPow2(256, textureSpec.texelBlockSizeInBytes), bytesPerRow, in BaseBufferSpecs() 337 BufferSpec{alignNonPow2(512, textureSpec.texelBlockSizeInBytes), bytesPerRow, in BaseBufferSpecs() 339 BufferSpec{alignNonPow2(1024, textureSpec.texelBlockSizeInBytes), bytesPerRow, in BaseBufferSpecs() [all …]
|
/third_party/skia/third_party/externals/dawn/src/dawn_native/ |
D | CommandValidation.cpp | 115 uint32_t bytesPerRow, in ComputeRequiredBytesInCopy() argument 142 ASSERT(copySize.depthOrArrayLayers <= 1 || (bytesPerRow != wgpu::kCopyStrideUndefined && in ComputeRequiredBytesInCopy() 144 uint64_t bytesPerImage = Safe32x32(bytesPerRow, rowsPerImage); in ComputeRequiredBytesInCopy() 153 ASSERT(heightInBlocks <= 1 || bytesPerRow != wgpu::kCopyStrideUndefined); in ComputeRequiredBytesInCopy() 154 uint64_t bytesInLastImage = Safe32x32(bytesPerRow, heightInBlocks - 1) + bytesInLastRow; in ComputeRequiredBytesInCopy() 181 if (layout->bytesPerRow == wgpu::kCopyStrideUndefined) { in ApplyDefaultTextureDataLayoutOptions() 187 layout->bytesPerRow = Align(bytesInLastRow, kTextureBytesPerRowAlignment); in ApplyDefaultTextureDataLayoutOptions() 206 (layout.bytesPerRow == wgpu::kCopyStrideUndefined || in ValidateLinearTextureData() 209 copyExtent.depthOrArrayLayers, layout.bytesPerRow, layout.rowsPerImage); in ValidateLinearTextureData() 211 DAWN_INVALID_IF(heightInBlocks > 1 && layout.bytesPerRow == wgpu::kCopyStrideUndefined, in ValidateLinearTextureData() [all …]
|
/third_party/skia/third_party/externals/dawn/src/tests/end2end/ |
D | QueueTests.cpp | 211 uint32_t bytesPerRow; member 218 uint32_t bytesPerRow = writeSize.width * utils::GetTexelBlockSizeInBytes(kTextureFormat); in MinimumDataSpec() local 220 bytesPerRow = overrideBytesPerRow; in MinimumDataSpec() 228 utils::RequiredBytesInCopy(bytesPerRow, rowsPerImage, writeSize, kTextureFormat); in MinimumDataSpec() 229 return {totalDataSize, 0, bytesPerRow, rowsPerImage}; in MinimumDataSpec() 272 dataSpec.offset, dataSpec.bytesPerRow, dataSpec.rowsPerImage); in DoTest() 284 uint32_t bytesPerRow = dataSpec.bytesPerRow; in DoTest() local 285 if (bytesPerRow == wgpu::kCopyStrideUndefined) { in DoTest() 286 bytesPerRow = mipSize.width * bytesPerTexel; in DoTest() 288 uint32_t alignedBytesPerRow = Align(bytesPerRow, bytesPerTexel); in DoTest() [all …]
|
D | Texture3DTests.cpp | 74 uint32_t bytesPerRow = utils::GetMinimumBytesPerRow(kFormat, copySize.width); in TEST_P() local 76 utils::RequiredBytesInCopy(bytesPerRow, copySize.height, copySize, kFormat); in TEST_P() 83 uint32_t i = (z * copySize.height + y) * bytesPerRow / bytesPerTexel + x; in TEST_P() 94 utils::CreateImageCopyBuffer(buffer, 0, bytesPerRow, copySize.height); in TEST_P()
|
D | CopyTests.cpp | 42 uint32_t bytesPerRow; member 47 uint32_t bytesPerTexelBlock = layout.bytesPerRow / layout.texelBlocksPerRow; in GetExpectedTextureData() 53 uint32_t i = x + y * layout.bytesPerRow; in GetExpectedTextureData() 96 uint32_t bytesPerRow = utils::GetMinimumBytesPerRow(format, copyExtent.width); in MinimumBufferSpec() local 98 bytesPerRow = overrideBytesPerRow; in MinimumBufferSpec() 106 utils::RequiredBytesInCopy(bytesPerRow, rowsPerImage, copyExtent, format); in MinimumBufferSpec() 107 return {totalDataSize, 0, bytesPerRow, rowsPerImage}; in MinimumBufferSpec() 163 utils::CreateTextureDataLayout(0, copyLayout.bytesPerRow, copyLayout.rowsPerImage); in DoTest() 183 buffer, bufferSpec.offset, bufferSpec.bytesPerRow, bufferSpec.rowsPerImage); in DoTest() 202 bufferSpec.bytesPerRow, bufferSpec.rowsPerImage, copySizePerLayer, textureSpec.format); in DoTest() [all …]
|
D | TextureZeroInitTests.cpp | 152 const uint32_t bytesPerRow = utils::GetMinimumBytesPerRow(kColorFormat, kSize); in TEST_P() local 156 bufferDescriptor.size = utils::RequiredBytesInCopy(bytesPerRow, rowsPerImage, in TEST_P() 161 utils::CreateImageCopyBuffer(buffer, 0, bytesPerRow, kSize); in TEST_P() 1033 uint32_t bytesPerRow = Align(kSize * kFormatBlockByteSize, kTextureBytesPerRowAlignment); in TEST_P() local 1034 uint32_t bufferSize = bytesPerRow * kSize; in TEST_P() 1039 wgpu::ImageCopyBuffer imageCopyBuffer = utils::CreateImageCopyBuffer(bufferDst, 0, bytesPerRow); in TEST_P() 1068 uint32_t bytesPerRow = in TEST_P() local 1070 uint32_t bufferSize = bytesPerRow * kUnalignedSize; in TEST_P() 1074 wgpu::ImageCopyBuffer imageCopyBuffer = utils::CreateImageCopyBuffer(bufferDst, 0, bytesPerRow); in TEST_P() 1445 uint32_t bytesPerRow = Align(kUnalignedSize, kTextureBytesPerRowAlignment); in TEST_P() local [all …]
|
D | NonzeroTextureCreationTests.cpp | 226 uint32_t bytesPerRow = in Run() local 230 uint64_t bufferSize = utils::RequiredBytesInCopy(bytesPerRow, rowsPerImage, in Run() 238 utils::CreateImageCopyBuffer(bufferDst, 0, bytesPerRow, rowsPerImage); in Run() 254 d += bytesPerRow; in Run()
|
/third_party/mesa3d/src/mesa/main/ |
D | image.c | 298 GLint bytesPerRow, remainder; in _mesa_image_row_stride() local 304 bytesPerRow = (width + 7) / 8; in _mesa_image_row_stride() 307 bytesPerRow = (packing->RowLength + 7) / 8; in _mesa_image_row_stride() 316 bytesPerRow = bytesPerPixel * width; in _mesa_image_row_stride() 319 bytesPerRow = bytesPerPixel * packing->RowLength; in _mesa_image_row_stride() 323 remainder = bytesPerRow % packing->Alignment; in _mesa_image_row_stride() 325 bytesPerRow += (packing->Alignment - remainder); in _mesa_image_row_stride() 330 bytesPerRow = -bytesPerRow; in _mesa_image_row_stride() 333 return bytesPerRow; in _mesa_image_row_stride() 346 GLint bytesPerRow, bytesPerImage, remainder; in _mesa_image_image_stride() local [all …]
|
/third_party/skia/third_party/externals/dawn/src/tests/unittests/validation/ |
D | QueueWriteTextureValidationTests.cpp | 63 textureDataLayout.bytesPerRow = dataBytesPerRow; in TestWriteTexture() 72 void TestWriteTextureExactDataSize(uint32_t bytesPerRow, in TestWriteTextureExactDataSize() argument 80 utils::RequiredBytesInCopy(bytesPerRow, rowsPerImage, extent3D, textureFormat); in TestWriteTextureExactDataSize() 81 TestWriteTexture(dataSize, 0, bytesPerRow, rowsPerImage, texture, 0, origin, extent3D); in TestWriteTextureExactDataSize() 85 ASSERT_DEVICE_ERROR(TestWriteTexture(invalidSize, 0, bytesPerRow, rowsPerImage, texture, in TestWriteTextureExactDataSize() 489 uint32_t bytesPerRow = sizeof(float) * 4; in TEST_F() local 490 const uint64_t dataSize = utils::RequiredBytesInCopy(bytesPerRow, 0, {4, 4, 1}, in TEST_F() 498 ASSERT_DEVICE_ERROR(TestWriteTexture(dataSize, 0, bytesPerRow, 4, destination, 0, in TEST_F() 501 ASSERT_DEVICE_ERROR(TestWriteTexture(dataSize, 0, bytesPerRow, 4, destination, 0, in TEST_F() 511 ASSERT_DEVICE_ERROR(TestWriteTexture(dataSize, 0, bytesPerRow, 4, destination, 0, in TEST_F() [all …]
|
/third_party/skia/third_party/externals/dawn/src/dawn_native/metal/ |
D | UtilsMetal.mm | 54 uint32_t bytesPerRow, 64 // buffer, it computes the volume of the 3D box with bytesPerRow * (rowsPerImage / 78 uint32_t bytesPerImage = bytesPerRow * rowsPerImage; 95 copy.copies[0].bytesPerRow = bytesPerRow; 108 copy.copies[copy.count].bytesPerRow = bytesPerRow; 124 copy.copies[copy.count].bytesPerRow = bytesPerRow; 125 copy.copies[copy.count].bytesPerImage = bytesPerRow * (copyBlockRowCount - 1); 137 currentOffset += (copyBlockRowCount - 1) * bytesPerRow; 148 copy.copies[copy.count].bytesPerRow = lastRowDataSize;
|
D | UtilsMetal.h | 40 NSUInteger bytesPerRow; member 64 uint32_t bytesPerRow,
|
/third_party/skia/third_party/externals/dawn/src/tests/ |
D | DawnTest.h | 365 uint32_t bytesPerRow = 0) { 370 texture, origin, extent, level, aspect, sizeof(U), bytesPerRow); 381 uint32_t bytesPerRow = 0) { 384 bytesPerRow); 398 uint32_t bytesPerRow = 0) { 400 aspect, expectation->DataSize(), bytesPerRow); 414 uint32_t bytesPerRow = 0) { 417 level, aspect, sizeof(T), bytesPerRow); 523 uint32_t bytesPerRow); 561 uint32_t bytesPerRow; member
|
D | DawnTest.cpp | 1079 deferred.bytesPerRow = size; in AddBufferExpectation() 1096 uint32_t bytesPerRow) { in AddTextureExpectationImpl() argument 1097 if (bytesPerRow == 0) { in AddTextureExpectationImpl() 1098 bytesPerRow = Align(extent.width * dataSize, kTextureBytesPerRowAlignment); in AddTextureExpectationImpl() 1100 ASSERT(bytesPerRow >= extent.width * dataSize); in AddTextureExpectationImpl() 1101 ASSERT(bytesPerRow == Align(bytesPerRow, kTextureBytesPerRowAlignment)); in AddTextureExpectationImpl() 1105 uint32_t size = utils::RequiredBytesInCopy(bytesPerRow, rowsPerImage, extent.width, in AddTextureExpectationImpl() 1115 utils::CreateImageCopyBuffer(readback.buffer, readback.offset, bytesPerRow, rowsPerImage); in AddTextureExpectationImpl() 1130 deferred.bytesPerRow = bytesPerRow; in AddTextureExpectationImpl() 1495 if (expectation.rowBytes != expectation.bytesPerRow) { in ResolveExpectations() [all …]
|
/third_party/skia/third_party/externals/dawn/src/dawn_native/vulkan/ |
D | UtilsVulkan.cpp | 111 passDataLayout.bytesPerRow = bufferCopy.bytesPerRow; in ComputeBufferImageCopyRegion() 126 ASSERT(dataLayout.bytesPerRow % blockInfo.byteSize == 0); in ComputeBufferImageCopyRegion() 127 region.bufferRowLength = dataLayout.bytesPerRow / blockInfo.byteSize * blockInfo.width; in ComputeBufferImageCopyRegion()
|
/third_party/skia/modules/canvaskit/ |
D | cpu.js | 69 CanvasKit.MakeRasterDirectSurface = function(imageInfo, mallocObj, bytesPerRow) { argument 70 return CanvasKit.Surface._makeRasterDirect(imageInfo, mallocObj['byteOffset'], bytesPerRow);
|
D | interface.js | 393 function readPixels(source, srcX, srcY, imageInfo, destMallocObj, bytesPerRow) { argument 394 if (!bytesPerRow) { 395 bytesPerRow = 4 * imageInfo['width']; 397 bytesPerRow *= 2; 400 bytesPerRow *= 4; 403 var pBytes = bytesPerRow * imageInfo.height; 411 if (!source._readPixels(imageInfo, pPtr, bytesPerRow, srcX, srcY)) { 446 bytesPerRow) { argument 447 return readPixels(this, srcX, srcY, imageInfo, destMallocObj, bytesPerRow); 803 bytesPerRow) { argument [all …]
|
/third_party/skia/third_party/externals/dawn/src/dawn_native/opengl/ |
D | CommandBufferGL.cpp | 667 dataLayout.bytesPerRow = src.bytesPerRow; in Execute() 718 gl.PixelStorei(GL_PACK_ROW_LENGTH, dst.bytesPerRow / blockInfo.byteSize); in Execute() 763 const uint64_t bytesPerImage = dst.bytesPerRow * dst.rowsPerImage; in Execute() 1387 if (dataLayout.bytesPerRow % blockInfo.byteSize == 0 && gl.GetVersion().IsDesktop()) { in DoTexSubImage() 1394 dataLayout.bytesPerRow / blockInfo.byteSize * blockInfo.width); in DoTexSubImage() 1427 d += dataLayout.bytesPerRow; in DoTexSubImage() 1441 d += dataLayout.bytesPerRow; in DoTexSubImage() 1444 slice += dataLayout.rowsPerImage * dataLayout.bytesPerRow; in DoTexSubImage() 1451 if (dataLayout.bytesPerRow % blockInfo.byteSize == 0) { in DoTexSubImage() 1453 dataLayout.bytesPerRow / blockInfo.byteSize * blockInfo.width); in DoTexSubImage() [all …]
|
D | TextureGL.cpp | 455 uint32_t bytesPerRow = in ClearTexture() local 459 ASSERT(bytesPerRow % blockInfo.byteSize == 0); in ClearTexture() 462 uint64_t bufferSize64 = static_cast<uint64_t>(bytesPerRow) * in ClearTexture() 495 dataLayout.bytesPerRow = bytesPerRow; in ClearTexture()
|
/third_party/mesa3d/src/mesa/state_tracker/ |
D | st_cb_readpixels.c | 541 const uint bytesPerRow = width * util_format_get_blocksize(dst_format); in st_ReadPixels() local 547 if (tex_xfer->stride == bytesPerRow && destStride == bytesPerRow) { in st_ReadPixels() 548 memcpy(dest, map, bytesPerRow * height); in st_ReadPixels() 553 memcpy(dest, map, bytesPerRow); in st_ReadPixels()
|