mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 03:16:54 +02:00
graphics: emit PS5 register object and primitive IDs to RT7
This commit is contained in:
@@ -599,6 +599,15 @@ void CollectShaderInfo(Program& program, ShaderStageInputInfo input_info) {
|
||||
case ShaderType::Mesh: break;
|
||||
case ShaderType::Pixel:
|
||||
CollectPixelInputs(input_info.pixel, info, inputs.per_vertex, inputs.components);
|
||||
if (input_info.pixel->object_primitive_id) {
|
||||
if (std::ranges::any_of(info.outputs, [](const StageOutput& output) {
|
||||
return output.kind == StageOutputKind::Mrt && output.location == 7u;
|
||||
})) {
|
||||
return Fail("explicit MRT7 export overlaps automatic object/primitive ID");
|
||||
}
|
||||
AddBuiltinInput(info, StageInputKind::PrimitiveId);
|
||||
AddOutput(info, StageOutputKind::ObjectPrimitiveId, 0, 7, "out_object_primitive_id");
|
||||
}
|
||||
break;
|
||||
case ShaderType::Compute: CollectComputeInputs(input_info.compute, info); break;
|
||||
default: return Fail("unsupported shader stage for info collection");
|
||||
|
||||
Reference in New Issue
Block a user