Comments (29)
from vsgexamples.
Hi Robert,
thank you for the hints, I will try it.
Appened is the message from the windows version with '-d' flag.
win_message.txt
Best
Rainer
from vsgexamples.
from vsgexamples.
Hi Robert,
here come the Mac results. I user the '-d' flag here also. Switching off the blitter code, the program still works but changes the background color.
The CAMetalLayer related message always occurs, but does hopefully no harm.
Best
Rainer
mac_blitter_message.txt
mac_noblitter_message.txt
screenshot_mac_blitter.vsgt.zip
screenshot_mac_noblitter.vsgt.zip
from vsgexamples.
...the color seems to be switched, when no blitter is active.
from vsgexamples.
Hi Robert,
I found a screenshot example, which works on Mac and on Windows. It is part of Sascha Willems vulkan examples.
[(https://github.com/SaschaWillems/Vulkan.git)]
I looked at the save_screenshot() code and compared it to the code in the vsgscreenshot example. I see some differences regarding parameters like 'VK_QUEUE_FAMILY_IGNORED', but I am not an expert to say what is wrong. Maybe this example can help you?
from vsgexamples.
from vsgexamples.
Hi Robert,
this is a Windows issue, but I know, your answer will be the same for the same reasons. I will try what is possible. I am excited to see the new core features yet!
from vsgexamples.
@rainergericke Did you uncover what is happening with the screenshot issue under Windows?
from vsgexamples.
No, I pushed it behind several times. It would be good to have this problem resolved yet. Do you have time to help?
from vsgexamples.
I have a prelaminary solution for Windows:
- Ignore Blitting support
- Consider color swizzle and non contiguity
As attachment you find my screenshot function for Windows. The output code was taken from Sascha Willems screenshot example, only meant as a demo, but working
exportScreenshotNoBlit.cpp.zip
.
from vsgexamples.
from vsgexamples.
I didn't change the Vulkan code, it should be identical.
Using your code on the Mac with blitting switched off, you can see the image but in wrong colors, so it is necessary to retrieve information about color swizzle. Using the code on Windows seems to have right colors, but the image is scrambled because the data is not contiguous. So it is better to consider both.
PPM expects RGB, also stb want RGBA.
from vsgexamples.
from vsgexamples.
To make it easier to write images I've created a stbi_write branch of vsgXchange, and have add stb_image_write.h as a first step to adding support for writing image formats:
[https://github.com/vsg-dev/vsgXchange/tree/stbi_write](https://github.com/vsg-dev/vsgXchange/tree/stbi_write)
I will now figure out how to use the stbi_image_write API, I don't expect it'll be too hard.
from vsgexamples.
from vsgexamples.
I have added swizzling from BGR and BGRA to RGB and RGBA respectively:
Added support for swizzling image format to handle BGR and BGRA formats
I will do a code review and then if it looks OK merge with vsgXchange master.
from vsgexamples.
The png, jpeg, bmp and tga write support for RGB, RGBA, BGR and BGRA, the later with a locally implemented swizzle is now merged into vsgXchange master.
from vsgexamples.
Great! It is easy to use. It works well on the Mac. On Windows there is still a bug with blit support enabled, which leads to an one-colored graphic file (all formats, vsg* included). Disabling the blitter makes it run well. I will use this function in my software.
from vsgexamples.
Could you try running vsgscreeenshot with debug layer enabled i.e.
vsgscreenshot models/lz.vsgt --cf screenshot.png -d
On Windows and macOS? I'd like to get to bottom of the issue with the blitting.
from vsgexamples.
I have just run vsgscreenshot with debugging on and see errors, so I have something to look into at my end.
$ vsgscreenshot models/lz.vsgt -d
depthStencilResolve_properites.supportedDepthResolveModes = 15
depthStencilResolve_properites.supportedStencilResolveModes = 13
depthStencilResolve_properites.independentResolveNone = 1
depthStencilResolve_properites.independentResolve = 1
info: supportsBlit = 1
VUID-vkCmdBlitImage-srcImage-00247(ERROR / SPEC): msgNum: 1607722825 - Validation Error: [ VUID-vkCmdBlitImage-srcImage-00247 ] Object 0: handle = 0x556b8b9b4130, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0x5fd3e749 | vkCmdBlitImage: region [0], source image of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D with srcOffset[].z values of (0, 0). These must be (0, 1). The Vulkan spec states: If srcImage is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of pRegions, srcOffsets[0].z must be 0 and srcOffsets[1].z must be 1 (https://vulkan.lunarg.com/doc/view/1.3.216.0/linux/1.3-extensions/vkspec.html#VUID-vkCmdBlitImage-srcImage-00247)
Objects: 1
[0] 0x556b8b9b4130, type: 6, name: NULL
VUID-vkCmdBlitImage-dstImage-00252(ERROR / SPEC): msgNum: -657803409 - Validation Error: [ VUID-vkCmdBlitImage-dstImage-00252 ] Object 0: handle = 0x556b8b9b4130, type = VK_OBJECT_TYPE_COMMAND_BUFFER; | MessageID = 0xd8cab76f | vkCmdBlitImage: region [0], dest image of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D with dstOffset[].z values of (0, 0). These must be (0, 1). The Vulkan spec states: If dstImage is of type VK_IMAGE_TYPE_1D or VK_IMAGE_TYPE_2D, then for each element of pRegions, dstOffsets[0].z must be 0 and dstOffsets[1].z must be 1 (https://vulkan.lunarg.com/doc/view/1.3.216.0/linux/1.3-extensions/vkspec.html#VUID-vkCmdBlitImage-dstImage-00252)
Objects: 1
[0] 0x556b8b9b4130, type: 6, name: NULL
Written color buffer to screenshot.vsgt
num_unset_depth = 1276732
num_set_depth = 33988
Written depth buffer to depth.vsgt
from vsgexamples.
This is the Mac answer (Windows will follow soon):
rainerge@RainersacStudio VSG2 % vsgscreenshot models/lz.vsgt -d
depthStencilResolve_properites.supportedDepthResolveModes = 13
depthStencilResolve_properites.supportedStencilResolveModes = 1
depthStencilResolve_properites.independentResolveNone = 1
depthStencilResolve_properites.independentResolve = 1
VUID-vkCreateEvent-events-04468(ERROR / SPEC): msgNum: 2064270843 - Validation Error: [ VUID-vkCreateEvent-events-04468 ] Object 0: handle = 0x143045e18, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x7b0a45fb | vkCreateEvent: events are not supported via VK_KHR_portability_subset The Vulkan spec states: If the VK_KHR_portability_subset extension is enabled, and VkPhysicalDevicePortabilitySubsetFeaturesKHR::events is VK_FALSE, then the implementation does not support events, and vkCreateEvent must not be used (https://vulkan.lunarg.com/doc/view/1.3.216.0/mac/1.3-extensions/vkspec.html#VUID-vkCreateEvent-events-04468)
Objects: 1
[0] 0x143045e18, type: 3, name: NULL
from vsgexamples.
from vsgexamples.
It's Vulkan 1.3.216.0.
Windows doesn't tell us to much:
windows_scrshot.txt
from vsgexamples.
from vsgexamples.
from vsgexamples.
Looks good!
screenshot_mac.vsgt.zip
screenshot_win.vsgt.zip
from vsgexamples.
from vsgexamples.
Yes, we can close it. Thanks!
from vsgexamples.
Related Issues (20)
- how to render models with tileData? HOT 1
- If vsgTransform is no command line parameter, it will crash. HOT 1
- vsgviewer render readymap.vsgt? HOT 5
- Wayland support HOT 2
- Compiling issues for vsgvolume example HOT 4
- vertex and fragment source for vert_PushConstants.spv and frag_PushConstants.spv HOT 5
- Checked-in code inconsistent with .clang-format HOT 4
- vsgshadow without shadows on MacOS HOT 16
- None of the example models are actually compatible with vsgclip example HOT 2
- vsgshadow has black patches flickering on the ground HOT 4
- No CMakeLists.txt file for vsgoffscreenshot HOT 2
- vsgscreenshot can produce strange output HOT 2
- vsgexecutecommands crashes on windows HOT 8
- VSG_INSTANCE_POSITIONS format change HOT 2
- Request for a hello-world example HOT 3
- How to display a point on the earth map? HOT 1
- vsgvolume is actually broken on Windows 11 and Ubuntu 22.4 HOT 3
- problem with overlay views using multiple render graphs in the same window HOT 3
- DescriptorPool warning when using compileManager with storage buffers HOT 2
- Examples abort on shutdown when run in Debug HOT 4
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 vsgexamples.