Skip to content

Commit

Permalink
sokol_gfx.h: fix msvc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Oct 1, 2023
1 parent c2a5d97 commit 79f70be
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sokol_gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -17147,7 +17147,7 @@ SOKOL_API_IMPL void sg_apply_uniforms(sg_shader_stage stage, int ub_index, const
SOKOL_ASSERT((ub_index >= 0) && (ub_index < SG_MAX_SHADERSTAGE_UBS));
SOKOL_ASSERT(data && data->ptr && (data->size > 0));
_sg.stats.num_apply_uniforms++;
_sg.stats.size_apply_uniforms += data->size;
_sg.stats.size_apply_uniforms += (uint32_t)data->size;
if (!_sg_validate_apply_uniforms(stage, ub_index, data)) {
_sg.next_draw_valid = false;
return;
Expand Down Expand Up @@ -17226,7 +17226,7 @@ SOKOL_API_IMPL void sg_update_buffer(sg_buffer buf_id, const sg_range* data) {
SOKOL_ASSERT(_sg.valid);
SOKOL_ASSERT(data && data->ptr && (data->size > 0));
_sg.stats.num_update_buffer++;
_sg.stats.size_update_buffer += data->size;
_sg.stats.size_update_buffer += (uint32_t)data->size;
_sg_buffer_t* buf = _sg_lookup_buffer(&_sg.pools, buf_id.id);
if ((data->size > 0) && buf && (buf->slot.state == SG_RESOURCESTATE_VALID)) {
if (_sg_validate_update_buffer(buf, data)) {
Expand All @@ -17246,7 +17246,7 @@ SOKOL_API_IMPL int sg_append_buffer(sg_buffer buf_id, const sg_range* data) {
SOKOL_ASSERT(_sg.valid);
SOKOL_ASSERT(data && data->ptr);
_sg.stats.num_append_buffer++;
_sg.stats.size_append_buffer += data->size;
_sg.stats.size_append_buffer += (uint32_t)data->size;
_sg_buffer_t* buf = _sg_lookup_buffer(&_sg.pools, buf_id.id);
int result;
if (buf) {
Expand Down Expand Up @@ -17314,7 +17314,7 @@ SOKOL_API_IMPL void sg_update_image(sg_image img_id, const sg_image_data* data)
if (data->subimage[face_index][mip_index].size == 0) {
break;
}
_sg.stats.size_update_image += data->subimage[face_index][mip_index].size;
_sg.stats.size_update_image += (uint32_t)data->subimage[face_index][mip_index].size;
}
}
_sg_image_t* img = _sg_lookup_image(&_sg.pools, img_id.id);
Expand Down

0 comments on commit 79f70be

Please sign in to comment.