|
@@ -1525,6 +1525,26 @@ gs_indexbuffer_t *gs_indexbuffer_create(enum gs_index_type type, void *indices,
|
|
graphics->device, type, indices, num, flags);
|
|
graphics->device, type, indices, num, flags);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+gs_timer_t *gs_timer_create()
|
|
|
|
+{
|
|
|
|
+ graphics_t *graphics = thread_graphics;
|
|
|
|
+
|
|
|
|
+ if (!gs_valid("gs_timer_create"))
|
|
|
|
+ return NULL;
|
|
|
|
+
|
|
|
|
+ return graphics->exports.device_timer_create(graphics->device);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+gs_timer_range_t *gs_timer_range_create()
|
|
|
|
+{
|
|
|
|
+ graphics_t *graphics = thread_graphics;
|
|
|
|
+
|
|
|
|
+ if (!gs_valid("gs_timer_range_create"))
|
|
|
|
+ return NULL;
|
|
|
|
+
|
|
|
|
+ return graphics->exports.device_timer_range_create(graphics->device);
|
|
|
|
+}
|
|
|
|
+
|
|
enum gs_texture_type gs_get_texture_type(const gs_texture_t *texture)
|
|
enum gs_texture_type gs_get_texture_type(const gs_texture_t *texture)
|
|
{
|
|
{
|
|
graphics_t *graphics = thread_graphics;
|
|
graphics_t *graphics = thread_graphics;
|
|
@@ -2543,6 +2563,96 @@ enum gs_index_type gs_indexbuffer_get_type(const gs_indexbuffer_t *indexbuffer)
|
|
return thread_graphics->exports.gs_indexbuffer_get_type(indexbuffer);
|
|
return thread_graphics->exports.gs_indexbuffer_get_type(indexbuffer);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void gs_timer_destroy(gs_timer_t *timer)
|
|
|
|
+{
|
|
|
|
+ graphics_t *graphics = thread_graphics;
|
|
|
|
+
|
|
|
|
+ if (!gs_valid("gs_timer_destroy"))
|
|
|
|
+ return;
|
|
|
|
+ if (!timer)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ graphics->exports.gs_timer_destroy(timer);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void gs_timer_begin(gs_timer_t *timer)
|
|
|
|
+{
|
|
|
|
+ graphics_t *graphics = thread_graphics;
|
|
|
|
+
|
|
|
|
+ if (!gs_valid("gs_timer_begin"))
|
|
|
|
+ return;
|
|
|
|
+ if (!timer)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ graphics->exports.gs_timer_begin(timer);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void gs_timer_end(gs_timer_t *timer)
|
|
|
|
+{
|
|
|
|
+ graphics_t *graphics = thread_graphics;
|
|
|
|
+
|
|
|
|
+ if (!gs_valid("gs_timer_end"))
|
|
|
|
+ return;
|
|
|
|
+ if (!timer)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ graphics->exports.gs_timer_end(timer);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+bool gs_timer_get_data(gs_timer_t *timer, uint64_t *ticks)
|
|
|
|
+{
|
|
|
|
+ if (!gs_valid_p2("gs_timer_get_data", timer, ticks))
|
|
|
|
+ return false;
|
|
|
|
+
|
|
|
|
+ return thread_graphics->exports.gs_timer_get_data(timer, ticks);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void gs_timer_range_destroy(gs_timer_range_t *range)
|
|
|
|
+{
|
|
|
|
+ graphics_t *graphics = thread_graphics;
|
|
|
|
+
|
|
|
|
+ if (!gs_valid("gs_timer_range_destroy"))
|
|
|
|
+ return;
|
|
|
|
+ if (!range)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ graphics->exports.gs_timer_range_destroy(range);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void gs_timer_range_begin(gs_timer_range_t *range)
|
|
|
|
+{
|
|
|
|
+ graphics_t *graphics = thread_graphics;
|
|
|
|
+
|
|
|
|
+ if (!gs_valid("gs_timer_range_begin"))
|
|
|
|
+ return;
|
|
|
|
+ if (!range)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ graphics->exports.gs_timer_range_begin(range);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+void gs_timer_range_end(gs_timer_range_t *range)
|
|
|
|
+{
|
|
|
|
+ graphics_t *graphics = thread_graphics;
|
|
|
|
+
|
|
|
|
+ if (!gs_valid("gs_timer_range_end"))
|
|
|
|
+ return;
|
|
|
|
+ if (!range)
|
|
|
|
+ return;
|
|
|
|
+
|
|
|
|
+ graphics->exports.gs_timer_range_end(range);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+bool gs_timer_range_get_data(gs_timer_range_t *range, bool *disjoint,
|
|
|
|
+ uint64_t *frequency)
|
|
|
|
+{
|
|
|
|
+ if (!gs_valid_p2("gs_timer_range_get_data", disjoint, frequency))
|
|
|
|
+ return false;
|
|
|
|
+
|
|
|
|
+ return thread_graphics->exports.gs_timer_range_get_data(range, disjoint,
|
|
|
|
+ frequency);
|
|
|
|
+}
|
|
|
|
+
|
|
bool gs_nv12_available(void)
|
|
bool gs_nv12_available(void)
|
|
{
|
|
{
|
|
if (!gs_valid("gs_nv12_available"))
|
|
if (!gs_valid("gs_nv12_available"))
|