diff options
Diffstat (limited to 'video.hpp')
-rw-r--r-- | video.hpp | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -44,7 +44,7 @@ struct Sampler_Id : public Primitive_Id<uint32_t> { using Primitive_Id<uint32_t>::Primitive_Id; }; -#define descriptor_payload_size 8 +#define descriptor_payload_size 16 struct Descriptor { enum class Type { @@ -61,6 +61,7 @@ struct Texture_Descriptor { }; struct Constant_Buffer_Descriptor { + int offset, size; Buffer_Id buffer; }; @@ -146,6 +147,8 @@ struct Pipeline { Constant_Buffer_Descriptor* cb = (Constant_Buffer_Descriptor*)b.payload; if (ca->buffer != cb->buffer) return false; + if (ca->size != cb->size) return false; + if (ca->offset != cb->offset) return false; } break; } } @@ -254,7 +257,12 @@ struct Pipeline_Builder { void shader(Shader_Id s); void vertex_format(Vertex_Format_Id vf); void texture(int binding, Texture_Id t, Sampler_Id s); - void cbuffer(int binding, Buffer_Id id); + void cbuffer( + int binding, + Buffer_Id id, + int offset = 0, + int size = 0 + ); Pipeline& build(); void validate(); }; |