mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Generate uniform IO slot.
This commit is contained in:
parent
36373c0e04
commit
58c4d7ea73
@ -26,6 +26,22 @@ struct {{camel_case(shader_name)}}{{camel_case(shader_stage)}}Info {
|
||||
static constexpr std::string_view kEntrypointName = "{{entrypoint}}";
|
||||
static constexpr ShaderStage kShaderStage = {{to_shader_stage(shader_stage)}};
|
||||
|
||||
// ===========================================================================
|
||||
// Stage Uniforms ============================================================
|
||||
// ===========================================================================
|
||||
|
||||
{% for uniform in uniform_buffers %}
|
||||
|
||||
static constexpr auto kUniform{{camel_case(uniform.name)}} = ShaderStageIOSlot { // {{uniform.name}}
|
||||
"{{uniform.name}}", // name
|
||||
{{uniform.location}}u, // attribute location
|
||||
{{uniform.type.type_name}}, // type
|
||||
{{uniform.type.bit_width}}u, // bit width of type
|
||||
{{uniform.type.vec_size}}u, // vec size
|
||||
{{uniform.type.columns}}u // number of columns
|
||||
};
|
||||
{% endfor %}
|
||||
|
||||
// ===========================================================================
|
||||
// Stage Inputs ==============================================================
|
||||
// ===========================================================================
|
||||
|
||||
@ -47,7 +47,7 @@ BoxPrimitive::BoxPrimitive(std::shared_ptr<Context> context)
|
||||
|
||||
{
|
||||
// Configure the stencil attachment.
|
||||
// TODO(wip): Make this configurable if possible as the D32 compoment is
|
||||
// TODO(wip): Make this configurable if possible as the D32 component is
|
||||
// wasted.
|
||||
const auto combined_depth_stencil_format =
|
||||
PixelFormat::kPixelFormat_D32_Float_S8_UNormInt;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user