graphics: route compact color exports through CB_SHADER_MASK

This commit is contained in:
Claxten
2026-10-07 18:22:46 +04:00
committed by nmzik
parent 3ba6ebae81
commit 21a1346e27
7 changed files with 92 additions and 35 deletions
+14
View File
@@ -13023,9 +13023,23 @@ void TestRenderTargetReverseExportMapping() {
"inactive reverse MRT mapping was not normalized out of the shader "
"cache key");
sh.target_output_mode[0] = 4;
sh.m_cbShaderMask = 0xf;
PrepareProgram(regs, sh, mappings, compiled_info);
Check(compiled_info.target_export_mapping[0] == gr32.export_mapping,
"active reverse MRT mapping was lost before shader specialization");
const auto first_slot_key = MakeStageStaticKey(compiled_info);
sh.m_cbShaderMask = 0xf000;
mappings[3] = gr32.export_mapping;
PrepareProgram(regs, sh, mappings, compiled_info);
Check(compiled_info.target_shader_mask == sh.m_cbShaderMask &&
compiled_info.target_export_mapping[0] == gr32.export_mapping &&
first_slot_key != MakeStageStaticKey(compiled_info),
"compact MRT ordinal lost its physical export mapping or cache identity");
const auto sparse_slot_key = MakeStageStaticKey(compiled_info);
sh.m_cbShaderMask = 0x1000;
PrepareProgram(regs, sh, mappings, compiled_info);
Check(sparse_slot_key == MakeStageStaticKey(compiled_info),
"component-only shader mask changes introduced a duplicate shader variant");
}
void TestBlendMappingClassification() {