aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2019-03-10 15:24:18 +0100
committerAndre Weissflog <floooh@gmail.com>2019-03-10 15:24:18 +0100
commit66fb9b63206e5215bb667a95beff2883ca6ef0da (patch)
treea1a364de0bae867a1ec1825b561beb4bf8c89a3e
parente90adb49824f9c11c0a497f1d26e810255e9c60a (diff)
sokol-gfx: in destroy functions, move trace hook to start of function, fixes #134
-rw-r--r--sokol_gfx.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sokol_gfx.h b/sokol_gfx.h
index d9cd907e..775dacf1 100644
--- a/sokol_gfx.h
+++ b/sokol_gfx.h
@@ -9556,6 +9556,7 @@ SOKOL_API_IMPL sg_pass sg_make_pass(const sg_pass_desc* desc) {
/*-- destroy resource --------------------------------------------------------*/
SOKOL_API_IMPL void sg_destroy_buffer(sg_buffer buf_id) {
+ _SG_TRACE_ARGS(destroy_buffer, buf_id);
_sg_buffer_t* buf = _sg_lookup_buffer(&_sg.pools, buf_id.id);
if (buf) {
if (buf->slot.ctx_id == _sg.active_context.id) {
@@ -9568,10 +9569,10 @@ SOKOL_API_IMPL void sg_destroy_buffer(sg_buffer buf_id) {
_SG_TRACE_NOARGS(err_context_mismatch);
}
}
- _SG_TRACE_ARGS(destroy_buffer, buf_id);
}
SOKOL_API_IMPL void sg_destroy_image(sg_image img_id) {
+ _SG_TRACE_ARGS(destroy_image, img_id);
_sg_image_t* img = _sg_lookup_image(&_sg.pools, img_id.id);
if (img) {
if (img->slot.ctx_id == _sg.active_context.id) {
@@ -9584,10 +9585,10 @@ SOKOL_API_IMPL void sg_destroy_image(sg_image img_id) {
_SG_TRACE_NOARGS(err_context_mismatch);
}
}
- _SG_TRACE_ARGS(destroy_image, img_id);
}
SOKOL_API_IMPL void sg_destroy_shader(sg_shader shd_id) {
+ _SG_TRACE_ARGS(destroy_shader, shd_id);
_sg_shader_t* shd = _sg_lookup_shader(&_sg.pools, shd_id.id);
if (shd) {
if (shd->slot.ctx_id == _sg.active_context.id) {
@@ -9600,10 +9601,10 @@ SOKOL_API_IMPL void sg_destroy_shader(sg_shader shd_id) {
_SG_TRACE_NOARGS(err_context_mismatch);
}
}
- _SG_TRACE_ARGS(destroy_shader, shd_id);
}
SOKOL_API_IMPL void sg_destroy_pipeline(sg_pipeline pip_id) {
+ _SG_TRACE_ARGS(destroy_pipeline, pip_id);
_sg_pipeline_t* pip = _sg_lookup_pipeline(&_sg.pools, pip_id.id);
if (pip) {
if (pip->slot.ctx_id == _sg.active_context.id) {
@@ -9616,10 +9617,10 @@ SOKOL_API_IMPL void sg_destroy_pipeline(sg_pipeline pip_id) {
_SG_TRACE_NOARGS(err_context_mismatch);
}
}
- _SG_TRACE_ARGS(destroy_pipeline, pip_id);
}
SOKOL_API_IMPL void sg_destroy_pass(sg_pass pass_id) {
+ _SG_TRACE_ARGS(destroy_pass, pass_id);
_sg_pass_t* pass = _sg_lookup_pass(&_sg.pools, pass_id.id);
if (pass) {
if (pass->slot.ctx_id == _sg.active_context.id) {
@@ -9632,7 +9633,6 @@ SOKOL_API_IMPL void sg_destroy_pass(sg_pass pass_id) {
_SG_TRACE_NOARGS(err_context_mismatch);
}
}
- _SG_TRACE_ARGS(destroy_pass, pass_id);
}
SOKOL_API_IMPL void sg_begin_default_pass(const sg_pass_action* pass_action, int width, int height) {