mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-19 01:46:35 +00:00
Reland "dawn_native: Indirect draw/dispatch"
This is a reland of 7eb6be186b
Fixes casting issue on 32 bit machines
Original change's description:
> dawn_native: Indirect draw/dispatch
>
> Adds indirect draw and dispatch for all backends (without validation).
>
> Tests for opengl negative offset are skipped since there is no easy
> way to add the index buffer offset. Current idea is to use a compute
> shader to modify the indirect draw buffer.
>
> Change-Id: I1d3eec7c699b211423f4b911769cca17bfbcd045
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7481
> Commit-Queue: Idan Raiter <idanr@google.com>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Change-Id: Id28c5658ee18ec5c030f721fb44d9f11ebe21ff9
Bug:dawn:54,chromium:972358
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7961
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Idan Raiter <idanr@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
9d4d3eac14
commit
05f7ad5ac8
@@ -58,6 +58,10 @@ namespace dawn_native {
|
||||
DispatchCmd* dispatch = commands->NextCommand<DispatchCmd>();
|
||||
dispatch->~DispatchCmd();
|
||||
} break;
|
||||
case Command::DispatchIndirect: {
|
||||
DispatchIndirectCmd* dispatch = commands->NextCommand<DispatchIndirectCmd>();
|
||||
dispatch->~DispatchIndirectCmd();
|
||||
} break;
|
||||
case Command::Draw: {
|
||||
DrawCmd* draw = commands->NextCommand<DrawCmd>();
|
||||
draw->~DrawCmd();
|
||||
@@ -66,6 +70,14 @@ namespace dawn_native {
|
||||
DrawIndexedCmd* draw = commands->NextCommand<DrawIndexedCmd>();
|
||||
draw->~DrawIndexedCmd();
|
||||
} break;
|
||||
case Command::DrawIndirect: {
|
||||
DrawIndirectCmd* draw = commands->NextCommand<DrawIndirectCmd>();
|
||||
draw->~DrawIndirectCmd();
|
||||
} break;
|
||||
case Command::DrawIndexedIndirect: {
|
||||
DrawIndexedIndirectCmd* draw = commands->NextCommand<DrawIndexedIndirectCmd>();
|
||||
draw->~DrawIndexedIndirectCmd();
|
||||
} break;
|
||||
case Command::EndComputePass: {
|
||||
EndComputePassCmd* cmd = commands->NextCommand<EndComputePassCmd>();
|
||||
cmd->~EndComputePassCmd();
|
||||
@@ -163,6 +175,10 @@ namespace dawn_native {
|
||||
commands->NextCommand<DispatchCmd>();
|
||||
break;
|
||||
|
||||
case Command::DispatchIndirect:
|
||||
commands->NextCommand<DispatchIndirectCmd>();
|
||||
break;
|
||||
|
||||
case Command::Draw:
|
||||
commands->NextCommand<DrawCmd>();
|
||||
break;
|
||||
@@ -171,6 +187,14 @@ namespace dawn_native {
|
||||
commands->NextCommand<DrawIndexedCmd>();
|
||||
break;
|
||||
|
||||
case Command::DrawIndirect:
|
||||
commands->NextCommand<DrawIndirectCmd>();
|
||||
break;
|
||||
|
||||
case Command::DrawIndexedIndirect:
|
||||
commands->NextCommand<DrawIndexedIndirectCmd>();
|
||||
break;
|
||||
|
||||
case Command::EndComputePass:
|
||||
commands->NextCommand<EndComputePassCmd>();
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user