Portable Graphics in Rust

113 Members
https://community.mozilla.org/groups/rust-portable-graphics/7 Servers

Load older messages

Timestamp Message
8 Apr 2020
17:24:00@adamnemecek:matrix.orgadamnemeceklike when grow is called
17:24:04@adamnemecek:matrix.orgadamnemecekyou are passed a pointer
18:19:37@groves:matrix.orggroves adamnemecek: what are you trying to accomplish by directly backing a Vec by gpu memory, instead of just using a regular Vec and performing a copy whenever you actually need it be in gpu memory?
18:20:17@adamnemecek:matrix.orgadamnemecekergonomics + speed?
18:20:36@adamnemecek:matrix.orgadamnemecekor is it faster to copy since sharing between cpu and gpu is slow
18:26:03@groves:matrix.orggroves IMO any performance gain will probably not be noticeable depending on how the Vec is used (it could even be a bit slower depending on how it's used), so you might be better off performing the copy when you actually need it to exist on the gpu
18:26:46@groves:matrix.orggroves so if you're doing a copy anyway, you might as well use Vec for ergonomics and copy from there
18:27:04@chemicstry:matrix.orgchemicstry hey kvark, I am the one who opened the gl depth buffer clearing PR. I tried implementing mask restoration and hit a few bumps. I'm not sure what is the cost of calling gl.depth_mask and should I check in rust if it was false and needs restoration to avoid unneccessary call? For depth mask it is quite simple, but for stencil I would also need to fetch stencil buffer bit depth and then compare mask with the number of bits available if it's all 1. And to get current value of color mask I need glGetBooleanv with array which is not available in glow crate
18:27:17@kvark:matrix.orgkvark chemicstry: hello and welcome!
18:27:44@kvark:matrix.orgkvarkI think, in general, it makes sense to cache something on our side to avoid calling the driver.
18:28:05@kvark:matrix.orgkvarkbut please no fetching from the driver! We provide all the info, so we should have it somewhere.
18:28:39@kvark:matrix.orgkvark i.e. the clear masks come from the last bind_graphics_pipeline call. A pipeline state object knows which things are writable
18:29:37@chemicstry:matrix.orgchemicstrytrue, thanks for help, will see what I can do
23:36:12@chemicstry:matrix.orgchemicstry https://github.com/gfx-rs/gfx/blob/master/src/backend/gl/src/state.rs#L90 I think a typo, should be glow::BACK ?
9 Apr 2020
00:21:42@chemicstry:matrix.orgchemicstryso I've updated the PR to use cached values, take a look when you have time 😁 if it's okay I can do it for the color mask too
00:22:52@kvark:matrix.orgkvarkawesome, thank you!
00:40:20@chemicstry:matrix.orgchemicstryI just realised that current masks could be cached in command queue state instead so then they could be accessed via self and updated in appropriate commands. One question, does command queue state persist through frames?
00:46:38@chemicstry:matrix.orgchemicstry but I guess your suggested separate command approach is better as then restoration could be avoided where unneccessary. Also by command encoder you mean CommandBuffer ?
01:32:15@kvark:matrix.orgkvarkyeah, CommandBuffer should know if a state needs to be restored, and what state it is, so it's the best place to just issue those extra commands of restoring the state
02:26:14@kvark:matrix.orgkvarkRedacted or Malformed Event
02:26:41@kvark:matrix.orgkvark * ![diligent-atmosphere][https://user-images.githubusercontent.com/107301/78851397-b045eb80-79e7-11ea-9b3e-785c97196cec.png]
02:26:44@kvark:matrix.orgkvark * https://user-images.githubusercontent.com/107301/78851397-b045eb80-79e7-11ea-9b3e-785c97196cec.png
02:27:10@kvark:matrix.orgkvarkGot diligent engine working somewhat nicely. The only tiny problem is that my driver freezes if I turn the camera too much :/
14:10:37@kvark:matrix.orgkvark groves: https://github.com/gfx-rs/gfx/issues/3208
15:27:49@chemicstry:matrix.orgchemicstry So I'm trying to understand when color/stencil/depth masks need to be restored. Currently in GL there are only 2 locations where buffers are cleared: begin_render_pass attachment clears - in this case we don't need to restore as they will be set by the render pass anyway if they are used? Other location is clear_image, but I'm not sure about this, because it sets so many things and I can't find an example of this API usage
15:31:09@kvark:matrix.orgkvark chemicstry: as I described in the issue, there are 3 places: begin_render_pass, clear_attachments, and clear_image
15:31:39@kvark:matrix.orgkvark the masks to restore are set by bind_graphics_pipeline
18:08:16@kvark:matrix.orgkvarkOn portability, the good news is I was able to run pretty much everything on the list, except for RPCS3, which never worked to real extent on any VkPI. The bad news is that Dota2 is using swapchains in a way that is not compatible with our new swapchain model :( I filed https://github.com/ValveSoftware/Dota-2-Vulkan/issues/335 to investigate on their side, but hopes are low.

There are no newer messages yet.

Back to Room List