-
Notifications
You must be signed in to change notification settings - Fork 18
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
libdisplay-info fixes #457
base: main
Are you sure you want to change the base?
Conversation
FILE memstream = {0}; | ||
FILE *open_memstream(char **ptr, size_t *sizeloc) { | ||
return &memstream; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally I tried to write this as:
FILE *open_memstream(char **ptr, size_t *sizeloc) {
static FILE f = {0};
return &f;
}
but this caused some runtime memory owi errors.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @filipeom, this is where we got a "cannot fetch base pointer" error.
230a3a7
to
cb3a894
Compare
double sqrt(double x) { return x; } | ||
float roundf(float x) { return x; } | ||
float log2f(float x) { return x; } | ||
float sqrtf(float x) { return x; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@filipeom I believe we could map many of those directly to corresponding Wasm instructions, right? I'm thinking of stuff like {f32,f64}.{floor,ceil,sqrt}
.
Thanks for the various patches!
Great! This is a little bit long. I'm going to see if I can make this faster. Have you tried to push it further ? |
+ size = 128; I have a question regarding the initial size. 128 is the maximum allowed size, right? What is the minimum one? It could help a lot to use a smaller one for my investigation in order to reduce execution time. |
128 is the minimum valid size for an EDID blob. To expand on this a bit: an EDID blob is made up of 1 or more blocks, and each block takes 128 bytes. |
A bunch of fixes to make owi work with libdisplay-info.
Test with:
It reached the
owi_assert(0)
in the patch below after 27 minutes of execution time.libdisplay-info patch
I also had to add
#define __ASSERT_FUNCTION NULL
otherwise it would fail compilation because it's undefined.