fwk: sync up
parent
afd2399ec0
commit
5841bfbff2
|
@ -20,12 +20,12 @@
|
|||
// status: CUBE(1)+BLUR(1): ok
|
||||
// status: CUBE(1)+BLUR(0): ok
|
||||
// status: CUBE(?)+BLUR(?): no {
|
||||
// 003.470s|!cannot find uniform 'shadowMap' in shader program 21 |shader_uniform|fwk_render.c:772
|
||||
// 001: 00007FF7AF6A3FDA callstack (C:\prj\thread\FWK\fwk_system.c:250)
|
||||
// 002: 00007FF7AF8E7CBC shader_uniform (C:\prj\thread\FWK\fwk_render.c:772)
|
||||
// 003: 00007FF7AF691C27 shader_int (C:\prj\thread\FWK\fwk_render.c:777)
|
||||
// 004: 00007FF7AF8F54EF color_begin (C:\prj\thread\FWK\spot.c:525)
|
||||
// 005: 00007FF7AF8F5BF7 main (C:\prj\thread\FWK\spot.c:607)
|
||||
// 003.470s|!cannot find uniform 'shadowMap' in shader program 21 |shader_uniform|v4k_render.c:772
|
||||
// 001: 00007FF7AF6A3FDA callstack (C:\prj\thread\V4K\v4k_system.c:250)
|
||||
// 002: 00007FF7AF8E7CBC shader_uniform (C:\prj\thread\V4K\v4k_render.c:772)
|
||||
// 003: 00007FF7AF691C27 shader_int (C:\prj\thread\V4K\v4k_render.c:777)
|
||||
// 004: 00007FF7AF8F54EF color_begin (C:\prj\thread\V4K\spot.c:525)
|
||||
// 005: 00007FF7AF8F5BF7 main (C:\prj\thread\V4K\spot.c:607)
|
||||
// }
|
||||
|
||||
#ifndef VSMCUBE
|
||||
|
|
|
@ -2360,7 +2360,7 @@ int texture_width;
|
|||
void shader_colormap(const char *name, colormap_t cm);
|
||||
unsigned shader_get_active();
|
||||
void shader_destroy(unsigned shader);
|
||||
enum BUFFER_ACCESS_MODE {
|
||||
enum BUFFER_MODE {
|
||||
BUFFER_READ,
|
||||
BUFFER_WRITE,
|
||||
BUFFER_READ_WRITE
|
||||
|
@ -2371,7 +2371,7 @@ BUFFER_READ_WRITE
|
|||
void shader_image_unit(unsigned texture, unsigned unit, unsigned level, int layer, unsigned texel_type, unsigned access);
|
||||
void image_write_barrier();
|
||||
void write_barrier();
|
||||
enum SSBO_USAGE_MODE {
|
||||
enum SSBO_USAGE {
|
||||
STATIC_DRAW,
|
||||
STATIC_READ,
|
||||
STATIC_COPY,
|
||||
|
|
|
@ -16491,14 +16491,13 @@ API void shader_colormap(const char *name, colormap_t cm);
|
|||
API unsigned shader_get_active();
|
||||
API void shader_destroy(unsigned shader);
|
||||
|
||||
enum BUFFER_ACCESS_MODE {
|
||||
// compute shaders
|
||||
enum BUFFER_MODE {
|
||||
BUFFER_READ,
|
||||
BUFFER_WRITE,
|
||||
BUFFER_READ_WRITE
|
||||
};
|
||||
|
||||
// compute shaders
|
||||
|
||||
/// Loads the compute shader and compiles a GL program.
|
||||
/// return: GL program, 0 if failed.
|
||||
/// cs: shader source code
|
||||
|
@ -16517,7 +16516,7 @@ API void compute_dispatch(unsigned wx, unsigned wy, unsigned wz);
|
|||
/// level: texture level access (MIP0, MIP1, ...)
|
||||
/// layer: bind layer
|
||||
/// access: texture access policy
|
||||
/// see: ACCESS_MODE
|
||||
/// see: BUFFER_MODE
|
||||
API void shader_image(texture_t t, unsigned unit, unsigned level, int layer, unsigned access);
|
||||
|
||||
/// Binds a texture to the program
|
||||
|
@ -16528,7 +16527,7 @@ API void shader_image(texture_t t, unsigned unit, unsigned level, int layer, uns
|
|||
/// layer: bind layer
|
||||
/// texel_type: image texel format (RGBA8, RGBA32F, ...)
|
||||
/// access: texture access policy
|
||||
/// see: ACCESS_MODE
|
||||
/// see: BUFFER_MODE
|
||||
API void shader_image_unit(unsigned texture, unsigned unit, unsigned level, int layer, unsigned texel_type, unsigned access);
|
||||
|
||||
// gpu memory barriers
|
||||
|
@ -16544,7 +16543,7 @@ API void write_barrier();
|
|||
/// `DRAW` favors CPU->GPU operations.
|
||||
/// `READ` favors GPU->CPU operations.
|
||||
/// `COPY` favors CPU->GPU->CPU operations.
|
||||
enum SSBO_USAGE_MODE {
|
||||
enum SSBO_USAGE {
|
||||
STATIC_DRAW,
|
||||
STATIC_READ,
|
||||
STATIC_COPY,
|
||||
|
@ -16569,7 +16568,7 @@ enum SSBO_ACCESS {
|
|||
/// data: optional pointer to data to upload
|
||||
/// len: buffer size, must not be 0
|
||||
/// usage: buffer usage policy
|
||||
/// see: USAGE_MODE
|
||||
/// see: SSBO_USAGE
|
||||
API unsigned ssbo_create(const void *data, int len, unsigned usage);
|
||||
|
||||
/// Destroys an SSBO resource
|
||||
|
@ -16591,7 +16590,7 @@ API void ssbo_bind(unsigned ssbo, unsigned unit);
|
|||
/// !!! Make sure to `ssbo_unmap` the buffer once done working with it.
|
||||
/// access: buffer access policy
|
||||
/// return: pointer to physical memory of the buffer
|
||||
/// see: ACCESS_MODE
|
||||
/// see: SSBO_ACCESS
|
||||
API void *ssbo_map(unsigned access);
|
||||
|
||||
/// Unmaps an SSBO resource
|
||||
|
@ -333729,13 +333728,15 @@ void vfs_reload() {
|
|||
|
||||
// mount virtual filesystems later (mounting order matters: low -> to -> high priority)
|
||||
#if defined(EMSCRIPTEN)
|
||||
vfs_mount("index.zip");
|
||||
#else
|
||||
/* // old way
|
||||
for( int i = 0; i < JOBS_MAX; ++i) {
|
||||
if( vfs_mount(va(".art[%02x].zip", i)) ) continue;
|
||||
if( vfs_mount(va("%s[%02x].zip", app, i)) ) continue;
|
||||
if( vfs_mount(va("%s%02x.zip", app, i)) ) continue;
|
||||
// if( vfs_mount(va("%s.%02x", app, i)) ) continue;
|
||||
}
|
||||
#else
|
||||
} */
|
||||
// faster way
|
||||
for( const char **file = file_list("./","*.zip"); *file; ++file) vfs_mount(*file);
|
||||
#endif
|
||||
|
@ -334016,6 +334017,15 @@ if( found && *found == 0 ) {
|
|||
last_size = size;
|
||||
}
|
||||
|
||||
// yet another last resort: redirect vfs_load() calls to file_load()
|
||||
// (for environments without tools or cooked assets)
|
||||
if(!ptr) {
|
||||
static bool have_tools; do_once have_tools = file_exist(COOK_INI);
|
||||
if( !have_tools ) {
|
||||
ptr = file_load(pathfile, size_out);
|
||||
}
|
||||
}
|
||||
|
||||
if(!ptr) {
|
||||
PRINTF("Loading %s (not found)\n", pathfile);
|
||||
}
|
||||
|
|
|
@ -516,13 +516,15 @@ void vfs_reload() {
|
|||
|
||||
// mount virtual filesystems later (mounting order matters: low -> to -> high priority)
|
||||
#if defined(EMSCRIPTEN)
|
||||
vfs_mount("index.zip");
|
||||
#else
|
||||
/* // old way
|
||||
for( int i = 0; i < JOBS_MAX; ++i) {
|
||||
if( vfs_mount(va(".art[%02x].zip", i)) ) continue;
|
||||
if( vfs_mount(va("%s[%02x].zip", app, i)) ) continue;
|
||||
if( vfs_mount(va("%s%02x.zip", app, i)) ) continue;
|
||||
// if( vfs_mount(va("%s.%02x", app, i)) ) continue;
|
||||
}
|
||||
#else
|
||||
} */
|
||||
// faster way
|
||||
for( const char **file = file_list("./","*.zip"); *file; ++file) vfs_mount(*file);
|
||||
#endif
|
||||
|
@ -803,6 +805,15 @@ if( found && *found == 0 ) {
|
|||
last_size = size;
|
||||
}
|
||||
|
||||
// yet another last resort: redirect vfs_load() calls to file_load()
|
||||
// (for environments without tools or cooked assets)
|
||||
if(!ptr) {
|
||||
static bool have_tools; do_once have_tools = file_exist(COOK_INI);
|
||||
if( !have_tools ) {
|
||||
ptr = file_load(pathfile, size_out);
|
||||
}
|
||||
}
|
||||
|
||||
if(!ptr) {
|
||||
PRINTF("Loading %s (not found)\n", pathfile);
|
||||
}
|
||||
|
|
|
@ -335,14 +335,13 @@ API void shader_colormap(const char *name, colormap_t cm);
|
|||
API unsigned shader_get_active();
|
||||
API void shader_destroy(unsigned shader);
|
||||
|
||||
enum BUFFER_ACCESS_MODE {
|
||||
// compute shaders
|
||||
enum BUFFER_MODE {
|
||||
BUFFER_READ,
|
||||
BUFFER_WRITE,
|
||||
BUFFER_READ_WRITE
|
||||
};
|
||||
|
||||
// compute shaders
|
||||
|
||||
/// Loads the compute shader and compiles a GL program.
|
||||
/// return: GL program, 0 if failed.
|
||||
/// cs: shader source code
|
||||
|
@ -361,7 +360,7 @@ API void compute_dispatch(unsigned wx, unsigned wy, unsigned wz);
|
|||
/// level: texture level access (MIP0, MIP1, ...)
|
||||
/// layer: bind layer
|
||||
/// access: texture access policy
|
||||
/// see: ACCESS_MODE
|
||||
/// see: BUFFER_MODE
|
||||
API void shader_image(texture_t t, unsigned unit, unsigned level, int layer, unsigned access);
|
||||
|
||||
/// Binds a texture to the program
|
||||
|
@ -372,7 +371,7 @@ API void shader_image(texture_t t, unsigned unit, unsigned level, int layer, uns
|
|||
/// layer: bind layer
|
||||
/// texel_type: image texel format (RGBA8, RGBA32F, ...)
|
||||
/// access: texture access policy
|
||||
/// see: ACCESS_MODE
|
||||
/// see: BUFFER_MODE
|
||||
API void shader_image_unit(unsigned texture, unsigned unit, unsigned level, int layer, unsigned texel_type, unsigned access);
|
||||
|
||||
// gpu memory barriers
|
||||
|
@ -388,7 +387,7 @@ API void write_barrier();
|
|||
/// `DRAW` favors CPU->GPU operations.
|
||||
/// `READ` favors GPU->CPU operations.
|
||||
/// `COPY` favors CPU->GPU->CPU operations.
|
||||
enum SSBO_USAGE_MODE {
|
||||
enum SSBO_USAGE {
|
||||
STATIC_DRAW,
|
||||
STATIC_READ,
|
||||
STATIC_COPY,
|
||||
|
@ -413,7 +412,7 @@ enum SSBO_ACCESS {
|
|||
/// data: optional pointer to data to upload
|
||||
/// len: buffer size, must not be 0
|
||||
/// usage: buffer usage policy
|
||||
/// see: USAGE_MODE
|
||||
/// see: SSBO_USAGE
|
||||
API unsigned ssbo_create(const void *data, int len, unsigned usage);
|
||||
|
||||
/// Destroys an SSBO resource
|
||||
|
@ -435,7 +434,7 @@ API void ssbo_bind(unsigned ssbo, unsigned unit);
|
|||
/// !!! Make sure to `ssbo_unmap` the buffer once done working with it.
|
||||
/// access: buffer access policy
|
||||
/// return: pointer to physical memory of the buffer
|
||||
/// see: ACCESS_MODE
|
||||
/// see: SSBO_ACCESS
|
||||
API void *ssbo_map(unsigned access);
|
||||
|
||||
/// Unmaps an SSBO resource
|
||||
|
|
15
engine/v4k.c
15
engine/v4k.c
|
@ -4638,13 +4638,15 @@ void vfs_reload() {
|
|||
|
||||
// mount virtual filesystems later (mounting order matters: low -> to -> high priority)
|
||||
#if defined(EMSCRIPTEN)
|
||||
vfs_mount("index.zip");
|
||||
#else
|
||||
/* // old way
|
||||
for( int i = 0; i < JOBS_MAX; ++i) {
|
||||
if( vfs_mount(va(".art[%02x].zip", i)) ) continue;
|
||||
if( vfs_mount(va("%s[%02x].zip", app, i)) ) continue;
|
||||
if( vfs_mount(va("%s%02x.zip", app, i)) ) continue;
|
||||
// if( vfs_mount(va("%s.%02x", app, i)) ) continue;
|
||||
}
|
||||
#else
|
||||
} */
|
||||
// faster way
|
||||
for( const char **file = file_list("./","*.zip"); *file; ++file) vfs_mount(*file);
|
||||
#endif
|
||||
|
@ -4925,6 +4927,15 @@ if( found && *found == 0 ) {
|
|||
last_size = size;
|
||||
}
|
||||
|
||||
// yet another last resort: redirect vfs_load() calls to file_load()
|
||||
// (for environments without tools or cooked assets)
|
||||
if(!ptr) {
|
||||
static bool have_tools; do_once have_tools = file_exist(COOK_INI);
|
||||
if( !have_tools ) {
|
||||
ptr = file_load(pathfile, size_out);
|
||||
}
|
||||
}
|
||||
|
||||
if(!ptr) {
|
||||
PRINTF("Loading %s (not found)\n", pathfile);
|
||||
}
|
||||
|
|
15
engine/v4k.h
15
engine/v4k.h
|
@ -2574,14 +2574,13 @@ API void shader_colormap(const char *name, colormap_t cm);
|
|||
API unsigned shader_get_active();
|
||||
API void shader_destroy(unsigned shader);
|
||||
|
||||
enum BUFFER_ACCESS_MODE {
|
||||
// compute shaders
|
||||
enum BUFFER_MODE {
|
||||
BUFFER_READ,
|
||||
BUFFER_WRITE,
|
||||
BUFFER_READ_WRITE
|
||||
};
|
||||
|
||||
// compute shaders
|
||||
|
||||
/// Loads the compute shader and compiles a GL program.
|
||||
/// return: GL program, 0 if failed.
|
||||
/// cs: shader source code
|
||||
|
@ -2600,7 +2599,7 @@ API void compute_dispatch(unsigned wx, unsigned wy, unsigned wz);
|
|||
/// level: texture level access (MIP0, MIP1, ...)
|
||||
/// layer: bind layer
|
||||
/// access: texture access policy
|
||||
/// see: ACCESS_MODE
|
||||
/// see: BUFFER_MODE
|
||||
API void shader_image(texture_t t, unsigned unit, unsigned level, int layer, unsigned access);
|
||||
|
||||
/// Binds a texture to the program
|
||||
|
@ -2611,7 +2610,7 @@ API void shader_image(texture_t t, unsigned unit, unsigned level, int layer, uns
|
|||
/// layer: bind layer
|
||||
/// texel_type: image texel format (RGBA8, RGBA32F, ...)
|
||||
/// access: texture access policy
|
||||
/// see: ACCESS_MODE
|
||||
/// see: BUFFER_MODE
|
||||
API void shader_image_unit(unsigned texture, unsigned unit, unsigned level, int layer, unsigned texel_type, unsigned access);
|
||||
|
||||
// gpu memory barriers
|
||||
|
@ -2627,7 +2626,7 @@ API void write_barrier();
|
|||
/// `DRAW` favors CPU->GPU operations.
|
||||
/// `READ` favors GPU->CPU operations.
|
||||
/// `COPY` favors CPU->GPU->CPU operations.
|
||||
enum SSBO_USAGE_MODE {
|
||||
enum SSBO_USAGE {
|
||||
STATIC_DRAW,
|
||||
STATIC_READ,
|
||||
STATIC_COPY,
|
||||
|
@ -2652,7 +2651,7 @@ enum SSBO_ACCESS {
|
|||
/// data: optional pointer to data to upload
|
||||
/// len: buffer size, must not be 0
|
||||
/// usage: buffer usage policy
|
||||
/// see: USAGE_MODE
|
||||
/// see: SSBO_USAGE
|
||||
API unsigned ssbo_create(const void *data, int len, unsigned usage);
|
||||
|
||||
/// Destroys an SSBO resource
|
||||
|
@ -2674,7 +2673,7 @@ API void ssbo_bind(unsigned ssbo, unsigned unit);
|
|||
/// !!! Make sure to `ssbo_unmap` the buffer once done working with it.
|
||||
/// access: buffer access policy
|
||||
/// return: pointer to physical memory of the buffer
|
||||
/// see: ACCESS_MODE
|
||||
/// see: SSBO_ACCESS
|
||||
API void *ssbo_map(unsigned access);
|
||||
|
||||
/// Unmaps an SSBO resource
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; this is where you specify and configure the FWK pipeline.
|
||||
; this is where you specify and configure the V4K pipeline.
|
||||
; tweak the pipeline and add new importers just by editing this file.
|
||||
; there is no flow control in this script file: lines are parsed and evaluated, from top to bottom.
|
||||
|
||||
|
|
Loading…
Reference in New Issue