dawn-cmake/src
Jiawei Shao 24930b382a Workaround GL error when creating texture view from external GL textures
This patch adds a workaround on the GL error when we use glTextureView()
on a GL texture which is created outside DAWN and not configured by
glTexStorage*d(). glTextureView() is only allowed to be used on the
textures configured by glTexStorage*D(). When the external GL texture
is configured by glTexImage2D() (for example, textures from GLFW),
calling glTextureView() will cause an INVALID_OPERATION error.

To workaround this issue, we refer the solution on the Metal backend
that we avoid calling glTextureView() on the following senarios:
1. We may call glTextureView() only when the usage of the texture
   includes Sampled or Storage.
2. We won't call glTextureView() if the view uses the same format as the
   original texture, the whole mipmap levels and array slices.

BUG=dawn:16

Change-Id: Ibdfaa122ac061a2e2bb47f76e0030f1d0fc548a2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5780
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2019-03-25 00:54:58 +00:00
..
common Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00
dawn Split off common and libdawn / dawn_headers from BUILD.gn 2019-03-07 01:46:39 +00:00
dawn_native Workaround GL error when creating texture view from external GL textures 2019-03-25 00:54:58 +00:00
dawn_wire Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00
fuzzers Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00
include Metal: Expose function to wait for commands to be scheduled. 2019-03-22 07:36:34 +00:00
tests Metal: Expose function to wait for commands to be scheduled. 2019-03-22 07:36:34 +00:00
utils Capitalize C types dawn -> Dawn 2019-03-11 16:52:42 +00:00