aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2023-05-15 17:57:29 +0200
committerAndre Weissflog <floooh@gmail.com>2023-05-15 17:57:29 +0200
commitd58923926f52aefd2c1d7fd4b60bd885bb9f5129 (patch)
treeb297b7056b82f46a6ff7f3cfe0742999eee19c63
parent726fce2cc7f7bec2aa72af49f0323bb40cab9647 (diff)
sokol_gfx.h: rename sg_image_desc.render_attachment back to .render_target
-rw-r--r--sokol_gfx.h50
-rw-r--r--tests/functional/sokol_gfx_test.c36
-rw-r--r--util/sokol_gfx_imgui.h36
3 files changed, 61 insertions, 61 deletions
diff --git a/sokol_gfx.h b/sokol_gfx.h
index d663e061..8ec4eed8 100644
--- a/sokol_gfx.h
+++ b/sokol_gfx.h
@@ -2064,7 +2064,7 @@ typedef struct sg_image_data {
The default configuration is:
.type: SG_IMAGETYPE_2D
- .render_attachment: false
+ .render_target: false
.width 0 (must be set to >0)
.height 0 (must be set to >0)
.num_slices 1 (3D textures: depth; array textures: number of layers)
@@ -2123,7 +2123,7 @@ typedef struct sg_image_data {
typedef struct sg_image_desc {
uint32_t _start_canary;
sg_image_type type;
- bool render_attachment;
+ bool render_target;
int width;
int height;
int num_slices;
@@ -2404,7 +2404,7 @@ typedef struct sg_pipeline_desc {
Pass images must fulfill the following requirements:
All images must have:
- - been created as render attachment (sg_image_desc.render_attachment = true)
+ - been created as render attachment (sg_image_desc.render_target = true)
- the same size
- the same sample count
- when the color attachment image has a sample_count > 1, the
@@ -2699,7 +2699,7 @@ typedef struct sg_pass_info {
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_FACE, "pass attachment image is cubemap, but face index is too big") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_LAYER, "pass attachment image is array texture, but layer index is too big") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_SLICE, "pass attachment image is 3d texture, but slice value is too big") \
- _SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_IMAGE_NO_RT, "pass attachment image must be have render_attachment=true") \
+ _SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_IMAGE_NO_RT, "pass attachment image must be have render_target=true") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_COLOR_INV_PIXELFORMAT, "pass color-attachment images must have a renderable pixel format") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_DEPTH_INV_PIXELFORMAT, "pass depth-attachment image must have depth pixel format") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_IMAGE_SIZES, "all pass attachments must have the same size") \
@@ -2711,7 +2711,7 @@ typedef struct sg_pass_info {
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_RESOLVE_FACE, "pass resolve attachment is cubemap, but face index is too big") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_RESOLVE_LAYER, "pass resolve attachment is array texture, but layer index is too big") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_RESOLVE_SLICE, "pass resolve attachment is 3d texture, but slice value is too big") \
- _SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_RESOLVE_IMAGE_NO_RT, "pass resolve attachment image must have render_attachment=true") \
+ _SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_RESOLVE_IMAGE_NO_RT, "pass resolve attachment image must have render_target=true") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_RESOLVE_IMAGE_SIZES, "pass resolve attachment size must match color attachment image size") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_RESOLVE_IMAGE_FORMAT, "pass resolve attachment pixel format must match color attachment pixel format") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_DEPTH_IMAGE, "pass depth attachment image is not valid") \
@@ -2719,7 +2719,7 @@ typedef struct sg_pass_info {
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_DEPTH_FACE, "pass depth attachment image is cubemap, but face index is too big") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_DEPTH_LAYER, "pass depth attachment image is array texture, but layer index is too big") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_DEPTH_SLICE, "pass depth attachment image is 3d texture, but slice value is too big") \
- _SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_DEPTH_IMAGE_NO_RT, "pass depth attachment image must be have render_attachment=true") \
+ _SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_DEPTH_IMAGE_NO_RT, "pass depth attachment image must be have render_target=true") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_DEPTH_IMAGE_SIZES, "pass depth attachment image size must match color attachment image size") \
_SG_LOGITEM_XMACRO(VALIDATE_PASSDESC_DEPTH_IMAGE_SAMPLE_COUNTS, "pass depth attachment sample count must match color attachment sample count") \
_SG_LOGITEM_XMACRO(VALIDATE_BEGINPASS_PASS, "sg_begin_pass: pass must be valid") \
@@ -3745,7 +3745,7 @@ typedef struct {
int num_slots;
int active_slot;
sg_image_type type;
- bool render_attachment;
+ bool render_target;
int width;
int height;
int num_slices;
@@ -3769,7 +3769,7 @@ _SOKOL_PRIVATE void _sg_image_common_init(_sg_image_common_t* cmn, const sg_imag
cmn->num_slots = (desc->usage == SG_USAGE_IMMUTABLE) ? 1 : SG_NUM_INFLIGHT_FRAMES;
cmn->active_slot = 0;
cmn->type = desc->type;
- cmn->render_attachment = desc->render_attachment;
+ cmn->render_target = desc->render_target;
cmn->width = desc->width;
cmn->height = desc->height;
cmn->num_slices = desc->num_slices;
@@ -6786,7 +6786,7 @@ _SOKOL_PRIVATE sg_resource_state _sg_gl_create_image(_sg_image_t* img, const sg_
// if this is a MSAA render target, a render buffer object will be created instead of a regulat texture
// (since GLES3 has no multisampled texture objects)
- if (img->cmn.render_attachment && (img->cmn.sample_count > 1)) {
+ if (img->cmn.render_target && (img->cmn.sample_count > 1)) {
glGenRenderbuffers(1, &img->gl.msaa_render_buffer);
glBindRenderbuffer(GL_RENDERBUFFER, img->gl.msaa_render_buffer);
glRenderbufferStorageMultisample(GL_RENDERBUFFER, img->cmn.sample_count, gl_internal_format, img->cmn.width, img->cmn.height);
@@ -8802,7 +8802,7 @@ _SOKOL_PRIVATE sg_resource_state _sg_d3d11_create_image(_sg_image_t* img, const
// prepare initial content pointers
D3D11_SUBRESOURCE_DATA* init_data = 0;
- if (!injected && (img->cmn.usage == SG_USAGE_IMMUTABLE) && !img->cmn.render_attachment) {
+ if (!injected && (img->cmn.usage == SG_USAGE_IMMUTABLE) && !img->cmn.render_target) {
_sg_d3d11_fill_subres_data(img, &desc->data);
init_data = _sg.d3d11.subres_data;
}
@@ -8839,7 +8839,7 @@ _SOKOL_PRIVATE sg_resource_state _sg_d3d11_create_image(_sg_image_t* img, const
default: d3d11_tex_desc.ArraySize = 1; break;
}
d3d11_tex_desc.Format = img->d3d11.format;
- if (img->cmn.render_attachment) {
+ if (img->cmn.render_target) {
d3d11_tex_desc.Usage = D3D11_USAGE_DEFAULT;
if (_sg_is_depth_or_depth_stencil_format(img->cmn.pixel_format)) {
d3d11_tex_desc.BindFlags = D3D11_BIND_DEPTH_STENCIL;
@@ -8923,7 +8923,7 @@ _SOKOL_PRIVATE sg_resource_state _sg_d3d11_create_image(_sg_image_t* img, const
d3d11_tex_desc.Depth = (UINT)img->cmn.num_slices;
d3d11_tex_desc.MipLevels = (UINT)img->cmn.num_mipmaps;
d3d11_tex_desc.Format = img->d3d11.format;
- if (img->cmn.render_attachment) {
+ if (img->cmn.render_target) {
d3d11_tex_desc.Usage = D3D11_USAGE_DEFAULT;
d3d11_tex_desc.BindFlags = D3D11_BIND_RENDER_TARGET;
d3d11_tex_desc.CPUAccessFlags = 0;
@@ -10760,7 +10760,7 @@ _SOKOL_PRIVATE bool _sg_mtl_init_texdesc_common(MTLTextureDescriptor* mtl_desc,
/* initialize MTLTextureDescritor with rendertarget attributes */
_SOKOL_PRIVATE void _sg_mtl_init_texdesc_rt(MTLTextureDescriptor* mtl_desc, _sg_image_t* img) {
- SOKOL_ASSERT(img->cmn.render_attachment);
+ SOKOL_ASSERT(img->cmn.render_target);
_SOKOL_UNUSED(img);
mtl_desc.usage = MTLTextureUsageShaderRead | MTLTextureUsageRenderTarget;
mtl_desc.resourceOptions = MTLResourceStorageModePrivate;
@@ -10792,7 +10792,7 @@ _SOKOL_PRIVATE sg_resource_state _sg_mtl_create_image(_sg_image_t* img, const sg
_SG_OBJC_RELEASE(mtl_desc);
return SG_RESOURCESTATE_FAILED;
}
- if (img->cmn.render_attachment) {
+ if (img->cmn.render_target) {
if (img->cmn.sample_count > 1) {
_sg_mtl_init_texdesc_rt_msaa(mtl_desc, img);
} else {
@@ -10806,7 +10806,7 @@ _SOKOL_PRIVATE sg_resource_state _sg_mtl_create_image(_sg_image_t* img, const sg
tex = (__bridge id<MTLTexture>) desc->mtl_textures[slot];
} else {
tex = [_sg.mtl.device newTextureWithDescriptor:mtl_desc];
- if ((img->cmn.usage == SG_USAGE_IMMUTABLE) && !img->cmn.render_attachment) {
+ if ((img->cmn.usage == SG_USAGE_IMMUTABLE) && !img->cmn.render_target) {
_sg_mtl_copy_image_data(img, tex, &desc->data);
}
}
@@ -12575,7 +12575,7 @@ _SOKOL_PRIVATE sg_resource_state _sg_wgpu_create_image(_sg_image_t* img, const s
_sg_clear(&wgpu_tex_desc, sizeof(wgpu_tex_desc));
_sg_wgpu_init_texdesc_common(&wgpu_tex_desc, desc);
if (_sg_is_valid_rendertarget_depth_format(img->cmn.pixel_format)) {
- SOKOL_ASSERT(img->cmn.render_attachment);
+ SOKOL_ASSERT(img->cmn.render_target);
SOKOL_ASSERT(img->cmn.type == SG_IMAGETYPE_2D);
SOKOL_ASSERT(img->cmn.num_mipmaps == 1);
SOKOL_ASSERT(!injected);
@@ -12596,14 +12596,14 @@ _SOKOL_PRIVATE sg_resource_state _sg_wgpu_create_image(_sg_image_t* img, const s
/* NOTE: in the MSAA-rendertarget case, both the MSAA texture *and*
the resolve texture need OutputAttachment usage
*/
- if (img->cmn.render_attachment) {
+ if (img->cmn.render_target) {
wgpu_tex_desc.usage = WGPUTextureUsage_Sampled|WGPUTextureUsage_OutputAttachment;
}
img->wgpu.tex = wgpuDeviceCreateTexture(_sg.wgpu.dev, &wgpu_tex_desc);
SOKOL_ASSERT(img->wgpu.tex);
/* copy content into texture via a throw-away staging buffer */
- if (desc->usage == SG_USAGE_IMMUTABLE && !desc->render_attachment) {
+ if (desc->usage == SG_USAGE_IMMUTABLE && !desc->render_target) {
WGPUBufferDescriptor wgpu_buf_desc;
_sg_clear(&wgpu_buf_desc, sizeof(wgpu_buf_desc));
wgpu_buf_desc.size = _sg_wgpu_image_data_buffer_size(img);
@@ -12628,7 +12628,7 @@ _SOKOL_PRIVATE sg_resource_state _sg_wgpu_create_image(_sg_image_t* img, const s
which will be resolved into the regular texture at the end of the
offscreen-render pass
*/
- if (desc->render_attachment && is_msaa) {
+ if (desc->render_target && is_msaa) {
wgpu_tex_desc.dimension = WGPUTextureDimension_2D;
wgpu_tex_desc.size.depth = 1;
wgpu_tex_desc.arrayLayerCount = 1;
@@ -14268,7 +14268,7 @@ _SOKOL_PRIVATE bool _sg_validate_image_desc(const sg_image_desc* desc) {
if (_sg_is_depth_or_depth_stencil_format(fmt)) {
_SG_VALIDATE(desc->type != SG_IMAGETYPE_3D, VALIDATE_IMAGEDESC_DEPTH_3D_IMAGE);
}
- if (desc->render_attachment) {
+ if (desc->render_target) {
SOKOL_ASSERT(((int)fmt >= 0) && ((int)fmt < _SG_PIXELFORMAT_NUM));
_SG_VALIDATE(_sg.formats[fmt].render, VALIDATE_IMAGEDESC_RT_PIXELFORMAT);
_SG_VALIDATE(usage == SG_USAGE_IMMUTABLE, VALIDATE_IMAGEDESC_RT_IMMUTABLE);
@@ -14494,7 +14494,7 @@ _SOKOL_PRIVATE bool _sg_validate_pass_desc(const sg_pass_desc* desc) {
_SG_VALIDATE(img, VALIDATE_PASSDESC_IMAGE);
if (0 != img) {
_SG_VALIDATE(img->slot.state == SG_RESOURCESTATE_VALID, VALIDATE_PASSDESC_IMAGE);
- _SG_VALIDATE(img->cmn.render_attachment, VALIDATE_PASSDESC_IMAGE_NO_RT);
+ _SG_VALIDATE(img->cmn.render_target, VALIDATE_PASSDESC_IMAGE_NO_RT);
_SG_VALIDATE(att->mip_level < img->cmn.num_mipmaps, VALIDATE_PASSDESC_MIPLEVEL);
if (img->cmn.type == SG_IMAGETYPE_CUBE) {
_SG_VALIDATE(att->slice < 6, VALIDATE_PASSDESC_FACE);
@@ -14526,7 +14526,7 @@ _SOKOL_PRIVATE bool _sg_validate_pass_desc(const sg_pass_desc* desc) {
_SG_VALIDATE(res_img, VALIDATE_PASSDESC_RESOLVE_IMAGE);
if (res_img != 0) {
_SG_VALIDATE(res_img->slot.state == SG_RESOURCESTATE_VALID, VALIDATE_PASSDESC_RESOLVE_IMAGE);
- _SG_VALIDATE(res_img->cmn.render_attachment, VALIDATE_PASSDESC_RESOLVE_IMAGE_NO_RT);
+ _SG_VALIDATE(res_img->cmn.render_target, VALIDATE_PASSDESC_RESOLVE_IMAGE_NO_RT);
_SG_VALIDATE(res_img->cmn.sample_count == 1, VALIDATE_PASSDESC_RESOLVE_SAMPLE_COUNT);
_SG_VALIDATE(res_att->mip_level < res_img->cmn.num_mipmaps, VALIDATE_PASSDESC_RESOLVE_MIPLEVEL);
if (res_img->cmn.type == SG_IMAGETYPE_CUBE) {
@@ -14560,7 +14560,7 @@ _SOKOL_PRIVATE bool _sg_validate_pass_desc(const sg_pass_desc* desc) {
else if (img->cmn.type == SG_IMAGETYPE_3D) {
_SG_VALIDATE(att->slice < img->cmn.num_slices, VALIDATE_PASSDESC_DEPTH_SLICE);
}
- _SG_VALIDATE(img->cmn.render_attachment, VALIDATE_PASSDESC_DEPTH_IMAGE_NO_RT);
+ _SG_VALIDATE(img->cmn.render_target, VALIDATE_PASSDESC_DEPTH_IMAGE_NO_RT);
_SG_VALIDATE(width == img->cmn.width >> att->mip_level, VALIDATE_PASSDESC_DEPTH_IMAGE_SIZES);
_SG_VALIDATE(height == img->cmn.height >> att->mip_level, VALIDATE_PASSDESC_DEPTH_IMAGE_SIZES);
_SG_VALIDATE(sample_count == img->cmn.sample_count, VALIDATE_PASSDESC_DEPTH_IMAGE_SAMPLE_COUNTS);
@@ -14863,7 +14863,7 @@ _SOKOL_PRIVATE sg_image_desc _sg_image_desc_defaults(const sg_image_desc* desc)
def.num_slices = _sg_def(def.num_slices, 1);
def.num_mipmaps = _sg_def(def.num_mipmaps, 1);
def.usage = _sg_def(def.usage, SG_USAGE_IMMUTABLE);
- if (desc->render_attachment) {
+ if (desc->render_target) {
def.pixel_format = _sg_def(def.pixel_format, _sg.desc.context.color_format);
def.sample_count = _sg_def(def.sample_count, _sg.desc.context.sample_count);
}
@@ -16486,7 +16486,7 @@ SOKOL_API_IMPL sg_image_desc sg_query_image_desc(sg_image img_id) {
const _sg_image_t* img = _sg_lookup_image(&_sg.pools, img_id.id);
if (img) {
desc.type = img->cmn.type;
- desc.render_attachment = img->cmn.render_attachment;
+ desc.render_target = img->cmn.render_target;
desc.width = img->cmn.width;
desc.height = img->cmn.height;
desc.num_slices = img->cmn.num_slices;
diff --git a/tests/functional/sokol_gfx_test.c b/tests/functional/sokol_gfx_test.c
index ca1fd369..b17c48ba 100644
--- a/tests/functional/sokol_gfx_test.c
+++ b/tests/functional/sokol_gfx_test.c
@@ -45,7 +45,7 @@ static sg_buffer create_buffer(void) {
static sg_image create_image(void) {
return sg_make_image(&(sg_image_desc){
- .render_attachment = true,
+ .render_target = true,
.width = 256,
.height = 128
});
@@ -66,7 +66,7 @@ static sg_pipeline create_pipeline(void) {
static sg_pass create_pass(void) {
sg_image_desc img_desc = {
- .render_attachment = true,
+ .render_target = true,
.width = 128,
.height = 128,
};
@@ -358,7 +358,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_attachment);
+ T(!imgptr->cmn.render_target);
T(imgptr->cmn.width == 8);
T(imgptr->cmn.height == 8);
T(imgptr->cmn.num_slices == 1);
@@ -482,7 +482,7 @@ UTEST(sokol_gfx, make_destroy_passes) {
sg_pass pass[3] = { {0} };
sg_image_desc img_desc = {
- .render_attachment = true,
+ .render_target = true,
.width = 128,
.height = 128,
};
@@ -562,7 +562,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_attachment);
+ T(!desc.render_target);
T(desc.num_mipmaps == 1);
T(desc.usage == SG_USAGE_IMMUTABLE);
T(desc.pixel_format == SG_PIXELFORMAT_RGBA8);
@@ -754,7 +754,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_attachment = true,
+ .render_target = true,
.width = 256,
.height = 128
});
@@ -801,7 +801,7 @@ UTEST(sokol_gfx, query_pipeline_info) {
UTEST(sokol_gfx, query_pass_info) {
setup(&(sg_desc){0});
sg_image_desc img_desc = {
- .render_attachment = true,
+ .render_target = true,
.width = 128,
.height = 128,
};
@@ -891,7 +891,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_attachment == false);
+ T(i0_desc.render_target == false);
T(i0_desc.width == 256);
T(i0_desc.height == 512);
T(i0_desc.num_slices == 1);
@@ -920,7 +920,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_attachment == false);
+ T(i1_desc.render_target == false);
T(i1_desc.width == 0);
T(i1_desc.height == 0);
T(i1_desc.num_slices == 0);
@@ -1067,12 +1067,12 @@ UTEST(sokol_gfx, query_pass_desc) {
setup(&(sg_desc){0});
const sg_image_desc color_img_desc = {
- .render_attachment = true,
+ .render_target = true,
.width = 128,
.height = 128,
};
const sg_image_desc depth_img_desc = {
- .render_attachment = true,
+ .render_target = true,
.width = 128,
.height = 128,
.pixel_format = SG_PIXELFORMAT_DEPTH,
@@ -1124,7 +1124,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_attachment = true, .width = 16, .height = 16 });
+ sg_init_image(img, &(sg_image_desc){ .render_target = 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);
@@ -1167,7 +1167,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_attachment=true, .width=16, .height=16})
+ .color_attachments[0].image = sg_make_image(&(sg_image_desc){ .render_target=true, .width=16, .height=16})
});
T(sg_query_pass_state(pass) == SG_RESOURCESTATE_VALID);
sg_uninit_pass(pass);
@@ -1632,7 +1632,7 @@ UTEST(sokol_gfx, make_pass_with_nonvalid_color_images) {
},
.depth_stencil_attachment = {
.image = sg_make_image(&(sg_image_desc){
- .render_attachment = true,
+ .render_target = true,
.width = 128,
.height = 128
})
@@ -1770,7 +1770,7 @@ UTEST(sokol_gfx, make_image_validate_msaa_no_rt) {
UTEST(sokol_gfx, make_image_validate_msaa_num_mipmaps) {
setup(&(sg_desc){0});
sg_image img = sg_make_image(&(sg_image_desc){
- .render_attachment = true,
+ .render_target = true,
.width = 64,
.height = 64,
.sample_count = 4,
@@ -1785,7 +1785,7 @@ UTEST(sokol_gfx, make_image_validate_msaa_num_mipmaps) {
UTEST(sokol_gfx, make_image_validate_msaa_3d_image) {
setup(&(sg_desc){0});
sg_image img = sg_make_image(&(sg_image_desc){
- .render_attachment = true,
+ .render_target = true,
.type = SG_IMAGETYPE_3D,
.width = 32,
.height = 32,
@@ -1801,7 +1801,7 @@ UTEST(sokol_gfx, make_image_validate_msaa_3d_image) {
UTEST(sokol_gfx, make_image_validate_depth_3d_image_with_depth_format) {
setup(&(sg_desc){0});
sg_image img = sg_make_image(&(sg_image_desc){
- .render_attachment = true,
+ .render_target = true,
.type = SG_IMAGETYPE_3D,
.width = 8,
.height = 8,
@@ -1817,7 +1817,7 @@ UTEST(sokol_gfx, make_image_validate_depth_3d_image_with_depth_format) {
UTEST(sokol_gfx, make_image_validate_rt_immutable) {
setup(&(sg_desc){0});
sg_image img = sg_make_image(&(sg_image_desc){
- .render_attachment = true,
+ .render_target = true,
.usage = SG_USAGE_DYNAMIC,
.width = 8,
.height = 8,
diff --git a/util/sokol_gfx_imgui.h b/util/sokol_gfx_imgui.h
index bb07892d..6999b436 100644
--- a/util/sokol_gfx_imgui.h
+++ b/util/sokol_gfx_imgui.h
@@ -3243,24 +3243,24 @@ _SOKOL_PRIVATE void _sg_imgui_draw_image_panel(sg_imgui_t* ctx, sg_image img) {
igSeparator();
_sg_imgui_draw_embedded_image(ctx, img, &img_ui->ui_scale);
igSeparator();
- igText("Type: %s", _sg_imgui_imagetype_string(desc->type));
- igText("Usage: %s", _sg_imgui_usage_string(desc->usage));
- igText("Render Attachment: %s", _sg_imgui_bool_string(desc->render_attachment));
- igText("Width: %d", desc->width);
- igText("Height: %d", desc->height);
- igText("Num Slices: %d", desc->num_slices);
- igText("Num Mipmaps: %d", desc->num_mipmaps);
- igText("Pixel Format: %s", _sg_imgui_pixelformat_string(desc->pixel_format));
- igText("Sample Count: %d", desc->sample_count);
- igText("Min Filter: %s", _sg_imgui_filter_string(desc->min_filter));
- igText("Mag Filter: %s", _sg_imgui_filter_string(desc->mag_filter));
- igText("Wrap U: %s", _sg_imgui_wrap_string(desc->wrap_u));
- igText("Wrap V: %s", _sg_imgui_wrap_string(desc->wrap_v));
- igText("Wrap W: %s", _sg_imgui_wrap_string(desc->wrap_w));
- igText("Border Color: %s", _sg_imgui_bordercolor_string(desc->border_color));
- igText("Max Anisotropy: %d", desc->max_anisotropy);
- igText("Min LOD: %.3f", desc->min_lod);
- igText("Max LOD: %.3f", desc->max_lod);
+ igText("Type: %s", _sg_imgui_imagetype_string(desc->type));
+ igText("Usage: %s", _sg_imgui_usage_string(desc->usage));
+ igText("Render Target: %s", _sg_imgui_bool_string(desc->render_target));
+ igText("Width: %d", desc->width);
+ igText("Height: %d", desc->height);
+ igText("Num Slices: %d", desc->num_slices);
+ igText("Num Mipmaps: %d", desc->num_mipmaps);
+ igText("Pixel Format: %s", _sg_imgui_pixelformat_string(desc->pixel_format));
+ igText("Sample Count: %d", desc->sample_count);
+ igText("Min Filter: %s", _sg_imgui_filter_string(desc->min_filter));
+ igText("Mag Filter: %s", _sg_imgui_filter_string(desc->mag_filter));
+ igText("Wrap U: %s", _sg_imgui_wrap_string(desc->wrap_u));
+ igText("Wrap V: %s", _sg_imgui_wrap_string(desc->wrap_v));
+ igText("Wrap W: %s", _sg_imgui_wrap_string(desc->wrap_w));
+ igText("Border Color: %s", _sg_imgui_bordercolor_string(desc->border_color));
+ igText("Max Anisotropy: %d", desc->max_anisotropy);
+ igText("Min LOD: %.3f", desc->min_lod);
+ igText("Max LOD: %.3f", desc->max_lod);
if (desc->usage != SG_USAGE_IMMUTABLE) {
igSeparator();
igText("Num Slots: %d", info.num_slots);