Comments (12)
Put a breakpoint in the DebugCallback and it'll tell you which call it was.
from fna.
It also looks like your drivers are out of date:
from fna.
Good shout, it produces the error during the call to MOJOSHADER_glCompileEffect. I agree the drivers may be out of date on this laptop, but I got the same issue on my work machine running up to date nvidea drivers.
from fna.
If you've also got the latest fnalibs and you're still getting this then you'll have to step through this:
https://github.com/flibitijibibo/MojoShader/blob/master/mojoshader_opengl.c#L416
The likelihood of an actual INVALID_ENUM is extremely unlikely, as it would have to be glCreateShader getting sent GL_NONE, which is only true if you're attempting to send a shader other than vertex/pixel, which wouldn't make it past the parsing process.
from fna.
I am using the latest fnalibs, Ill step through that code first thing and post what I find. Thanks for your help.
from fna.
After stepping through the failure occurs in mojoshader.c 2723:
fail(ctx, "unsupported color index");
it was caused by an effect file which passed a color between the Vertex shader, and Pixel shader using COLOR2.
I'm not sure if by using that channel if I am violating the usage of the COLOR2 semantic, but the problem is fixed by passing a float4 using a TEXCOORD semantic.
from fna.
I believe I fixed this with the latest MojoShader commit, can you try it out?
from fna.
I just tried your latest commit, and that fixes the unknown variable issue. Thank you! What do you think about trying to get access to the fail reasons which are written too during processing and trying to expose them to the FNA logger? even if it is only during debug sessions. May make diagnostics easier in future, which in my case testing on windows involved a lot of printf statements.
from fna.
Error checking for the effects has been a very overdue fix, so I'd be up for that. Just add it to this method using FNAPlatform.Log and I'll pull it in (check your tabs carefully! ;P ).
https://github.com/FNA-XNA/FNA/blob/master/src/Graphics/OpenGLDevice.cs#L1750
from fna.
So I have written at least logging errors for parsing of effects, however it also uses Utf8 to managed string marshaling like that which exists in SDL2# LPUtf8StrMarshaler, and which is also used in SDL2_FnaPlatform. Do you have a place for sticking a convenience method such as:
private static unsafe string MarshalNativeUtf8ToManagedString(IntPtr pNativeData)
{
if (pNativeData == IntPtr.Zero)
return null;
var ptr = (byte*)pNativeData;
while (*ptr != 0)
{
ptr++;
}
var bytes = new byte[ptr - (byte*)pNativeData];
Marshal.Copy(pNativeData, bytes, 0, bytes.Length);
return Encoding.UTF8.GetString(bytes);
}
which could be used at least initially in OpenGLDevice#CreateEffect ?
from fna.
At the moment no, but I wouldn't mind if you just copied this into that function:
https://github.com/FNA-XNA/FNA/blob/master/src/SDL2/SDL2_FNAPlatform.cs#L395
from fna.
This will be fixed with the next fnalibs update, pending #24's fixes.
from fna.
Related Issues (20)
- Fn HOT 2
- [MojoShader] Preshaders with bool outputs aren't supported HOT 3
- mono_thread_internal_set_priority: unknown policy 5
- Expose FAudioContext or Device Handle HOT 3
- arm64 fnalibs for Apple Silicone Macs HOT 3
- Add GitHub Actions HOT 1
- Terraria: sigsegv when using vulkan renderer in newer versions of FNA HOT 3
- Add DPI Awareness hint for Windows
- Do a second take of #442 HOT 1
- Support for net8.0-ios targets HOT 2
- Incorrect Wiki instructions: Chapter 5 Creating New Projects HOT 1
- SharpFont + SpriteFont HOT 2
- VertexPositionColorNormalTexture HOT 3
- System.NullReferenceException when using BasicEffect HOT 2
- Question about the process of porting NativeAOT to Consiles HOT 3
- Newer Shader Models
- Add extension method for loading mipmap texture from stream HOT 3
- White artifacts on certain color values in DDS HOT 5
- [BUG] Can't download clone the Wiki HOT 1
- Proxy Blade Zero (313980): Black Screen issue
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 fna.