aboutsummaryrefslogtreecommitdiff
path: root/tests/functional
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2023-07-02 18:31:44 +0200
committerAndre Weissflog <floooh@gmail.com>2023-07-02 18:31:44 +0200
commite92b005893de63c55390b2c1a073d64917cf22a8 (patch)
tree3455155520109eb6617b352f27948b195014f7c1 /tests/functional
parent126322f8c0d766b3c3f49a10635ca00831f91c66 (diff)
fix sokol_gfx_test.c (create pass without color attachments is now allowed
Diffstat (limited to 'tests/functional')
-rw-r--r--tests/functional/sokol_gfx_test.c34
1 files changed, 14 insertions, 20 deletions
diff --git a/tests/functional/sokol_gfx_test.c b/tests/functional/sokol_gfx_test.c
index 3e7c862a..28084e0f 100644
--- a/tests/functional/sokol_gfx_test.c
+++ b/tests/functional/sokol_gfx_test.c
@@ -1854,6 +1854,20 @@ UTEST(sokol_gfx, make_pass_with_nonvalid_color_images) {
sg_shutdown();
}
+UTEST(sokol_gfx, make_pass_without_color_attachments) {
+ setup(&(sg_desc){0});
+ sg_pass pass = sg_make_pass(&(sg_pass_desc){
+ .depth_stencil_attachment.image = sg_make_image(&(sg_image_desc){
+ .render_target = true,
+ .width = 64,
+ .height = 64,
+ .pixel_format = SG_PIXELFORMAT_DEPTH,
+ })
+ });
+ T(sg_query_pass_state(pass) == SG_RESOURCESTATE_VALID);
+ sg_shutdown();
+}
+
UTEST(sokol_gfx, make_buffer_validate_start_canary) {
setup(&(sg_desc){0});
const uint32_t data[32] = {0};
@@ -2167,26 +2181,6 @@ UTEST(sokol_gfx, make_pass_validate_end_canary) {
sg_shutdown();
}
-UTEST(sokol_gfx, make_pass_validate_no_color_attrs) {
- setup(&(sg_desc){0});
- // FIXME: rendering without color attachments but depth attachment should actually work
- sg_pass pass = sg_make_pass(&(sg_pass_desc){
- .depth_stencil_attachment.image = sg_make_image(&(sg_image_desc){
- .render_target = true,
- .width = 64,
- .height = 64,
- .pixel_format = SG_PIXELFORMAT_DEPTH,
- })
- });
- T(sg_query_pass_state(pass) == SG_RESOURCESTATE_FAILED);
- T(log_items[0] == SG_LOGITEM_VALIDATE_PASSDESC_NO_COLOR_ATTS);
- T(log_items[1] == SG_LOGITEM_VALIDATE_PASSDESC_DEPTH_IMAGE_SIZES);
- T(log_items[2] == SG_LOGITEM_VALIDATE_PASSDESC_DEPTH_IMAGE_SIZES);
- T(log_items[3] == SG_LOGITEM_VALIDATE_PASSDESC_DEPTH_IMAGE_SAMPLE_COUNT);
- T(log_items[4] == SG_LOGITEM_VALIDATION_FAILED);
- sg_shutdown();
-}
-
UTEST(sokol_gfx, make_pass_validate_no_cont_color_atts1) {
setup(&(sg_desc){0});
const sg_image_desc img_desc = { .render_target = true, .width = 64, .height = 64 };