mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 05:57:51 +00:00
dawn_wire: Tag deserialize commands with volatile pointer
This prevents bugs where the compiler assumes a piece of memory will be the same if read from twice. Bug: dawn:230 Change-Id: Ib3358e56b6cf8f1fbf449c5d564ef85c969d695b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11840 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
d561448d0d
commit
8eb8385e2e
@@ -32,7 +32,7 @@ namespace dawn_wire {
|
||||
class DAWN_WIRE_EXPORT CommandHandler {
|
||||
public:
|
||||
virtual ~CommandHandler() = default;
|
||||
virtual const char* HandleCommands(const char* commands, size_t size) = 0;
|
||||
virtual const volatile char* HandleCommands(const volatile char* commands, size_t size) = 0;
|
||||
};
|
||||
|
||||
} // namespace dawn_wire
|
||||
|
||||
@@ -44,7 +44,8 @@ namespace dawn_wire {
|
||||
|
||||
DawnDevice GetDevice() const;
|
||||
DawnProcTable GetProcs() const;
|
||||
const char* HandleCommands(const char* commands, size_t size) override final;
|
||||
const volatile char* HandleCommands(const volatile char* commands,
|
||||
size_t size) override final;
|
||||
|
||||
ReservedTexture ReserveTexture(DawnDevice device);
|
||||
|
||||
|
||||
@@ -38,7 +38,8 @@ namespace dawn_wire {
|
||||
WireServer(const WireServerDescriptor& descriptor);
|
||||
~WireServer();
|
||||
|
||||
const char* HandleCommands(const char* commands, size_t size) override final;
|
||||
const volatile char* HandleCommands(const volatile char* commands,
|
||||
size_t size) override final;
|
||||
|
||||
bool InjectTexture(DawnTexture texture, uint32_t id, uint32_t generation);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user