mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 07:36:15 +00:00
Refactor TransitionUsage to use abstract TransitionUsageImpl
This commit is contained in:
@@ -325,7 +325,7 @@ namespace opengl {
|
||||
{
|
||||
TransitionBufferUsageCmd* cmd = commands.NextCommand<TransitionBufferUsageCmd>();
|
||||
|
||||
cmd->buffer->TransitionUsageImpl(cmd->usage);
|
||||
cmd->buffer->UpdateUsageInternal(cmd->usage);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -333,7 +333,7 @@ namespace opengl {
|
||||
{
|
||||
TransitionTextureUsageCmd* cmd = commands.NextCommand<TransitionTextureUsageCmd>();
|
||||
|
||||
cmd->texture->TransitionUsageImpl(cmd->usage);
|
||||
cmd->texture->UpdateUsageInternal(cmd->usage);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -141,6 +141,9 @@ namespace opengl {
|
||||
// TODO(cwallez@chromium.org): Implement Map Read for the GL backend
|
||||
}
|
||||
|
||||
void Buffer::TransitionUsageImpl(nxt::BufferUsageBit currentUsage, nxt::BufferUsageBit targetUsage) {
|
||||
}
|
||||
|
||||
// BufferView
|
||||
|
||||
BufferView::BufferView(Device* device, BufferViewBuilder* builder)
|
||||
|
||||
@@ -128,6 +128,7 @@ namespace opengl {
|
||||
void SetSubDataImpl(uint32_t start, uint32_t count, const uint32_t* data) override;
|
||||
void MapReadAsyncImpl(uint32_t serial, uint32_t start, uint32_t count) override;
|
||||
void UnmapImpl() override;
|
||||
void TransitionUsageImpl(nxt::BufferUsageBit currentUsage, nxt::BufferUsageBit targetUsage) override;
|
||||
|
||||
Device* device;
|
||||
GLuint buffer = 0;
|
||||
|
||||
@@ -76,6 +76,9 @@ namespace opengl {
|
||||
return GetGLFormatInfo(GetFormat());
|
||||
}
|
||||
|
||||
void Texture::TransitionUsageImpl(nxt::TextureUsageBit currentUsage, nxt::TextureUsageBit targetUsage) {
|
||||
}
|
||||
|
||||
// TextureView
|
||||
|
||||
TextureView::TextureView(Device* device, TextureViewBuilder* builder)
|
||||
|
||||
@@ -39,6 +39,8 @@ namespace opengl {
|
||||
TextureFormatInfo GetGLFormat() const;
|
||||
|
||||
private:
|
||||
void TransitionUsageImpl(nxt::TextureUsageBit currentUsage, nxt::TextureUsageBit targetUsage) override;
|
||||
|
||||
Device* device;
|
||||
GLuint handle;
|
||||
GLenum target;
|
||||
|
||||
Reference in New Issue
Block a user