diff options
| author | Andre Weissflog <floooh@gmail.com> | 2023-05-15 15:29:34 +0200 |
|---|---|---|
| committer | Andre Weissflog <floooh@gmail.com> | 2023-05-15 15:29:34 +0200 |
| commit | 14682c92eca522697a29f3a4d8555c2edd756f80 (patch) | |
| tree | e33da61f0918935b019cb16300dd8b68035f3f4c /tests/functional | |
| parent | d6ed838b633cae86a46e2d522a652ad5d4633d7f (diff) | |
update sokol-gfx tests
Diffstat (limited to 'tests/functional')
| -rw-r--r-- | tests/functional/sokol_gfx_test.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/functional/sokol_gfx_test.c b/tests/functional/sokol_gfx_test.c index f0fb5501..1f526d06 100644 --- a/tests/functional/sokol_gfx_test.c +++ b/tests/functional/sokol_gfx_test.c @@ -42,7 +42,7 @@ static sg_buffer create_buffer(void) { static sg_image create_image(void) { return sg_make_image(&(sg_image_desc){ - .render_target = true, + .render_attachment = true, .width = 256, .height = 128 }); @@ -63,7 +63,7 @@ static sg_pipeline create_pipeline(void) { static sg_pass create_pass(void) { sg_image_desc img_desc = { - .render_target = true, + .render_attachment = true, .width = 128, .height = 128, }; @@ -355,7 +355,7 @@ UTEST(sokol_gfx, make_destroy_images) { T(imgptr->slot.ctx_id == _sg.active_context.id); T(imgptr->slot.state == SG_RESOURCESTATE_VALID); T(imgptr->cmn.type == SG_IMAGETYPE_2D); - T(!imgptr->cmn.render_target); + T(!imgptr->cmn.render_attachment); T(imgptr->cmn.width == 8); T(imgptr->cmn.height == 8); T(imgptr->cmn.num_slices == 1); @@ -479,7 +479,7 @@ UTEST(sokol_gfx, make_destroy_passes) { sg_pass pass[3] = { {0} }; sg_image_desc img_desc = { - .render_target = true, + .render_attachment = true, .width = 128, .height = 128, }; @@ -559,7 +559,7 @@ UTEST(sokol_gfx, query_image_defaults) { setup(&(sg_desc){0}); const sg_image_desc desc = sg_query_image_defaults(&(sg_image_desc){0}); T(desc.type == SG_IMAGETYPE_2D); - T(!desc.render_target); + T(!desc.render_attachment); T(desc.num_mipmaps == 1); T(desc.usage == SG_USAGE_IMMUTABLE); T(desc.pixel_format == SG_PIXELFORMAT_RGBA8); @@ -751,7 +751,7 @@ UTEST(sokol_gfx, query_buffer_info) { UTEST(sokol_gfx, query_image_info) { setup(&(sg_desc){0}); sg_image img = sg_make_image(&(sg_image_desc){ - .render_target = true, + .render_attachment = true, .width = 256, .height = 128 }); @@ -798,7 +798,7 @@ UTEST(sokol_gfx, query_pipeline_info) { UTEST(sokol_gfx, query_pass_info) { setup(&(sg_desc){0}); sg_image_desc img_desc = { - .render_target = true, + .render_attachment = true, .width = 128, .height = 128, }; @@ -888,7 +888,7 @@ UTEST(sokol_gfx, query_image_desc) { }); const sg_image_desc i0_desc = sg_query_image_desc(i0); T(i0_desc.type == SG_IMAGETYPE_2D); - T(i0_desc.render_target == false); + T(i0_desc.render_attachment == false); T(i0_desc.width == 256); T(i0_desc.height == 512); T(i0_desc.num_slices == 1); @@ -917,7 +917,7 @@ UTEST(sokol_gfx, query_image_desc) { sg_destroy_image(i0); const sg_image_desc i1_desc = sg_query_image_desc(i0); T(i1_desc.type == 0); - T(i1_desc.render_target == false); + T(i1_desc.render_attachment == false); T(i1_desc.width == 0); T(i1_desc.height == 0); T(i1_desc.num_slices == 0); @@ -1064,12 +1064,12 @@ UTEST(sokol_gfx, query_pass_desc) { setup(&(sg_desc){0}); const sg_image_desc color_img_desc = { - .render_target = true, + .render_attachment = true, .width = 128, .height = 128, }; const sg_image_desc depth_img_desc = { - .render_target = true, + .render_attachment = true, .width = 128, .height = 128, .pixel_format = SG_PIXELFORMAT_DEPTH, @@ -1121,7 +1121,7 @@ UTEST(sokol_gfx, image_resource_states) { setup(&(sg_desc){0}); sg_image img = sg_alloc_image(); T(sg_query_image_state(img) == SG_RESOURCESTATE_ALLOC); - sg_init_image(img, &(sg_image_desc){ .render_target = true, .width = 16, .height = 16 }); + sg_init_image(img, &(sg_image_desc){ .render_attachment = true, .width = 16, .height = 16 }); T(sg_query_image_state(img) == SG_RESOURCESTATE_VALID); sg_uninit_image(img); T(sg_query_image_state(img) == SG_RESOURCESTATE_ALLOC); @@ -1164,7 +1164,7 @@ UTEST(sokol_gfx, pass_resource_states) { sg_pass pass = sg_alloc_pass(); T(sg_query_pass_state(pass) == SG_RESOURCESTATE_ALLOC); sg_init_pass(pass, &(sg_pass_desc){ - .color_attachments[0].image = sg_make_image(&(sg_image_desc){ .render_target=true, .width=16, .height=16}) + .color_attachments[0].image = sg_make_image(&(sg_image_desc){ .render_attachment=true, .width=16, .height=16}) }); T(sg_query_pass_state(pass) == SG_RESOURCESTATE_VALID); sg_uninit_pass(pass); @@ -1629,7 +1629,7 @@ UTEST(sokol_gfx, make_pass_with_nonvalid_color_images) { }, .depth_stencil_attachment = { .image = sg_make_image(&(sg_image_desc){ - .render_target = true, + .render_attachment = true, .width = 128, .height = 128 }) |