Add renderer shader uniform command
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user