Comments (18)
I've merge both fixes on master this morning, and remote git https://github.com/jpbruyere/vkvg/tree/master/src/recording/vkvg_record_internal.h looks good to me, try maybe with a clean git clone, sometimes with rebase there are some changes in remote history that are not applied locally. Wait, that's recording=false, I check...ok you're right, I make the fix now. Done, the fix is pushed on master, thanks for the report.
from vkvg.
One more comment. vkGetPhysicalDeviceFeatures2
is a 1.1 feature, maybe update the readme that 1.1 is a minumum requirement.
from vkvg.
or just:
#ifdef VK_MAKE_API_VERSION
.apiVersion = VK_MAKE_API_VERSION (0, version_major, version_minor, 0),
#else
.apiVersion = VK_MAKE_VERSION (version_major, version_minor, 0),
#endif
from vkvg.
VK_MAKE_API_VERSION fix, is pushed with note on readme for min vulkan version, for the return values, it's on my todo list, thanks again.
from vkvg.
Awesome, thanks. One more suggestion: Latest NDK defines VK_VERSION_1_2, even though few android devices support it, and you use this to set VKVG_VK_SCALAR_BLOCK_SUPPORTED
. So with the latest NDK, I can't disable scalar block layout. Maybe the cmake setting to be to force disable scalar block?
from vkvg.
So I don't automatically enable scalar block if version = 1.2, but by default the option is enabled.
from vkvg.
I've pushed a fix #104
from vkvg.
Thank you for that report:-). Default layout fallback means c struct padding...
from vkvg.
I've made a fix in android_fix
branch. I kept only compile time checks, handling 2 different structs at runtime don't look a too good option for me. If vulkan version < 1_2, I added a cmake option to force scalar block support. cmake > 3.23 will bring Vulkan_VERSION
constant that we could use as option dependency.
I've not yet tested if vk version < 1_2.
from vkvg.
Thanks. I was unable to test, the git submodule ref for vkh is broken in the android_fix
branch.
from vkvg.
I've forgot to push vkh changes, done now, sorry.
from vkvg.
Awesome thanks. More feedback:
VK_MAKE_VERSION
takes three args:
.apiVersion = VK_MAKE_VERSION (version_major, version_minor, 0)
- error building with recording:
/root/vkvg/src/vkvg_context.c:613:2: error: non-void function 'vkvg_rectangle' should return a value [-Wreturn-type]
RECORD(ctx, VKVG_CMD_RECTANGLE, x, y, w, h);
- error building vkvg-svg:
/root/vkvg/external/vkvg-svg/src/parser_gen.h:5031:2: error: non-void function 'read_svg_attributes' should return a value [-Wreturn-type]
ELEMENT_PRE_PROCESS_SVG
^
/root/vkvg/external/vkvg-svg/src/vkvg_svg.c:1799:3: note: expanded from macro 'ELEMENT_PRE_PROCESS_SVG'
return;\
- Lots of these warnings:
/root/vkvg/src/vkvg_surface.c:261:21: warning: expression result unused [-Wunused-value]
LOG(VKVG_LOG_ERR, "vkvg_surface_write_to_png failed, invalid status: %d\n", surf->status);
- Needs isnan_fix branch.
from vkvg.
ok, thanks. I'm aware of those problems with return values, I need to fix it (but it compile on my debian), For unused-value, I disable the warning, but maybe not on all platform (I'll double check it). Also I don't know if there is a better pattern for a macro disabling its content on release mode. For the make version I'll have to wrap both in a local macro I guess...Thank you for your help...
from vkvg.
return value bugs should be solved too, I've pushed all on the android_fix branch.
from vkvg.
-DVKVG_RECORDING=false
is currently broken:
/root/vkvg/src/vkvg_context.c: In function 'vkvg_rectangle':
/root/vkvg/src/vkvg_context.c:613:2: warning: implicit declaration of function 'RECORD2'; did you mean 'RECORD'? [-Wimplicit-function-declaration]
613 | RECORD2(ctx, VKVG_CMD_RECTANGLE, x, y, w, h);
| ^~~~~~~
| RECORD
/root/vkvg/src/vkvg_context.c:613:15: error: 'VKVG_CMD_RECTANGLE' undeclared (first use in this function)
613 | RECORD2(ctx, VKVG_CMD_RECTANGLE, x, y, w, h);
from vkvg.
Disabling scalar block layout breaks gradients on my system. With or without scalar block enabled, the shader seems to expect:
typedef struct _vkvg_gradient_t {
vkvg_color_t colors[16];
float stops[16];
vec4 cp[2];
uint32_t count;
}vkvg_gradient_t;
If I understand correctly, this layout should match both scalar
and std430
, but not std140
. Could std430
always be specified?
from vkvg.
I can confirm that if I use the struct above, use std430
instead of scalar
in the shader, then its no longer necessary to enable the scalar block extension.
from vkvg.
I'm using #ifdef GL_EXT_scalar_block_layout
in the shader to choose between the aligned or not structures, but because we made the use of scalar block layout independant from it's presence (we made it a compile option), I have to pass the vkvg option status to the shader on compilation. std430 still have alignments subtilities, I try my first option, if there's still problems, I will investigate your proposition..
from vkvg.
Related Issues (20)
- gradient alpha channel ignored HOT 2
- Segfaults in surface test HOT 1
- Build deb for Debian / Ubuntu HOT 2
- Premult Alpha handling for image load/write
- Special objects with VKVG_STATUS_NO_MEMORY instead of NULL pointer.
- TimeLine semaphore HOT 2
- Issue with getting glyphs info HOT 26
- Implementing Unit Testing with Meson
- Tests crash and other related bugs and Validation errors: HOT 11
- Having trouble using vkh.h HOT 1
- M_PI undeclared HOT 2
- tests/bezier screen not clear on each frame HOT 3
- Cannot build tests on linux with static GLFW HOT 3
- Multi-window support? HOT 3
- crash when i use multithreaded to draw text HOT 5
- i want to remove the font lock HOT 1
- Vulkan validator prints error on fragment compilation (vkCreateShaderModule) HOT 8
- Failed to build on MSYS2 MINGW64 HOT 3
- logicOp not supported on MoltenVK / M2 Mini HOT 3
- vkvg api to query vulkan context creation requirements
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 vkvg.