Questions about the shaderc library, a C++ utility to compile glsl shaders at runtime.
Questions tagged [shaderc]
9 questions
2
votes
1 answer
How to infer shader type with "shaderc_glsl_infer_from_source"?
I am using shaderc for compiling my shaders. In order to do so, I have to specify the type of shader (shaderc_shader_kind). One of the available types is shaderc_glsl_infer_from_source. The in-code comments say that this type "deduce the shader kind…

Anselmo GPP
- 425
- 2
- 21
2
votes
1 answer
Invalid entry point for shader when using HLSL->SPIR-V->OpenGL
I am trying to implement a system so that I can use HLSL in my OpenGL application, since it can be compiled to SPIR-V, and SPIR-V can be translated to something that works with e.g DirectX.
However, I receive an error when specializing the…

khhs
- 21
- 3
1
vote
0 answers
How to tell shaderc not to strip away unused bindings?
I am having an issue compiling HLSL to spirv. Shaderc will detect unused uniform bindings and optimize them out (it does not do this with glsl only with hlsl). This in turn makes it hard to debug my shaders, as I am trying to send data to undeclared…

Makogan
- 8,208
- 7
- 44
- 112
1
vote
0 answers
How to solve 'Entry Point Not Found' error in a Vulkan project (CMake 3.21/VisualStudio/C++20/VMA/shaderc)
(firstly I'm a chinese, so there might be some syntax errors. I'm sorry for that)
So yesterday I just update my VulkanSDK version to the newest (version 1.3.216.0) as well as VMA, but there's a runtime error occured when I try to run the code which…

dance_0607
- 11
- 1
0
votes
1 answer
HLSL compiled with shaderc and introspected with SPIRV-cross has wrong size?
I am compiling this shader
struct VSInput
{
[[vk::location(0)]] float2 Pos : POSITION0;
[[vk::location(1)]] float3 Color : COLOR0;
};
struct UBO
{
float2x2 transform;
};
cbuffer ubo : register(b0) { UBO ubo; }
struct VSOutput
{
float4 Pos…

Makogan
- 8,208
- 7
- 44
- 112
0
votes
1 answer
Spirv cross and HLSL for vulkan, merge bindings?
I am extracting reflection data from an HLSL shader targetting vulkan using spirv-cross. This is the shader in question:
struct VSInput
{
[[vk::location(0)]] float2 Pos : POSITION0;
[[vk::location(1)]] float3 Color : COLOR0;
};
struct UBO
{
…

Makogan
- 8,208
- 7
- 44
- 112
0
votes
1 answer
glsl conditionally assigning out_color
I'm trying to achieve blending by using a shader to conditionally assign the fragment color.
Full shader code...
#version 450
#pragma shader_stage(fragment)
layout(binding = 1) uniform sampler2D texture_sampler;
layout(location = 0) in vec2…

David Carpenter
- 1,389
- 2
- 16
- 29
0
votes
0 answers
How to have a structure of buffer_reference types in Vulkan GLSL?
I'm using shaderc that comes VulkanSDK-1.3.224.1. Attempting to compile the following when added to any of my shaders:
#extension GL_EXT_scalar_block_layout: enable
#extension GL_EXT_buffer_reference2 : enable
#extension…

Krupip
- 4,404
- 2
- 32
- 54
0
votes
0 answers
Why I get error: OpenGL compatibility profile is not supported
I've just downloaded the lastest Vulkan SDK version (1.3.224.1) and when I try to compile a shader using shaderc I get this error: error: OpenGL compatibility profile is not supported.
I've cloned Hazel-2D Engine: https://github.com/TheCherno/Hazel…

Shout
- 338
- 5
- 14