Add renderer shader uniform command

This commit is contained in:
2026-06-02 16:15:23 +02:00
parent 23c308db1b
commit 8232b0efc8
9 changed files with 189 additions and 21 deletions

View File

@@ -348,6 +348,25 @@ pp::foundation::Status validate_shader_program_desc(ShaderProgramDesc desc) noex
return pp::foundation::Status::success();
}
pp::foundation::Status validate_shader_uniform_write(
const char* name,
std::span<const std::byte> bytes) noexcept
{
if (is_empty_c_string(name)) {
return pp::foundation::Status::invalid_argument("shader uniform name must not be empty");
}
if (bytes.empty()) {
return pp::foundation::Status::invalid_argument("shader uniform bytes must not be empty");
}
if (bytes.size() > max_shader_uniform_bytes) {
return pp::foundation::Status::out_of_range("shader uniform bytes exceed the configured limit");
}
return pp::foundation::Status::success();
}
pp::foundation::Status validate_readback_region(TextureDesc desc, ReadbackRegion region) noexcept
{
const auto extent_status = validate_extent(desc.extent);