diff options
| author | Andre Weissflog <floooh@gmail.com> | 2023-08-31 16:54:02 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2023-08-31 16:54:07 +0200 |
| commit | eeb975cf9c1796819ec5578582ea435ac8e9c4fe (patch) | |
| tree | cb88fbd01573b3e359905397dcfa7847e1818719 | |
| parent | e453b7726d7db2d79831d769485d3ea507bbe995 (diff) | |
sg_sampler_type renaming fixes
| -rw-r--r-- | tests/functional/sokol_gfx_test.c | 16 | ||||
| -rw-r--r-- | util/sokol_debugtext.h | 2 | ||||
| -rw-r--r-- | util/sokol_fontstash.h | 2 | ||||
| -rw-r--r-- | util/sokol_gfx_imgui.h | 8 | ||||
| -rw-r--r-- | util/sokol_gl.h | 2 | ||||
| -rw-r--r-- | util/sokol_imgui.h | 2 | ||||
| -rw-r--r-- | util/sokol_nuklear.h | 2 | ||||
| -rw-r--r-- | util/sokol_spine.h | 2 |
8 files changed, 19 insertions, 17 deletions
diff --git a/tests/functional/sokol_gfx_test.c b/tests/functional/sokol_gfx_test.c index 28084e0f..90d460af 100644 --- a/tests/functional/sokol_gfx_test.c +++ b/tests/functional/sokol_gfx_test.c @@ -1064,8 +1064,8 @@ UTEST(sokol_gfx, query_shader_desc) { }, .images[0] = { .used = true, .image_type = SG_IMAGETYPE_2D, .sample_type = SG_IMAGESAMPLETYPE_FLOAT, .multisampled = true }, .images[1] = { .used = true, .image_type = SG_IMAGETYPE_3D, .sample_type = SG_IMAGESAMPLETYPE_SINT }, - .samplers[0] = { .used = true, .sampler_type = SG_SAMPLERTYPE_SAMPLE }, - .samplers[1] = { .used = true, .sampler_type = SG_SAMPLERTYPE_COMPARE }, + .samplers[0] = { .used = true, .sampler_type = SG_SAMPLERTYPE_FILTERING }, + .samplers[1] = { .used = true, .sampler_type = SG_SAMPLERTYPE_COMPARISON }, .image_sampler_pairs[0] = { .used = true, .image_slot = 0, .sampler_slot = 1, .glsl_name = "img0" }, .image_sampler_pairs[1] = { .used = true, .image_slot = 1, .sampler_slot = 0, .glsl_name = "img1" }, }, @@ -1073,8 +1073,8 @@ UTEST(sokol_gfx, query_shader_desc) { .source = "fs_source", .images[0] = { .used = true, .image_type = SG_IMAGETYPE_ARRAY, .sample_type = SG_IMAGESAMPLETYPE_DEPTH }, .images[1] = { .used = true, .image_type = SG_IMAGETYPE_CUBE, .sample_type = SG_IMAGESAMPLETYPE_FLOAT }, - .samplers[0] = { .used = true, .sampler_type = SG_SAMPLERTYPE_COMPARE }, - .samplers[1] = { .used = true, .sampler_type = SG_SAMPLERTYPE_SAMPLE }, + .samplers[0] = { .used = true, .sampler_type = SG_SAMPLERTYPE_COMPARISON }, + .samplers[1] = { .used = true, .sampler_type = SG_SAMPLERTYPE_FILTERING }, .image_sampler_pairs[0] = { .used = true, .image_slot = 0, .sampler_slot = 0, .glsl_name = "img3" }, .image_sampler_pairs[1] = { .used = true, .image_slot = 1, .sampler_slot = 1, .glsl_name = "img4" }, }, @@ -1099,9 +1099,9 @@ UTEST(sokol_gfx, query_shader_desc) { T(s0_desc.vs.images[1].sample_type == SG_IMAGESAMPLETYPE_SINT); T(s0_desc.vs.images[1].multisampled == false); T(s0_desc.vs.samplers[0].used); - T(s0_desc.vs.samplers[0].sampler_type == SG_SAMPLERTYPE_SAMPLE); + T(s0_desc.vs.samplers[0].sampler_type == SG_SAMPLERTYPE_FILTERING); T(s0_desc.vs.samplers[1].used); - T(s0_desc.vs.samplers[1].sampler_type == SG_SAMPLERTYPE_COMPARE); + T(s0_desc.vs.samplers[1].sampler_type == SG_SAMPLERTYPE_COMPARISON); T(s0_desc.vs.image_sampler_pairs[0].used); T(s0_desc.vs.image_sampler_pairs[0].image_slot == 0); T(s0_desc.vs.image_sampler_pairs[0].sampler_slot == 1); @@ -1125,9 +1125,9 @@ UTEST(sokol_gfx, query_shader_desc) { T(s0_desc.fs.images[1].sample_type == SG_IMAGESAMPLETYPE_FLOAT); T(s0_desc.fs.images[1].multisampled == false); T(s0_desc.fs.samplers[0].used); - T(s0_desc.fs.samplers[0].sampler_type == SG_SAMPLERTYPE_COMPARE); + T(s0_desc.fs.samplers[0].sampler_type == SG_SAMPLERTYPE_COMPARISON); T(s0_desc.fs.samplers[1].used); - T(s0_desc.fs.samplers[1].sampler_type == SG_SAMPLERTYPE_SAMPLE); + T(s0_desc.fs.samplers[1].sampler_type == SG_SAMPLERTYPE_FILTERING); T(s0_desc.fs.image_sampler_pairs[0].used); T(s0_desc.fs.image_sampler_pairs[0].image_slot == 0); T(s0_desc.fs.image_sampler_pairs[0].sampler_slot == 0); diff --git a/util/sokol_debugtext.h b/util/sokol_debugtext.h index 4d4ee6e1..b0af45dd 100644 --- a/util/sokol_debugtext.h +++ b/util/sokol_debugtext.h @@ -4007,7 +4007,7 @@ static void _sdtx_setup_common(void) { shd_desc.fs.images[0].image_type = SG_IMAGETYPE_2D; shd_desc.fs.images[0].sample_type = SG_IMAGESAMPLETYPE_FLOAT; shd_desc.fs.samplers[0].used = true; - shd_desc.fs.samplers[0].sampler_type = SG_SAMPLERTYPE_SAMPLE; + shd_desc.fs.samplers[0].sampler_type = SG_SAMPLERTYPE_FILTERING; shd_desc.fs.image_sampler_pairs[0].used = true; shd_desc.fs.image_sampler_pairs[0].image_slot = 0; shd_desc.fs.image_sampler_pairs[0].sampler_slot = 0; diff --git a/util/sokol_fontstash.h b/util/sokol_fontstash.h index 9719e380..46950e45 100644 --- a/util/sokol_fontstash.h +++ b/util/sokol_fontstash.h @@ -1663,7 +1663,7 @@ static int _sfons_render_create(void* user_ptr, int width, int height) { shd_desc.fs.images[0].image_type = SG_IMAGETYPE_2D; shd_desc.fs.images[0].sample_type = SG_IMAGESAMPLETYPE_FLOAT; shd_desc.fs.samplers[0].used = true; - shd_desc.fs.samplers[0].sampler_type = SG_SAMPLERTYPE_SAMPLE; + shd_desc.fs.samplers[0].sampler_type = SG_SAMPLERTYPE_FILTERING; shd_desc.fs.image_sampler_pairs[0].used = true; shd_desc.fs.image_sampler_pairs[0].glsl_name = "tex_smp"; shd_desc.fs.image_sampler_pairs[0].image_slot = 0; diff --git a/util/sokol_gfx_imgui.h b/util/sokol_gfx_imgui.h index f9106f1b..9685331c 100644 --- a/util/sokol_gfx_imgui.h +++ b/util/sokol_gfx_imgui.h @@ -1136,15 +1136,17 @@ _SOKOL_PRIVATE const char* _sg_imgui_imagesampletype_string(sg_image_sample_type case SG_IMAGESAMPLETYPE_DEPTH: return "SG_IMAGESAMPLETYPE_DEPTH"; case SG_IMAGESAMPLETYPE_SINT: return "SG_IMAGESAMPLETYPE_SINT"; case SG_IMAGESAMPLETYPE_UINT: return "SG_IMAGESAMPLETYPE_UINT"; + case SG_IMAGESAMPLETYPE_UNFILTERABLE_FLOAT: return "SG_IMAGESAMPLETYPE_UNFILTERABLE_FLOAT"; default: return "???"; } } _SOKOL_PRIVATE const char* _sg_imgui_samplertype_string(sg_sampler_type t) { switch (t) { - case SG_SAMPLERTYPE_SAMPLE: return "SG_SAMPLERTYPE_SAMPLE"; - case SG_SAMPLERTYPE_COMPARE: return "SG_SAMPLERTYPE_COMPARE"; - default: return "???"; + case SG_SAMPLERTYPE_FILTERING: return "SG_SAMPLERTYPE_FILTERING"; + case SG_SAMPLERTYPE_COMPARISON: return "SG_SAMPLERTYPE_COMPARISON"; + case SG_SAMPLERTYPE_NONFILTERING: return "SG_SAMPLERTYPE_NONFILTERING"; + default: return "???"; } } diff --git a/util/sokol_gl.h b/util/sokol_gl.h index f17da478..7fe1d936 100644 --- a/util/sokol_gl.h +++ b/util/sokol_gl.h @@ -3344,7 +3344,7 @@ static void _sgl_setup_common(void) { shd_desc.fs.images[0].image_type = SG_IMAGETYPE_2D; shd_desc.fs.images[0].sample_type = SG_IMAGESAMPLETYPE_FLOAT; shd_desc.fs.samplers[0].used = true; - shd_desc.fs.samplers[0].sampler_type = SG_SAMPLERTYPE_SAMPLE; + shd_desc.fs.samplers[0].sampler_type = SG_SAMPLERTYPE_FILTERING; shd_desc.fs.image_sampler_pairs[0].used = true; shd_desc.fs.image_sampler_pairs[0].image_slot = 0; shd_desc.fs.image_sampler_pairs[0].sampler_slot = 0; diff --git a/util/sokol_imgui.h b/util/sokol_imgui.h index 024b3761..e8abe7d8 100644 --- a/util/sokol_imgui.h +++ b/util/sokol_imgui.h @@ -2363,7 +2363,7 @@ SOKOL_API_IMPL void simgui_setup(const simgui_desc_t* desc) { shd_desc.fs.images[0].image_type = SG_IMAGETYPE_2D; shd_desc.fs.images[0].sample_type = SG_IMAGESAMPLETYPE_FLOAT; shd_desc.fs.samplers[0].used = true; - shd_desc.fs.samplers[0].sampler_type = SG_SAMPLERTYPE_SAMPLE; + shd_desc.fs.samplers[0].sampler_type = SG_SAMPLERTYPE_FILTERING; shd_desc.fs.image_sampler_pairs[0].used = true; shd_desc.fs.image_sampler_pairs[0].image_slot = 0; shd_desc.fs.image_sampler_pairs[0].sampler_slot = 0; diff --git a/util/sokol_nuklear.h b/util/sokol_nuklear.h index ae4e9ae0..8a5cfb8d 100644 --- a/util/sokol_nuklear.h +++ b/util/sokol_nuklear.h @@ -2293,7 +2293,7 @@ SOKOL_API_IMPL void snk_setup(const snk_desc_t* desc) { .entry = fs_entry, .d3d11_target = "ps_4_0", .images[0] = { .used = true, .image_type = SG_IMAGETYPE_2D, .sample_type = SG_IMAGESAMPLETYPE_FLOAT }, - .samplers[0] = { .used = true, .sampler_type = SG_SAMPLERTYPE_SAMPLE }, + .samplers[0] = { .used = true, .sampler_type = SG_SAMPLERTYPE_FILTERING }, .image_sampler_pairs[0] = { .used = true, .glsl_name = "tex_smp", .image_slot = 0, .sampler_slot = 0 }, }, .label = "sokol-nuklear-shader" diff --git a/util/sokol_spine.h b/util/sokol_spine.h index 5a9125ae..0ca556c8 100644 --- a/util/sokol_spine.h +++ b/util/sokol_spine.h @@ -4521,7 +4521,7 @@ static void _sspine_init_shared(void) { shd_desc.fs.images[0].image_type = SG_IMAGETYPE_2D; shd_desc.fs.images[0].sample_type = SG_IMAGESAMPLETYPE_FLOAT; shd_desc.fs.samplers[0].used = true; - shd_desc.fs.samplers[0].sampler_type = SG_SAMPLERTYPE_SAMPLE; + shd_desc.fs.samplers[0].sampler_type = SG_SAMPLERTYPE_FILTERING; shd_desc.fs.image_sampler_pairs[0].used = true; shd_desc.fs.image_sampler_pairs[0].image_slot = 0; shd_desc.fs.image_sampler_pairs[0].sampler_slot = 0; |