dawn-cmake/src/utils/CMakeLists.txt
Jiawei Shao 971a6233c2 Validate the declaration of storage texture format in shader
This patch adds the validation on the storage texture format declared in
shaders when we create a rendering or compute pipeline with read-only or
write-only storage textures.

This patch also fixes a typo in the TextureValidationTest.

BUG=dawn:267
TEST=dawn_unittests

Change-Id: Id302b4b7803d7e03b57c61de1290cc71ba940e2c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/16940
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-03-17 10:28:07 +00:00

81 lines
2.2 KiB
CMake

# Copyright 2020 The Dawn Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
add_library(dawn_utils STATIC ${DAWN_DUMMY_FILE})
target_sources(dawn_utils PRIVATE
"BackendBinding.cpp"
"BackendBinding.h"
"ComboRenderBundleEncoderDescriptor.cpp"
"ComboRenderBundleEncoderDescriptor.h"
"ComboRenderPipelineDescriptor.cpp"
"ComboRenderPipelineDescriptor.h"
"GLFWUtils.cpp"
"GLFWUtils.h"
"SystemUtils.cpp"
"SystemUtils.h"
"TerribleCommandBuffer.cpp"
"TerribleCommandBuffer.h"
"TextureFormatUtils.cpp"
"TextureFormatUtils.h"
"Timer.h"
"WGPUHelpers.cpp"
"WGPUHelpers.h"
)
target_link_libraries(dawn_utils
PUBLIC dawncpp_headers
PRIVATE dawn_internal_config
dawn_common
dawn_native
dawn_wire
shaderc
glfw
)
if(WIN32)
target_sources(dawn_utils PRIVATE "WindowsTimer.cpp")
elseif(APPLE)
target_sources(dawn_utils PRIVATE
"OSXTimer.cpp"
"ObjCUtils.h"
"ObjCUtils.mm"
)
target_link_libraries(dawn_utils PRIVATE "-framework QuartzCore")
elseif(UNIX)
target_sources(dawn_utils PRIVATE "PosixTimer.cpp")
endif()
if (DAWN_ENABLE_D3D12)
target_sources(dawn_utils PRIVATE "D3D12Binding.cpp")
endif()
if (DAWN_ENABLE_METAL)
target_sources(dawn_utils PRIVATE
"GLFWUtils_metal.mm"
"MetalBinding.mm"
)
target_link_libraries(dawn_utils PRIVATE "-framework Metal")
endif()
if (DAWN_ENABLE_NULL)
target_sources(dawn_utils PRIVATE "NullBinding.cpp")
endif()
if (DAWN_ENABLE_OPENGL)
target_sources(dawn_utils PRIVATE "OpenGLBinding.cpp")
endif()
if (DAWN_ENABLE_VULKAN)
target_sources(dawn_utils PRIVATE "VulkanBinding.cpp")
endif()