mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-13 23:26:24 +00:00
Remove Bit from TextureUsageBit and BufferUsageBit
This is to match the naming convention of WebGPU's WebIDL and webgpu.h BUG=dawn:22 Change-Id: Ia91c5a018403e6a72eb0311b5f1a072d102282a2 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10461 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
e25a3aede0
commit
9e9e29f7a6
@@ -64,10 +64,12 @@ void initBuffers() {
|
||||
{0.01, -0.02},
|
||||
{0.00, 0.02},
|
||||
};
|
||||
modelBuffer = utils::CreateBufferFromData(device, model, sizeof(model), dawn::BufferUsageBit::Vertex);
|
||||
modelBuffer =
|
||||
utils::CreateBufferFromData(device, model, sizeof(model), dawn::BufferUsage::Vertex);
|
||||
|
||||
SimParams params = { 0.04f, 0.1f, 0.025f, 0.025f, 0.02f, 0.05f, 0.005f, kNumParticles };
|
||||
updateParams = utils::CreateBufferFromData(device, ¶ms, sizeof(params), dawn::BufferUsageBit::Uniform);
|
||||
updateParams =
|
||||
utils::CreateBufferFromData(device, ¶ms, sizeof(params), dawn::BufferUsage::Uniform);
|
||||
|
||||
std::vector<Particle> initialParticles(kNumParticles);
|
||||
{
|
||||
@@ -83,8 +85,8 @@ void initBuffers() {
|
||||
for (size_t i = 0; i < 2; i++) {
|
||||
dawn::BufferDescriptor descriptor;
|
||||
descriptor.size = sizeof(Particle) * kNumParticles;
|
||||
descriptor.usage = dawn::BufferUsageBit::CopyDst | dawn::BufferUsageBit::Vertex |
|
||||
dawn::BufferUsageBit::Storage;
|
||||
descriptor.usage =
|
||||
dawn::BufferUsage::CopyDst | dawn::BufferUsage::Vertex | dawn::BufferUsage::Storage;
|
||||
particleBuffers[i] = device.CreateBuffer(&descriptor);
|
||||
|
||||
particleBuffers[i].SetSubData(0,
|
||||
@@ -293,8 +295,8 @@ void init() {
|
||||
|
||||
queue = device.CreateQueue();
|
||||
swapchain = GetSwapChain(device);
|
||||
swapchain.Configure(GetPreferredSwapChainTextureFormat(),
|
||||
dawn::TextureUsageBit::OutputAttachment, 640, 480);
|
||||
swapchain.Configure(GetPreferredSwapChainTextureFormat(), dawn::TextureUsage::OutputAttachment,
|
||||
640, 480);
|
||||
|
||||
initBuffers();
|
||||
initRender();
|
||||
|
||||
Reference in New Issue
Block a user