Skip to content

Commit

Permalink
sokol_gfx.h wgpu: fix array texture creation
Browse files Browse the repository at this point in the history
  • Loading branch information
floooh committed Oct 8, 2023
1 parent 61675b5 commit be548e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sokol_gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -13505,6 +13505,8 @@ _SOKOL_PRIVATE sg_resource_state _sg_wgpu_create_image(_sg_image_t* img, const s
wgpu_texview_desc.mipLevelCount = (uint32_t)img->cmn.num_mipmaps;
if (img->cmn.type == SG_IMAGETYPE_CUBE) {
wgpu_texview_desc.arrayLayerCount = 6;
} else if (img->cmn.type == SG_IMAGETYPE_ARRAY) {
wgpu_texview_desc.arrayLayerCount = (uint32_t)img->cmn.num_slices;
} else {
wgpu_texview_desc.arrayLayerCount = 1;
}
Expand Down

0 comments on commit be548e5

Please sign in to comment.