shader: unify stage input metadata

This commit is contained in:
nmzik
2026-08-17 02:23:47 +02:00
parent 5ea92d95a7
commit 0f3540b1ff
16 changed files with 278 additions and 407 deletions
+6
View File
@@ -128,6 +128,12 @@ struct ShaderPixelInputInfo {
bool HasPositionInput() const { return ps_pos_x || ps_pos_y || ps_pos_z || ps_pos_w; }
};
union ShaderStageInputInfo {
const ShaderVertexInputInfo* vertex;
const ShaderPixelInputInfo* pixel;
const ShaderComputeInputInfo* compute = nullptr;
};
uint32_t ShaderPixelParameterMappedLocation(const ShaderPixelInputInfo& info, uint32_t input);
uint32_t ShaderPixelParameterLocation(const ShaderPixelInputInfo& info,
std::span<const uint32_t> active_inputs, uint32_t input);