Add separate option to toggle parallel rendering in R_DrawMaskedList

This commit is contained in:
indev committed 2025-07-08 00:36:25 +03:00
1 parent 8d570b7ba3
commit a26867bbdb
4 files changed
+13 -5

No files matched your search

+1
View File
@@ -1026,6 +1026,7 @@ void D_RegisterClientCommands(void)
CV_RegisterVar(&cv_scr_height);
CV_RegisterVar(&cv_parallelsoftware);
CV_RegisterVar(&cv_paralleldrawmasked);
CV_RegisterVar(&cv_soundtest);
+10 -5
View File
@@ -2970,15 +2970,20 @@ static void R_DrawMaskedList(drawnode_t* head)
{
drawspandata_t ds = {};
next = r2->prev;
boolean parallel = cv_parallelsoftware.value && cv_paralleldrawmasked.value;
#ifdef HAVE_THREADS
srb2::ThreadPool::Sema tp_sema;
srb2::g_main_threadpool->begin_sema();
if (parallel)
srb2::g_main_threadpool->begin_sema();
#endif
R_DrawSinglePlane(&ds, r2->plane, cv_parallelsoftware.value);
R_DrawSinglePlane(&ds, r2->plane, parallel);
#ifdef HAVE_THREADS
tp_sema = srb2::g_main_threadpool->end_sema();
srb2::g_main_threadpool->notify_sema(tp_sema);
srb2::g_main_threadpool->wait_sema(tp_sema);
if (parallel)
{
tp_sema = srb2::g_main_threadpool->end_sema();
srb2::g_main_threadpool->notify_sema(tp_sema);
srb2::g_main_threadpool->wait_sema(tp_sema);
}
#endif
R_DoneWithNode(r2);
r2 = next;
+1
View File
@@ -49,6 +49,7 @@ consvar_t cv_vhseffect = {"vhspause", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NU
consvar_t cv_shittyscreen = {"televisionsignal", "Okay", CV_NOSHOWHELP, shittyscreen_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_parallelsoftware = {"parallelsoftware", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_paralleldrawmasked = {"paralleldrawmasked", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t votescale_cons_t[] = {{0, "Vanilla"}, {1, "Adaptive"}, {2, "VerticalFill"}, {3, "HorizontalFill"}, {0, NULL}};
consvar_t cv_votebgscaling = {"votebgscaling", "Adaptive", CV_SAVE, votescale_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
+1
View File
@@ -88,6 +88,7 @@ extern UINT8 *scr_borderpatch; // patch used to fill the view borders
extern consvar_t cv_scr_width, cv_scr_height, cv_renderview, cv_fullscreen, cv_vhseffect, cv_shittyscreen;
extern consvar_t cv_parallelsoftware;
extern consvar_t cv_paralleldrawmasked;
extern consvar_t cv_highreshudscale;
// wait for page flipping to end or not