Skip to content

Commit 182ec17

Browse files
committed
more const
1 parent df4a3d4 commit 182ec17

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

deps/rpp

rvk/bindings.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ struct Image_Sampled_Array {
124124
VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT;
125125

126126
explicit Image_Sampled_Array() = default;
127-
explicit Image_Sampled_Array(Slice<Image_Sampled<stages_>> images) {
127+
explicit Image_Sampled_Array(Slice<const Image_Sampled<stages_>> images) {
128128
info = images;
129129
}
130130

131-
Slice<Image_Sampled<stages_>> info;
131+
Slice<const Image_Sampled<stages_>> info;
132132

133133
template<Region R>
134134
void write(Vec<VkWriteDescriptorSet, Mregion<R>>& writes) const {
@@ -286,7 +286,7 @@ struct Make {
286286
}
287287
Vec<VkDescriptorSetLayoutBinding, Mregion<R>>& bindings;
288288
Vec<VkDescriptorBindingFlags, Mregion<R>>& flags;
289-
Slice<u32> counts;
289+
Slice<const u32> counts;
290290
};
291291

292292
template<Region R, Binding... Binds>
@@ -303,7 +303,7 @@ struct Write {
303303
struct Binder {
304304
template<Type_List L>
305305
requires(Reflect::All<rvk::Is_Binding, L>)
306-
static Descriptor_Set_Layout make(Arc<rvk::impl::Device, Alloc> device, Slice<u32> counts) {
306+
static Descriptor_Set_Layout make(Arc<rvk::impl::Device, Alloc> device, Slice<const u32> counts) {
307307
constexpr u64 N = Reflect::List_Length<L>;
308308
assert(counts.length() == N || counts.length() == 0);
309309
Region(R) {

rvk/execute.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ using namespace rpp;
1717

1818
template<Type_List L>
1919
requires(Reflect::All<Is_Binding, L>)
20-
Descriptor_Set_Layout make_layout(Slice<u32> counts) {
20+
Descriptor_Set_Layout make_layout(Slice<const u32> counts) {
2121
return impl::Binder::template make<L>(impl::get_device(), counts);
2222
}
2323

rvk/memory.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ u8* Buffer::map() {
431431
return null;
432432
}
433433

434-
void Buffer::write(Slice<u8> data, u64 offset) {
434+
void Buffer::write(Slice<const u8> data, u64 offset) {
435435
assert(buffer);
436436
assert(data.length() + offset <= len);
437437

rvk/memory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ struct Buffer {
169169
u64 gpu_address() const;
170170

171171
u8* map();
172-
void write(Slice<u8> data, u64 offset = 0);
172+
void write(Slice<const u8> data, u64 offset = 0);
173173

174174
void move_from(Commands& commands, Buffer from);
175175
void copy_from(Commands& commands, Buffer& from);

rvk/rvk.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ TLAS build_tlas(Commands& cmds, TLAS::Buffers tlas, Buffer gpu_instances,
627627
return impl::singleton->build_tlas(cmds, move(tlas), move(gpu_instances), cpu_instances);
628628
}
629629

630-
BLAS build_blas(Commands& cmds, BLAS::Buffers blas, Buffer geometry, Slice<BLAS::Offset> offsets) {
630+
BLAS build_blas(Commands& cmds, BLAS::Buffers blas, Buffer geometry, Slice<const BLAS::Offset> offsets) {
631631
return impl::singleton->build_blas(cmds, move(blas), move(geometry), offsets);
632632
}
633633

rvk/shader_loader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void Shader_Loader::trigger(Token token) {
8686
callbacks.get(reloads.get(token))(*this);
8787
}
8888

89-
void Shader_Loader::on_reload(Slice<Shader_Loader::Token> tokens,
89+
void Shader_Loader::on_reload(Slice<const Shader_Loader::Token> tokens,
9090
FunctionN<16, void(Shader_Loader&)> callback) {
9191
assert(device.ok());
9292

rvk/shader_loader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct Shader_Loader {
3131
Async::Task<Token> compile_async(Async::Pool<>& pool, String_View path);
3232

3333
void try_reload();
34-
void on_reload(Slice<Token> shaders, FunctionN<16, void(Shader_Loader&)> callback);
34+
void on_reload(Slice<const Token> shaders, FunctionN<16, void(Shader_Loader&)> callback);
3535
void trigger(Token token);
3636

3737
private:

0 commit comments

Comments
 (0)