CopyTextureForBrowser: Support color format conversion

This CL enables blit from RGBA8Unorm soruce texture to dst texture that
|CopyImageBitmapToTexture| supported dst format.

BUG=dawn:465

Change-Id: I99846cf8dc37bc89e0c168a3d86193bb3a0c0ebb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44020
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
Yan, Shaobo
2021-03-19 09:46:44 +00:00
committed by Commit Bot service account
parent ad8772dfb2
commit f84daa070f
5 changed files with 212 additions and 40 deletions

View File

@@ -25,7 +25,9 @@ namespace dawn_native {
class ShaderModuleBase;
struct InternalPipelineStore {
Ref<RenderPipelineBase> copyTextureForBrowserPipeline;
std::unordered_map<wgpu::TextureFormat, Ref<RenderPipelineBase>>
copyTextureForBrowserPipelines;
Ref<ShaderModuleBase> copyTextureForBrowserVS;
Ref<ShaderModuleBase> copyTextureForBrowserFS;