yanchith
Hey there!
I am encountering some problems with RenderPass::set_viewport()
and would like to know what values are allowed, at least for x
, y
, w
and h
. I've got 2 problems overall:
w
and h
reverse the rendered result on the X and Y axes? It seems to do so with h
, but not with w
- for negative w
I just get a black texture.Is RenderPass::set_viewport()
more or less an equivalent of glViewport()
, or am I missing something?
Kangz
It is the equivalent of glViewport yes. The upstream webgpu spec hasn't worked out the exact validation rules but I know Vulkan doesn't like when the viewport you set is outside of the 3x3 original viewport centered on the framebuffer. Also it requires Vulkan 1.1 or an extension to allow flipping Y
swap_chain_present
, if queue.present_surface
blocks, it still has the write locks acquired and those will have other threads wait?
Token
s work so I wanted to verify
lijinlei
@kvark if need to update an existing buffer every frame, map_write
or copy_buffer_to_buffer
which is the best choice?m4b
🤷♂️