Hash :
4a835cf2
Author :
Date :
2024-11-01T13:31:00
WebGPU: send uniforms to GPU for use in shader Basic uniforms should now be accessible in the shader during a draw call, rather than just via glGetUniform*(). This is unoptimized and creates a new GPU-side copy of all the uniforms, every time any uniform changes. This sets up the bind group layout for a pipeline and sets the bind groups in the renderer pass. Right now these bind groups only contain the default uniform blocks, but in the future will need to contain textures, samplers, and non-default uniform blocks (UBOs). Bug: angleproject:376553328 Change-Id: I50891b81ab2ee374d674213257f76319c0222120 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5980972 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Liza Burakova <liza@chromium.org> Commit-Queue: Matthew Denton <mpdenton@chromium.org>
//
// Copyright 2024 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// DeviceWgpu.h:
// Defines the class interface for DeviceWgpu, implementing DeviceImpl.
//
#ifndef LIBANGLE_RENDERER_WGPU_DEVICEWGPU_H_
#define LIBANGLE_RENDERER_WGPU_DEVICEWGPU_H_
#include "libANGLE/renderer/DeviceImpl.h"
#include "libANGLE/renderer/wgpu/wgpu_helpers.h"
namespace rx
{
class DeviceWgpu : public DeviceImpl
{
public:
DeviceWgpu();
~DeviceWgpu() override;
egl::Error initialize() override;
egl::Error getAttribute(const egl::Display *display,
EGLint attribute,
void **outValue) override;
void generateExtensions(egl::DeviceExtensions *outExtensions) const override;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_WGPU_DEVICEWGPU_H_