Add index format tests.

This commit is contained in:
Corentin Wallez
2017-09-29 11:04:15 -04:00
committed by Corentin Wallez
parent a43b1566e6
commit 6225a72fb7
3 changed files with 275 additions and 0 deletions

View File

@@ -14,10 +14,16 @@
#include <nxt/nxtcpp.h>
#include <initializer_list>
namespace utils {
void FillShaderModuleBuilder(const nxt::ShaderModuleBuilder& builder, nxt::ShaderStage stage, const char* source);
nxt::ShaderModule CreateShaderModule(const nxt::Device& device, nxt::ShaderStage stage, const char* source);
nxt::Buffer CreateFrozenBufferFromData(const nxt::Device& device, const void* data, uint32_t size, nxt::BufferUsageBit usage);
template<typename T>
nxt::Buffer CreateFrozenBufferFromData(const nxt::Device& device, nxt::BufferUsageBit usage, std::initializer_list<T> data) {
return CreateFrozenBufferFromData(device, data.begin(), uint32_t(sizeof(T) * data.size()), usage);
}
}