mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 07:36:15 +00:00
Change buffer-related sizes/offsets to be uint64_t
Bug: dawn:121 Change-Id: I9d88e2b2b8eff4eda98d25ae0922bc07199a69c7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5720 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
952860bf9f
commit
cf52d711fb
@@ -198,7 +198,7 @@ namespace dawn_native { namespace opengl {
|
||||
void OnSetVertexBuffers(uint32_t startSlot,
|
||||
uint32_t count,
|
||||
Ref<BufferBase>* buffers,
|
||||
uint32_t* offsets) {
|
||||
uint64_t* offsets) {
|
||||
for (uint32_t i = 0; i < count; ++i) {
|
||||
uint32_t slot = startSlot + i;
|
||||
mVertexBuffers[slot] = ToBackend(buffers[i].Get());
|
||||
@@ -234,7 +234,7 @@ namespace dawn_native { namespace opengl {
|
||||
auto attribute = mLastPipeline->GetAttribute(location);
|
||||
|
||||
GLuint buffer = mVertexBuffers[slot]->GetHandle();
|
||||
uint32_t offset = mVertexBufferOffsets[slot];
|
||||
uint64_t offset = mVertexBufferOffsets[slot];
|
||||
|
||||
auto input = mLastPipeline->GetInput(slot);
|
||||
auto components = VertexFormatNumComponents(attribute.format);
|
||||
@@ -258,7 +258,7 @@ namespace dawn_native { namespace opengl {
|
||||
|
||||
std::bitset<kMaxVertexInputs> mDirtyVertexBuffers;
|
||||
std::array<Buffer*, kMaxVertexInputs> mVertexBuffers;
|
||||
std::array<uint32_t, kMaxVertexInputs> mVertexBufferOffsets;
|
||||
std::array<uint64_t, kMaxVertexInputs> mVertexBufferOffsets;
|
||||
|
||||
RenderPipelineBase* mLastPipeline = nullptr;
|
||||
};
|
||||
@@ -692,7 +692,7 @@ namespace dawn_native { namespace opengl {
|
||||
}
|
||||
|
||||
RenderPipeline* lastPipeline = nullptr;
|
||||
uint32_t indexBufferBaseOffset = 0;
|
||||
uint64_t indexBufferBaseOffset = 0;
|
||||
|
||||
PersistentPipelineState persistentPipelineState;
|
||||
|
||||
@@ -815,7 +815,7 @@ namespace dawn_native { namespace opengl {
|
||||
case Command::SetVertexBuffers: {
|
||||
SetVertexBuffersCmd* cmd = mCommands.NextCommand<SetVertexBuffersCmd>();
|
||||
auto buffers = mCommands.NextData<Ref<BufferBase>>(cmd->count);
|
||||
auto offsets = mCommands.NextData<uint32_t>(cmd->count);
|
||||
auto offsets = mCommands.NextData<uint64_t>(cmd->count);
|
||||
inputBuffers.OnSetVertexBuffers(cmd->startSlot, cmd->count, buffers, offsets);
|
||||
} break;
|
||||
|
||||
|
||||
@@ -149,10 +149,10 @@ namespace dawn_native { namespace opengl {
|
||||
}
|
||||
|
||||
MaybeError Device::CopyFromStagingToBuffer(StagingBufferBase* source,
|
||||
uint32_t sourceOffset,
|
||||
uint64_t sourceOffset,
|
||||
BufferBase* destination,
|
||||
uint32_t destinationOffset,
|
||||
uint32_t size) {
|
||||
uint64_t destinationOffset,
|
||||
uint64_t size) {
|
||||
return DAWN_UNIMPLEMENTED_ERROR("Device unable to copy from staging buffer.");
|
||||
}
|
||||
|
||||
|
||||
@@ -49,10 +49,10 @@ namespace dawn_native { namespace opengl {
|
||||
|
||||
ResultOrError<std::unique_ptr<StagingBufferBase>> CreateStagingBuffer(size_t size) override;
|
||||
MaybeError CopyFromStagingToBuffer(StagingBufferBase* source,
|
||||
uint32_t sourceOffset,
|
||||
uint64_t sourceOffset,
|
||||
BufferBase* destination,
|
||||
uint32_t destinationOffset,
|
||||
uint32_t size) override;
|
||||
uint64_t destinationOffset,
|
||||
uint64_t size) override;
|
||||
|
||||
private:
|
||||
ResultOrError<BindGroupBase*> CreateBindGroupImpl(
|
||||
|
||||
Reference in New Issue
Block a user