mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +00:00
Make SetSubData take size in uint8_t not uint32_t.
Also change data pointer to uint8_t*. Add a test for a non-aligned SetSubData(). Implemented on all backends.
This commit is contained in:
committed by
Corentin Wallez
parent
ee66f25c4f
commit
e5ae3274a3
@@ -30,9 +30,9 @@ namespace backend { namespace opengl {
|
||||
return mBuffer;
|
||||
}
|
||||
|
||||
void Buffer::SetSubDataImpl(uint32_t start, uint32_t count, const uint32_t* data) {
|
||||
void Buffer::SetSubDataImpl(uint32_t start, uint32_t count, const uint8_t* data) {
|
||||
glBindBuffer(GL_ARRAY_BUFFER, mBuffer);
|
||||
glBufferSubData(GL_ARRAY_BUFFER, start * sizeof(uint32_t), count * sizeof(uint32_t), data);
|
||||
glBufferSubData(GL_ARRAY_BUFFER, start, count, data);
|
||||
}
|
||||
|
||||
void Buffer::MapReadAsyncImpl(uint32_t serial, uint32_t start, uint32_t count) {
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace backend { namespace opengl {
|
||||
GLuint GetHandle() const;
|
||||
|
||||
private:
|
||||
void SetSubDataImpl(uint32_t start, uint32_t count, const uint32_t* data) override;
|
||||
void SetSubDataImpl(uint32_t start, uint32_t count, const uint8_t* data) override;
|
||||
void MapReadAsyncImpl(uint32_t serial, uint32_t start, uint32_t count) override;
|
||||
void MapWriteAsyncImpl(uint32_t serial, uint32_t start, uint32_t count) override;
|
||||
void UnmapImpl() override;
|
||||
|
||||
Reference in New Issue
Block a user