Skip to content

Commit

Permalink
[Dawn] Add FormatBytesPerBlock() for format type External
Browse files Browse the repository at this point in the history
Bug: b/41488897
Change-Id: Ib4d1b3c3820ee7846764cb328ca773be6d083083
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/866816
Commit-Queue: Colin Blundell <[email protected]>
Reviewed-by: Greg Daniel <[email protected]>
Reviewed-by: Michael Ludwig <[email protected]>
  • Loading branch information
colinblundell authored and SkCQ committed Jun 17, 2024
1 parent abe8b42 commit 4040aa6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gpu/graphite/dawn/DawnUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ size_t DawnFormatBytesPerBlock(wgpu::TextureFormat format) {
#if !defined(__EMSCRIPTEN__)
case wgpu::TextureFormat::R16Unorm: return 2;
case wgpu::TextureFormat::RG16Unorm: return 4;
// Note: We don't actually know the size of external formats, so this
// is an arbitrary value. We will see external formats only in wrapped
// SkImages, so this won't impact Skia's internal budgeting.
case wgpu::TextureFormat::External:
return 4;
#endif
default:
SkUNREACHABLE;
Expand Down

0 comments on commit 4040aa6

Please sign in to comment.