|
@@ -1544,6 +1544,8 @@ static bool update_async_texrender(struct obs_source *source,
|
|
|
const struct obs_source_frame *frame,
|
|
|
gs_texture_t *tex, gs_texrender_t *texrender)
|
|
|
{
|
|
|
+ GS_DEBUG_MARKER_BEGIN(GS_DEBUG_COLOR_CONVERT_FORMAT, "Convert Format");
|
|
|
+
|
|
|
gs_texrender_reset(texrender);
|
|
|
|
|
|
upload_raw_frame(tex, frame);
|
|
@@ -1557,8 +1559,10 @@ static bool update_async_texrender(struct obs_source *source,
|
|
|
gs_technique_t *tech = gs_effect_get_technique(conv,
|
|
|
select_conversion_technique(frame->format));
|
|
|
|
|
|
- if (!gs_texrender_begin(texrender, cx, cy))
|
|
|
+ if (!gs_texrender_begin(texrender, cx, cy)) {
|
|
|
+ GS_DEBUG_MARKER_END();
|
|
|
return false;
|
|
|
+ }
|
|
|
|
|
|
gs_technique_begin(tech);
|
|
|
gs_technique_begin_pass(tech, 0);
|
|
@@ -1586,6 +1590,7 @@ static bool update_async_texrender(struct obs_source *source,
|
|
|
|
|
|
gs_texrender_end(texrender);
|
|
|
|
|
|
+ GS_DEBUG_MARKER_END();
|
|
|
return true;
|
|
|
}
|
|
|
|
|
@@ -1785,6 +1790,24 @@ static inline void obs_source_main_render(obs_source_t *source)
|
|
|
|
|
|
static bool ready_async_frame(obs_source_t *source, uint64_t sys_time);
|
|
|
|
|
|
+#if GS_USE_DEBUG_MARKERS
|
|
|
+static const char *get_type_format(enum obs_source_type type)
|
|
|
+{
|
|
|
+ switch (type) {
|
|
|
+ case OBS_SOURCE_TYPE_INPUT:
|
|
|
+ return "Input: %s";
|
|
|
+ case OBS_SOURCE_TYPE_FILTER:
|
|
|
+ return "Filter: %s";
|
|
|
+ case OBS_SOURCE_TYPE_TRANSITION:
|
|
|
+ return "Transition: %s";
|
|
|
+ case OBS_SOURCE_TYPE_SCENE:
|
|
|
+ return "Scene: %s";
|
|
|
+ default:
|
|
|
+ return "[Unknown]: %s";
|
|
|
+ }
|
|
|
+}
|
|
|
+#endif
|
|
|
+
|
|
|
static inline void render_video(obs_source_t *source)
|
|
|
{
|
|
|
if (source->info.type != OBS_SOURCE_TYPE_FILTER &&
|
|
@@ -1808,6 +1831,10 @@ static inline void render_video(obs_source_t *source)
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+ GS_DEBUG_MARKER_BEGIN_FORMAT(GS_DEBUG_COLOR_SOURCE,
|
|
|
+ get_type_format(source->info.type),
|
|
|
+ obs_source_get_name(source));
|
|
|
+
|
|
|
if (source->filters.num && !source->rendering_filter)
|
|
|
obs_source_render_filters(source);
|
|
|
|
|
@@ -1822,6 +1849,8 @@ static inline void render_video(obs_source_t *source)
|
|
|
|
|
|
else
|
|
|
obs_source_render_async_video(source);
|
|
|
+
|
|
|
+ GS_DEBUG_MARKER_END();
|
|
|
}
|
|
|
|
|
|
void obs_source_video_render(obs_source_t *source)
|