mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-09-12 11:47:48 +02:00
emit_glasm: Enable ARB_draw_buffers when needed
This commit is contained in:
parent
3c06293e20
commit
db2f0f4108
@ -71,7 +71,7 @@ EmitContext::EmitContext(IR::Program& program) {
|
|||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
Add("OUTPUT frag_color0=result.color;");
|
Add("OUTPUT frag_color0=result.color;");
|
||||||
} else {
|
} else {
|
||||||
Add("OUTPUT frag_color{}[]=result.color[{}];", index, index);
|
Add("OUTPUT frag_color{}=result.color[{}];", index, index);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (size_t index = 0; index < program.info.stores_generics.size(); ++index) {
|
for (size_t index = 0; index < program.info.stores_generics.size(); ++index) {
|
||||||
|
@ -283,6 +283,10 @@ void SetupOptions(std::string& header, Info info) {
|
|||||||
if (info.uses_subgroup_shuffles) {
|
if (info.uses_subgroup_shuffles) {
|
||||||
header += "OPTION NV_shader_thread_shuffle;";
|
header += "OPTION NV_shader_thread_shuffle;";
|
||||||
}
|
}
|
||||||
|
const auto non_zero_frag_colors{info.stores_frag_color | std::views::drop(1)};
|
||||||
|
if (std::ranges::find(non_zero_frag_colors, true) != non_zero_frag_colors.end()) {
|
||||||
|
header += "OPTION ARB_draw_buffers;";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string_view StageHeader(Stage stage) {
|
std::string_view StageHeader(Stage stage) {
|
||||||
|
Loading…
Reference in New Issue
Block a user