Unify render pass & compute pass timestamp writes in wgpu
This commit is contained in:
parent
2f781525d7
commit
c3f48fdbc0
3 changed files with 19 additions and 14 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
#include <psemek/wgpu/buffer.hpp>
|
#include <psemek/wgpu/buffer.hpp>
|
||||||
#include <psemek/wgpu/bind_group.hpp>
|
#include <psemek/wgpu/bind_group.hpp>
|
||||||
#include <psemek/wgpu/compute_pipeline.hpp>
|
#include <psemek/wgpu/compute_pipeline.hpp>
|
||||||
|
#include <psemek/wgpu/timestamp_writes.hpp>
|
||||||
#include <psemek/math/vector.hpp>
|
#include <psemek/math/vector.hpp>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
@ -19,13 +20,6 @@ namespace psemek::wgpu
|
||||||
{
|
{
|
||||||
using detail::object<compute_pass_encoder>::object;
|
using detail::object<compute_pass_encoder>::object;
|
||||||
|
|
||||||
struct timestamp_writes
|
|
||||||
{
|
|
||||||
struct query_set query_set;
|
|
||||||
uint32_t begin_index;
|
|
||||||
uint32_t end_index;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct descriptor
|
struct descriptor
|
||||||
{
|
{
|
||||||
std::vector<chained_struct> chain = {};
|
std::vector<chained_struct> chain = {};
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
#include <psemek/wgpu/render_pipeline.hpp>
|
#include <psemek/wgpu/render_pipeline.hpp>
|
||||||
#include <psemek/wgpu/render_bundle.hpp>
|
#include <psemek/wgpu/render_bundle.hpp>
|
||||||
#include <psemek/wgpu/detail/object.hpp>
|
#include <psemek/wgpu/detail/object.hpp>
|
||||||
|
#include <psemek/wgpu/timestamp_writes.hpp>
|
||||||
#include <psemek/math/vector.hpp>
|
#include <psemek/math/vector.hpp>
|
||||||
#include <psemek/math/box.hpp>
|
#include <psemek/math/box.hpp>
|
||||||
|
|
||||||
|
|
@ -61,13 +62,6 @@ namespace psemek::wgpu
|
||||||
bool stencil_read_only;
|
bool stencil_read_only;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct timestamp_writes
|
|
||||||
{
|
|
||||||
struct query_set query_set;
|
|
||||||
std::uint32_t begin_index;
|
|
||||||
std::uint32_t end_index;
|
|
||||||
};
|
|
||||||
|
|
||||||
struct descriptor
|
struct descriptor
|
||||||
{
|
{
|
||||||
std::vector<chained_struct> chain = {};
|
std::vector<chained_struct> chain = {};
|
||||||
|
|
|
||||||
17
libs/wgpu/include/psemek/wgpu/timestamp_writes.hpp
Normal file
17
libs/wgpu/include/psemek/wgpu/timestamp_writes.hpp
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <psemek/wgpu/query_set.hpp>
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
|
namespace psemek::wgpu
|
||||||
|
{
|
||||||
|
|
||||||
|
struct timestamp_writes
|
||||||
|
{
|
||||||
|
struct query_set query_set;
|
||||||
|
std::uint32_t begin_index;
|
||||||
|
std::uint32_t end_index;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue