Comments (6)
I'm not sure if I understand. The lightmap only needs to be uploaded before the command buffer is executing on the GPU in the next frame. Is that not the case?
from vkquake.
Oh so the lightmap update lags by a frame, oh if so then it it's fine, I though it was update the lightmap for the current frame and thus failing to actually upload it.
from vkquake.
Define "current frame"?
GPU rendering is inherently asynchronous. While the CPU is recording command buffers for the next frame, the GPU is executing the ones recorded a frame earlier.
This also includes the DMA transfers executed by the GPU to upload the lightmap. Essentially vkCmd* calls do nothing until vkQueueSubmit (and even then are only queued and might not execute immediately).
from vkquake.
So in this case you are preparing two command buffers, one staging to upload the lightmap, and one main command buffer. The staging command buffer doesn't get submitted before the main command buffer does. So current frame I mean what the CPU is going to submit next.
So current order is
- frame 1
Submit Staging
Update Staging with lightmap
Submit Main Command - frame 2
Submit Staging
The staging lightmap update won't have any effect on the current main command buffer being uploaded.
If that is how quake works, that is fine, it just seemed confusing to be updating the lightmap mid-frame when the results aren't used until next frame.
from vkquake.
I will double check the logic if I find time. If there is an issue it would just delay the update by a frame.
from vkquake.
You are right, the buffer submit has to be done in end frame, not begin frame. No idea what I was thinking there. Fixed by a6dbe10
from vkquake.
Related Issues (20)
- MacOS+vsync: Game slows down to 5fps after taking 2-10 screenshots HOT 5
- Skybox glitching in some maps (version 1.30.0) HOT 5
- in game messages are still broken when using remastered paks HOT 8
- About using remaster data files and fog toggle HOT 3
- "Animation" setting resets to "Smooth" when game is restarted. HOT 2
- I seem to be phasing through medkits on nightmare mode. HOT 6
- 1.30.1 - QUAKE ERROR: Couldn't create Vulkan device Linux HOT 11
- new options menu: going one level back places cursor always at top of the list HOT 1
- Wrong HUD text messages using rerelease data HOT 1
- [Feature request] Support for set and seta commands for registering custom cvars HOT 3
- Framestutter after v1.30.x. But not allways HOT 3
- Rotating brushes receive light from dynamic lights near (0, 0, 0) HOT 3
- sndspeed and snd_mixspeed should be at 44100 or matching the system default. HOT 1
- MacOS debug build compilation error HOT 2
- [Feature Request] Glquake reflections. HOT 6
- vid_desktopfullscreen "1" is pixelated on macOS HOT 1
- The restart command doesn't restart the level when "autoload" is not "0" HOT 2
- Compiling on Ubuntu 22.04.06 failing due to "unrecognized command-line option" HOT 1
- compile errors on Fedora38 using gcc 13.0.1 HOT 2
- Much lower FPS on Fullscreen Mode HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vkquake.