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

[Effects] Struct parameters with nested structs #8

Open
flibitijibibo opened this issue May 21, 2019 · 2 comments
Open

[Effects] Struct parameters with nested structs #8

flibitijibibo opened this issue May 21, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@flibitijibibo
Copy link
Collaborator

flibitijibibo commented May 21, 2019

Issue migrated from FNA-XNA/FNA#255

CC @kg

@flibitijibibo flibitijibibo changed the title [Feature Request] Nested struct parameters [Feature Request] Struct parameters with nested structs, matrices May 21, 2019
@flibitijibibo
Copy link
Collaborator Author

This fixes the matrix assertion failure found in SquaredBitmapShader, but the memory layout may be incorrect:

diff -r 3e07483a681c mojoshader_effects.c
--- a/mojoshader_effects.c      Sat Apr 27 17:03:28 2019 -0400
+++ b/mojoshader_effects.c      Tue May 21 15:33:12 2019 -0400
@@ -373,7 +373,7 @@
 
             // !!! FIXME: Nested structs! -flibit
             assert(mem->info.parameter_class >= MOJOSHADER_SYMCLASS_SCALAR
-                && mem->info.parameter_class <= MOJOSHADER_SYMCLASS_VECTOR);
+                && mem->info.parameter_class <= MOJOSHADER_SYMCLASS_MATRIX_COLUMNS);
             assert(mem->info.parameter_type >= MOJOSHADER_SYMTYPE_BOOL
                 && mem->info.parameter_type <= MOJOSHADER_SYMTYPE_FLOAT);
             mem->info.member_count = 0;

@flibitijibibo flibitijibibo changed the title [Feature Request] Struct parameters with nested structs, matrices [Feature Request] Struct parameters with nested structs May 27, 2019
@flibitijibibo
Copy link
Collaborator Author

The matrices are indeed laid out properly, so nested structs are what's left. Good luck to anyone who actually needs that...

@flibitijibibo flibitijibibo changed the title [Feature Request] Struct parameters with nested structs Struct parameters with nested structs Jul 13, 2021
@flibitijibibo flibitijibibo added the enhancement New feature or request label Jul 13, 2021
@flibitijibibo flibitijibibo changed the title Struct parameters with nested structs [Effects] Struct parameters with nested structs Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant