Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPIR-V] - BaseInstance not supported in ES profile #3106

Closed
GregSlazinski opened this issue Aug 31, 2020 · 5 comments
Closed

[SPIR-V] - BaseInstance not supported in ES profile #3106

GregSlazinski opened this issue Aug 31, 2020 · 5 comments
Assignees
Labels
spirv Work related to SPIR-V

Comments

@GregSlazinski
Copy link

GregSlazinski commented Aug 31, 2020

Hello,

Since updating DirectXShaderCompiler to the latest version, now every time I'm trying to compile for SPIRV GLSL ES 300 I'm getting the following error under SPIRV-Cross
spvc_compiler_options_set_bool(options, SPVC_COMPILER_OPTION_GLSL_ES, SPVC_TRUE);
spvc_compiler_options_set_uint(options, SPVC_COMPILER_OPTION_GLSL_VERSION, 300);
Error: "BaseInstance not supported in ES profile"

This is perhaps related to this change?
#2946
#3011

What I'm using is "SV_InstanceID", which is for HW Instancing, and it is supported in GL ES.
I'm not using any "base instance".

If you need "base instance" for something, then can you at least make it optional via compiler option instead of forced? So that I can use GLSL ES as before the update.

SpirvCross has something related to the base instance:
spvc_compiler_options_set_bool(options, SPVC_COMPILER_OPTION_GLSL_SUPPORT_NONZERO_BASE_INSTANCE, SPVC_FALSE);
I've tried setting it to SPVC_TRUE and SPVC_FALSE but still getting that error.

So maybe, instead of processing base instance on the DX Compiler side, one can just enable the SPVC_COMPILER_OPTION_GLSL_SUPPORT_NONZERO_BASE_INSTANCE for spirv-cross?

Now my shader compilation toolchain is broken, and my work is at a halt because of this issue.

@kuhar kuhar added the spirv Work related to SPIR-V label Sep 1, 2020
@kuhar
Copy link
Collaborator

kuhar commented Sep 1, 2020

Thanks for reporting, @GregSlazinski. Assigning to Ehsan, since he made the mentioned changes.

@kuhar kuhar changed the title SPIRV - BaseInstance not supported in ES profile [SPIR-V] - BaseInstance not supported in ES profile Sep 1, 2020
@ehsannas
Copy link
Contributor

SPIR-V codegen is generating gl_BaseInstance to address #2946

@ehsannas
Copy link
Contributor

We might need to add a command line option for this (e.g. -fspv-support-nonzero-base-instance), and have the default behavior to assume base instance is zero.

@ehsannas
Copy link
Contributor

I'll try to reprioritize.

@jaebaek
Copy link
Collaborator

jaebaek commented Feb 19, 2021

Fixed by #3478

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spirv Work related to SPIR-V
Projects
None yet
Development

No branches or pull requests

4 participants