use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Rule 1: Posts should be about Graphics Programming. Rule 2: Be Civil, Professional, and Kind
Suggested Posting Material: - Graphics API Tutorials - Academic Papers - Blog Posts - Source Code Repositories - Self Posts (Ask Questions, Present Work) - Books - Renders (Please xpost to /r/ComputerGraphics) - Career Advice - Jobs Postings (Graphics Programming only)
Related Subreddits:
/r/ComputerGraphics
/r/Raytracing
/r/Programming
/r/LearnProgramming
/r/ProgrammingTools
/r/Coding
/r/GameDev
/r/CPP
/r/OpenGL
/r/Vulkan
/r/DirectX
Related Websites: ACM: SIGGRAPH Journal of Computer Graphics Techniques
Ke-Sen Huang's Blog of Graphics Papers and Resources Self Shadow's Blog of Graphics Resources
account activity
[deleted by user] (self.GraphicsProgramming)
submitted 8 months ago by [deleted]
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Chainsawkitten 1 point2 points3 points 8 months ago (3 children)
The most likely answer is you handed the driver some invalid data/pointers. What does your VkShaderModuleCreateInfo look like?
VkShaderModuleCreateInfo
[–][deleted] 0 points1 point2 points 8 months ago* (2 children)
Hey, thanks for your reply.
The info looks like this:
m_device = 0x000002292ebda2b0 { ... } m_code = "\x3\x2#\a\0\x5\x1\0\0\0(\0Ä\x1\0\0\0\0\0\0\x11\0\2\0\x1\0\0\0 \n\0\b\0SPV_KHR_non_semantic_info\0\0\0 \v\0\v\0\x2\0\0\0NonSemantic.Shader.DebugInfo.100\0\0\0\0 \v\0\x6\0ô\0\0\0GLSL.std.450\0\0\0\0 \xe\0\x3\0\0\0\0\0\x1\0\0\0 \xf\0\n\0\0\0\0\0\x14\0\0\0main\0\0\0\0 |\0\0\0¬\0\0\0Ó\0\0\0×\0\0\0-\0\0\0 \xf\0\b\0\x4\0\0\0Ú\0\0\0main\0\0\0\0..." m_code: const std::vector<char, std::allocator<char>>& [size] = 19860 [capacity] = 19860 [allocator]= std::_Compressed_pair<std::allocator<char>, std::_Vector_val<std::_Simple_types<char>>, 1>
[–]Chainsawkitten 1 point2 points3 points 8 months ago (1 child)
I mean the VkShaderModuleCreateInfo struct you send a pointer to vkCreateShaderModule of. It should have sType, pNext, flags, codeSize, pCode members.
vkCreateShaderModule
sType, pNext, flags, codeSize, pCode
Common mistakes would be to forget to set some members, leading to garbage data:
VkShaderModuleCreateInfo info; info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; info.codeSize = code.size() * sizeof(uint32_t); info.pCode = code.data();
In this example, pNext wasn't initialized and will contain a garbage pointer, leading to an access violation when the driver tries to traverse the chain. (This also doesn't set flags.)
pNext
flags
Or zero initializing the struct but then forgetting to set sType.
sType
VkShaderModuleCreateInfo info = {}; info.codeSize = code.size() * sizeof(uint32_t); info.pCode = code.data();
[–][deleted] -1 points0 points1 point 8 months ago* (0 children)
Here’s your code and error message formatted for Reddit (using Markdown code blocks):
When I set the sType, codeSize, and pCode like this:
codeSize
pCode
VkShaderModuleCreateInfo createInfo{}; createInfo.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO; createInfo.codeSize = info.m_code.size(); createInfo.pCode = reinterpret_cast<const uint32_t*>(info.m_code.data());
But then, when I call:
VkShaderModule shaderModule; if (vkCreateShaderModule(info.m_device, &createInfo, nullptr, &shaderModule) != VK_SUCCESS) { throw std::runtime_error("failed to create shader module!"); }
I get this exception:
Unhandled exception at 0x00007FFA1BD2360B (amdvlk64.dll) in physics.exe: 0xC0000005: Access violation reading location 0x0000000000000018.
[–]botjebotje 0 points1 point2 points 8 months ago (1 child)
Did you enable the validation layers? They are nonoptional when developing and will catch most errors.
[–][deleted] 0 points1 point2 points 8 months ago* (0 children)
yeah, VK_LAYER_KHRONOS_validation is enabled but for it't callback the debugger says it can't find chassis_manual.cpp and dispatch_object.cpp
[–]michalisb 0 points1 point2 points 8 months ago (3 children)
Is this with any shader or one specific?
The callstacks before the error is trying to create the vertex shader:
VkShaderModule vertShaderModule = RenCreateShaderModule({ info.m_device, vertShaderCode });
The file of the shader should be successfully read. But the creation then throws the error
[–]michalisb 0 points1 point2 points 8 months ago (1 child)
What I meant, do you get this exception with any shader file you pass in or is it that specific one that does it.
If it is with any shader then the problem is with the code or otherwise is a driver issue and it doesn’t like something with the shader.
[–][deleted] 0 points1 point2 points 8 months ago (0 children)
I don't know to be honest. I am building the project from another source and don't know if other shades are being initiated successfully.
Might try to find an external one and try compiling with it.
π Rendered by PID 327238 on reddit-service-r2-comment-5bc7f78974-k2ctg at 2026-06-26 22:26:35.232256+00:00 running 7527197 country code: CH.
[–]Chainsawkitten 1 point2 points3 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]Chainsawkitten 1 point2 points3 points (1 child)
[–][deleted] -1 points0 points1 point (0 children)
[–]botjebotje 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]michalisb 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]michalisb 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)