Hi, I'm writing an emscripten/webgpu app and Texture::GetFormat() is always returning 0. The texture is otherwise working and usable so I can work around it for now.
GetFormat works as expected with the same code built natively using the dawn lib, and GetWidth and GetHeight are also working fin on both emscripten and native. Here's my texture creation code: wgpu::Extent3D size = {width, height, 1}; wgpu::TextureDescriptor desc; desc.usage = usage; desc.dimension = wgpu::TextureDimension::e2D; desc.size = size; desc.format = format; desc.mipLevelCount = mipmap ? (uint32_t)std::floor(log2(std::min(width, height))) + 1 : 1; desc.sampleCount = 1; log() << "### Creating texture:" << (int)desc.format << desc.size.width << desc.size.height; auto texture = device.CreateTexture(&desc); log() << "### Created texture:" << (int)texture.GetFormat() << texture.GetWidth() << texture.GetHeight(); I had a quick look at the library_webgpu.js code but the 2 lines there look fine. Also, emscripten wgpu::Buffer appears to be missing the GetMapState() member, ditto wgpuBufferGetMapState. Bye! Mark -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to emscripten-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/emscripten-discuss/3db33a7a-cbfd-437a-a40f-1443d4763d7fn%40googlegroups.com.