Revert "Project modernization (#630)"

This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.

This reverts commit a9be52c41a.
This commit is contained in:
Loki Rautio
2026-03-07 21:12:22 -06:00
parent a9be52c41a
commit 087b7e7abf
1373 changed files with 19449 additions and 19903 deletions

View File

@@ -751,7 +751,7 @@ static void api_free_resource(GDrawHandle *r)
S32 i;
for (i=0; i < MAX_SAMPLERS; i++)
if (gdraw->active_tex[i] == (GDrawTexture *) r)
gdraw->active_tex[i] = nullptr;
gdraw->active_tex[i] = NULL;
}
static void RADLINK gdraw_UnlockHandles(GDrawStats *stats)
@@ -772,7 +772,7 @@ extern GDrawTexture *gdraw_GCM_WrappedTextureCreate(CellGcmTexture *gcm_tex)
memset(&stats, 0, sizeof(stats));
GDrawHandle *p = gdraw_res_alloc_begin(gdraw->texturecache, 0, &stats); // it may need to free one item to give us a handle
p->handle.tex.gcm_ptr = 0;
gdraw_HandleCacheAllocateEnd(p, 0, nullptr, GDRAW_HANDLE_STATE_user_owned);
gdraw_HandleCacheAllocateEnd(p, 0, NULL, GDRAW_HANDLE_STATE_user_owned);
gdraw_GCM_WrappedTextureChange((GDrawTexture *) p, gcm_tex);
return (GDrawTexture *) p;
}
@@ -816,11 +816,11 @@ static bool is_texture_swizzled(S32 w, S32 h)
static rrbool RADLINK gdraw_MakeTextureBegin(void *owner, S32 width, S32 height, gdraw_texture_format gformat, U32 flags, GDraw_MakeTexture_ProcessingInfo *p, GDrawStats *stats)
{
S32 bytes_pixel = 4;
GDrawHandle *t = nullptr;
GDrawHandle *t = NULL;
bool swizzled = false;
if (width > 4096 || height > 4096) {
IggyGDrawSendWarning(nullptr, "GDraw %d x %d texture not supported by hardware (dimension size limit 4096)", width, height);
IggyGDrawSendWarning(NULL, "GDraw %d x %d texture not supported by hardware (dimension size limit 4096)", width, height);
return false;
}
@@ -893,7 +893,7 @@ static rrbool RADLINK gdraw_MakeTextureBegin(void *owner, S32 width, S32 height,
if (swizzled || (flags & GDRAW_MAKETEXTURE_FLAGS_mipmap)) {
rrbool ok;
assert(p->temp_buffer != nullptr);
assert(p->temp_buffer != NULL);
ok = gdraw_MipmapBegin(&gdraw->mipmap, width, height, mipmaps,
bytes_pixel, p->temp_buffer, p->temp_buffer_bytes);
assert(ok); // this should never hit unless the temp_buffer is way too small
@@ -1023,8 +1023,8 @@ static void RADLINK gdraw_UpdateTextureEnd(GDrawTexture *t, void *unique_id, GDr
static void RADLINK gdraw_FreeTexture(GDrawTexture *tt, void *unique_id, GDrawStats *stats)
{
GDrawHandle *t = (GDrawHandle *) tt;
assert(t != nullptr); // @GDRAW_ASSERT
if (t->owner == unique_id || unique_id == nullptr) {
assert(t != NULL); // @GDRAW_ASSERT
if (t->owner == unique_id || unique_id == NULL) {
if (t->cache == &gdraw->rendertargets) {
gdraw_HandleCacheUnlock(t);
// cache it by simply not freeing it
@@ -1121,7 +1121,7 @@ static rrbool RADLINK gdraw_TryLockVertexBuffer(GDrawVertexBuffer *vb, void *uni
static void RADLINK gdraw_FreeVertexBuffer(GDrawVertexBuffer *vb, void *unique_id, GDrawStats *stats)
{
GDrawHandle *h = (GDrawHandle *) vb;
assert(h != nullptr); // @GDRAW_ASSERT
assert(h != NULL); // @GDRAW_ASSERT
if (h->owner == unique_id)
gdraw_res_kill(h, stats);
}
@@ -1152,19 +1152,19 @@ static GDrawHandle *get_color_rendertarget(GDrawStats *stats)
t = gdraw_HandleCacheAllocateBegin(&gdraw->rendertargets);
if (!t) {
IggyGDrawSendWarning(nullptr, "GDraw rendertarget allocation failed: hit handle limit");
IggyGDrawSendWarning(NULL, "GDraw rendertarget allocation failed: hit handle limit");
return t;
}
void *ptr = gdraw_arena_alloc(&gdraw->rt_arena, size, 1);
if (!ptr) {
IggyGDrawSendWarning(nullptr, "GDraw rendertarget allocation failed: out of rendertarget texture memory");
IggyGDrawSendWarning(NULL, "GDraw rendertarget allocation failed: out of rendertarget texture memory");
gdraw_HandleCacheAllocateFail(t);
return nullptr;
return NULL;
}
t->fence = get_next_fence(); // we're about to start using it immediately, so...
t->raw_ptr = nullptr;
t->raw_ptr = NULL;
t->handle.tex.gcm_ptr = ptr;
@@ -1329,14 +1329,14 @@ static void set_common_renderstate()
// reset our state caching
for (i=0; i < MAX_SAMPLERS; i++) {
gdraw->active_tex[i] = nullptr;
gdraw->active_tex[i] = NULL;
cellGcmSetTextureControl(gcm, i, CELL_GCM_FALSE, 0, 0, 0);
}
assert(gdraw->aa_tex.offset != 0); // if you hit this, your initialization is screwed up.
set_rsx_texture(gdraw->gcm, AATEX_SAMPLER, &gdraw->aa_tex, GDRAW_WRAP_clamp, 0);
gdraw->cur_fprog = nullptr;
gdraw->cur_fprog = NULL;
gdraw->vert_format = -1;
gdraw->scissor_state = ~0u;
gdraw->blend_mode = -1;
@@ -1363,7 +1363,7 @@ static void clear_renderstate(void)
static void set_render_target()
{
GcmTexture *tex = nullptr;
GcmTexture *tex = NULL;
S32 i;
CellGcmSurface surf = gdraw->main_surface;
@@ -1384,7 +1384,7 @@ static void set_render_target()
// invalidate current textures (need to reset them to force L1 texture cache flush)
for (i=0; i < MAX_SAMPLERS; ++i)
gdraw->active_tex[i] = nullptr;
gdraw->active_tex[i] = NULL;
}
////////////////////////////////////////////////////////////////////////
@@ -1513,19 +1513,19 @@ static rrbool RADLINK gdraw_TextureDrawBufferBegin(gswf_recti *region, gdraw_tex
GDrawFramebufferState *n = gdraw->cur+1;
GDrawHandle *t;
if (gdraw->tw == 0 || gdraw->th == 0) {
IggyGDrawSendWarning(nullptr, "GDraw warning: w=0,h=0 rendertarget");
IggyGDrawSendWarning(NULL, "GDraw warning: w=0,h=0 rendertarget");
return false;
}
if (n >= &gdraw->frame[MAX_RENDER_STACK_DEPTH]) {
assert(0);
IggyGDrawSendWarning(nullptr, "GDraw rendertarget nesting exceeds MAX_RENDER_STACK_DEPTH");
IggyGDrawSendWarning(NULL, "GDraw rendertarget nesting exceeds MAX_RENDER_STACK_DEPTH");
return false;
}
if (owner) {
// @TODO implement
t = nullptr;
t = NULL;
assert(0); // nyi
} else {
t = get_color_rendertarget(stats);
@@ -1534,9 +1534,9 @@ static rrbool RADLINK gdraw_TextureDrawBufferBegin(gswf_recti *region, gdraw_tex
}
n->color_buffer = t;
assert(n->color_buffer != nullptr); // @GDRAW_ASSERT
assert(n->color_buffer != NULL); // @GDRAW_ASSERT
n->cached = owner != nullptr;
n->cached = owner != NULL;
if (owner) {
n->base_x = region->x0;
n->base_y = region->y0;
@@ -1617,9 +1617,9 @@ static GDrawTexture *RADLINK gdraw_TextureDrawBufferEnd(GDrawStats *stats)
assert(m >= gdraw->frame); // bug in Iggy -- unbalanced
if (m != gdraw->frame) {
assert(m->color_buffer != nullptr); // @GDRAW_ASSERT
assert(m->color_buffer != NULL); // @GDRAW_ASSERT
}
assert(n->color_buffer != nullptr); // @GDRAW_ASSERT
assert(n->color_buffer != NULL); // @GDRAW_ASSERT
// wait for render to texture operation to finish
// can't put down a backend fence directly, there might still be
@@ -1694,7 +1694,7 @@ static void set_fragment_para(GDraw * RADRESTRICT gd, U32 ucode_offs, int para,
if (para == -1)
return;
gd->cur_fprog = nullptr; // need to re-set shader after patching
gd->cur_fprog = NULL; // need to re-set shader after patching
const U64 *inv = (const U64 *) values;
const int *patch_offs = (const int *) para;
@@ -1728,7 +1728,7 @@ static void set_fragment_para(GDraw * RADRESTRICT gd, U32 ucode_offs, int para,
static RADINLINE void set_texture(S32 texunit, GDrawTexture *tex)
{
assert(texunit < MAX_SAMPLERS);
assert(tex != nullptr);
assert(tex != NULL);
if (gdraw->active_tex[texunit] != tex) {
gdraw->active_tex[texunit] = tex;
@@ -1983,7 +1983,7 @@ static RADINLINE void set_vertex_decl(GDraw * RADRESTRICT gd, CellGcmContextData
// Draw triangles with a given renderstate
//
static RADINLINE void fence_resources(GDraw * RADRESTRICT gd, void *r1, void *r2=nullptr, void *r3=nullptr, void *r4=nullptr)
static RADINLINE void fence_resources(GDraw * RADRESTRICT gd, void *r1, void *r2=NULL, void *r3=NULL, void *r4=NULL)
{
GDrawFence fence;
fence.value = gd->next_fence_index;
@@ -2046,7 +2046,7 @@ static void RADLINK gdraw_DrawIndexedTriangles(GDrawRenderState *r, GDrawPrimiti
while (pos < p->num_indices) {
S32 vert_count = RR_MIN(p->num_indices - pos, verts_per_chunk);
void *ring = gdraw_bufring_alloc(&gd->dyn_vb, vert_count * vsize, CELL_GCM_VERTEX_TEXTURE_CACHE_LINE_SIZE);
assert(ring != nullptr); // we specifically chunked so this alloc succeeds!
assert(ring != NULL); // we specifically chunked so this alloc succeeds!
// prepare for painting...
cellGcmSetInvalidateVertexCache(gcm);
@@ -2083,7 +2083,7 @@ static void RADLINK gdraw_DrawIndexedTriangles(GDrawRenderState *r, GDrawPrimiti
S32 vert_count = RR_MIN(p->num_vertices - pos, verts_per_chunk);
U32 chunk_bytes = vert_count * vsize;
void *ring = gdraw_bufring_alloc(&gd->dyn_vb, chunk_bytes, CELL_GCM_VERTEX_TEXTURE_CACHE_LINE_SIZE);
assert(ring != nullptr); // we picked the chunk size so this alloc succeeds!
assert(ring != NULL); // we picked the chunk size so this alloc succeeds!
memcpy(ring, (U8 *)p->vertices + pos * vsize, chunk_bytes);
cellGcmSetInvalidateVertexCache(gcm);
@@ -2203,7 +2203,7 @@ static void gdraw_Filter(GDrawRenderState *r, gswf_recti *s, float *tc, int isbe
{
ProgramWithCachedVariableLocations *prg = &gdraw->filter_prog[isbevel][r->filter_mode];
U32 ucode_offs = prg->cfg.offset;
if (!gdraw_TextureDrawBufferBegin(s, GDRAW_TEXTURE_FORMAT_rgba32, GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, nullptr, stats))
if (!gdraw_TextureDrawBufferBegin(s, GDRAW_TEXTURE_FORMAT_rgba32, GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, NULL, stats))
return;
set_texture(0, r->tex[0]);
@@ -2287,14 +2287,14 @@ static void RADLINK gdraw_FilterQuad(GDrawRenderState *r, S32 x0, S32 y0, S32 x1
assert(0);
}
} else {
GDrawHandle *blend_tex = nullptr;
GDrawHandle *blend_tex = NULL;
GDraw *gd = gdraw;
// for crazy blend modes, we need to read back from the framebuffer
// and do the blending in the pixel shader. so we need to copy the
// relevant pixels from our active render target into a texture.
if (r->blend_mode == GDRAW_BLEND_special &&
(blend_tex = get_color_rendertarget(stats)) != nullptr) {
(blend_tex = get_color_rendertarget(stats)) != NULL) {
// slightly different logic depending on whether we were rendering
// to the main color buffer or a render target, because the former
// has tile origin-based coordinates while the latter don't. also,
@@ -2344,7 +2344,7 @@ static void create_fragment_program(ProgramWithCachedVariableLocations *p, Progr
cellGcmCgGetUCode(p->program, &ucode_main, &ucode_size);
ucode_local = gdraw_arena_alloc(&gdraw->local_arena, ucode_size + 400, CELL_GCM_FRAGMENT_UCODE_LOCAL_ALIGN_OFFSET); // 400 for overfetch
assert(ucode_local != nullptr); // if this triggers, it's a GDraw bug
assert(ucode_local != NULL); // if this triggers, it's a GDraw bug
memcpy(ucode_local, ucode_main, ucode_size);
cellGcmCgGetCgbFragmentProgramConfiguration(p->program, &p->cfg, 0, 1, 0);
@@ -2408,7 +2408,7 @@ static GDrawHandleCache *make_handle_cache(gdraw_gcm_resourcetype type, U32 alig
U32 header_size = is_vertex ? 0 : sizeof(GcmTexture) * num_handles;
if (!num_handles)
return nullptr;
return NULL;
GDrawHandleCache *cache = (GDrawHandleCache *) IggyGDrawMalloc(cache_size + header_size);
if (cache) {
@@ -2427,7 +2427,7 @@ static GDrawHandleCache *make_handle_cache(gdraw_gcm_resourcetype type, U32 alig
cache->alloc = gfxalloc_create(gdraw_mem[type].ptr, num_bytes, align, num_handles);
if (!cache->alloc) {
IggyGDrawFree(cache);
cache = nullptr;
cache = NULL;
}
}
@@ -2496,14 +2496,14 @@ int gdraw_GCM_SetResourceMemory(gdraw_gcm_resourcetype type, S32 num_handles, vo
free_handle_cache(gdraw->texturecache);
gdraw->texturecache = make_handle_cache(GDRAW_GCM_RESOURCE_texture, CELL_GCM_TEXTURE_SWIZZLE_ALIGN_OFFSET);
gdraw->tex_loc = get_location(ptr);
return gdraw->texturecache != nullptr;
return gdraw->texturecache != NULL;
case GDRAW_GCM_RESOURCE_vertexbuffer:
free_handle_cache(gdraw->vbufcache);
gdraw->vbufcache = make_handle_cache(GDRAW_GCM_RESOURCE_vertexbuffer, CELL_GCM_SURFACE_LINEAR_ALIGN_OFFSET);
gdraw->vbuf_base = ptr ? (U8 *) ptr - addr2offs(ptr) : 0;
gdraw->vbuf_loc = get_location(ptr);
return gdraw->vbufcache != nullptr;
return gdraw->vbufcache != NULL;
case GDRAW_GCM_RESOURCE_dyn_vertexbuffer:
gdraw_bufring_shutdown(&gdraw->dyn_vb);
@@ -2549,10 +2549,10 @@ int gdraw_GCM_SetRendertargetMemory(void *ptr, S32 num_bytes, S32 width, S32 hei
void gdraw_GCM_ResetAllResourceMemory()
{
gdraw_GCM_SetResourceMemory(GDRAW_GCM_RESOURCE_texture, 0, nullptr, 0);
gdraw_GCM_SetResourceMemory(GDRAW_GCM_RESOURCE_vertexbuffer, 0, nullptr, 0);
gdraw_GCM_SetResourceMemory(GDRAW_GCM_RESOURCE_dyn_vertexbuffer, 0, nullptr, 0);
gdraw_GCM_SetRendertargetMemory(nullptr, 0, 0, 0, 0);
gdraw_GCM_SetResourceMemory(GDRAW_GCM_RESOURCE_texture, 0, NULL, 0);
gdraw_GCM_SetResourceMemory(GDRAW_GCM_RESOURCE_vertexbuffer, 0, NULL, 0);
gdraw_GCM_SetResourceMemory(GDRAW_GCM_RESOURCE_dyn_vertexbuffer, 0, NULL, 0);
gdraw_GCM_SetRendertargetMemory(NULL, 0, 0, 0, 0);
}
GDrawFunctions *gdraw_GCM_CreateContext(CellGcmContextData *gcm, void *local_workmem, U8 rsx_label_index)
@@ -2560,7 +2560,7 @@ GDrawFunctions *gdraw_GCM_CreateContext(CellGcmContextData *gcm, void *local_wor
S32 i;
gdraw = (GDraw *) IggyGDrawMalloc(sizeof(*gdraw)); // make sure gdraw struct is PPU cache line aligned
if (!gdraw) return nullptr;
if (!gdraw) return NULL;
memset(gdraw, 0, sizeof(*gdraw));
@@ -2648,7 +2648,7 @@ void gdraw_GCM_DestroyContext(void)
free_handle_cache(gdraw->texturecache);
free_handle_cache(gdraw->vbufcache);
IggyGDrawFree(gdraw);
gdraw = nullptr;
gdraw = NULL;
}
}

View File

@@ -108,7 +108,7 @@ IDOC extern GDrawFunctions * gdraw_GCM_CreateContext(CellGcmContextData *gcm, vo
There can only be one GCM GDraw context active at any one time.
If initialization fails for some reason (the main reason would be an out of memory condition),
nullptr is returned. Otherwise, you can pass the return value to IggySetGDraw. */
NULL is returned. Otherwise, you can pass the return value to IggySetGDraw. */
IDOC extern void gdraw_GCM_DestroyContext(void);
/* Destroys the current GDraw context, if any. */

View File

@@ -273,24 +273,24 @@ static int pshader_basic_econst[28] = {
};
static ProgramWithCachedVariableLocations pshader_basic_arr[18] = {
{ { pshader_basic_0 }, { nullptr }, { -1, 7, -1, -1, -1, } },
{ { pshader_basic_1 }, { nullptr }, { -1, 7, -1, static_cast<int>((intptr_t)(pshader_basic_econst + 0)), -1, } },
{ { pshader_basic_2 }, { nullptr }, { -1, 7, -1, static_cast<int>((intptr_t)(pshader_basic_econst + 0)), -1, } },
{ { pshader_basic_3 }, { nullptr }, { 0, 7, -1, -1, -1, } },
{ { pshader_basic_4 }, { nullptr }, { 0, 7, -1, static_cast<int>((intptr_t)(pshader_basic_econst + 2)), -1, } },
{ { pshader_basic_5 }, { nullptr }, { 0, 7, -1, static_cast<int>((intptr_t)(pshader_basic_econst + 4)), -1, } },
{ { pshader_basic_6 }, { nullptr }, { 0, 7, -1, -1, -1, } },
{ { pshader_basic_7 }, { nullptr }, { 0, 7, -1, static_cast<int>((intptr_t)(pshader_basic_econst + 6)), -1, } },
{ { pshader_basic_8 }, { nullptr }, { 0, 7, -1, static_cast<int>((intptr_t)(pshader_basic_econst + 6)), -1, } },
{ { pshader_basic_9 }, { nullptr }, { 0, 7, -1, -1, -1, } },
{ { pshader_basic_10 }, { nullptr }, { 0, 7, -1, static_cast<int>((intptr_t)(pshader_basic_econst + 8)), -1, } },
{ { pshader_basic_11 }, { nullptr }, { 0, 7, -1, static_cast<int>((intptr_t)(pshader_basic_econst + 10)), -1, } },
{ { pshader_basic_12 }, { nullptr }, { 0, 7, -1, -1, static_cast<int>((intptr_t)(pshader_basic_econst + 12)), } },
{ { pshader_basic_13 }, { nullptr }, { 0, 7, -1, static_cast<int>((intptr_t)(pshader_basic_econst + 16)), static_cast<int>((intptr_t)(pshader_basic_econst + 18)), } },
{ { pshader_basic_14 }, { nullptr }, { 0, 7, -1, static_cast<int>((intptr_t)(pshader_basic_econst + 22)), static_cast<int>((intptr_t)(pshader_basic_econst + 24)), } },
{ { pshader_basic_15 }, { nullptr }, { 0, 7, -1, -1, -1, } },
{ { pshader_basic_16 }, { nullptr }, { 0, 7, -1, static_cast<int>((intptr_t)(pshader_basic_econst + 2)), -1, } },
{ { pshader_basic_17 }, { nullptr }, { 0, 7, -1, static_cast<int>((intptr_t)(pshader_basic_econst + 6)), -1, } },
{ { pshader_basic_0 }, { NULL }, { -1, 7, -1, -1, -1, } },
{ { pshader_basic_1 }, { NULL }, { -1, 7, -1, (int) (intptr_t) (pshader_basic_econst + 0), -1, } },
{ { pshader_basic_2 }, { NULL }, { -1, 7, -1, (int) (intptr_t) (pshader_basic_econst + 0), -1, } },
{ { pshader_basic_3 }, { NULL }, { 0, 7, -1, -1, -1, } },
{ { pshader_basic_4 }, { NULL }, { 0, 7, -1, (int) (intptr_t) (pshader_basic_econst + 2), -1, } },
{ { pshader_basic_5 }, { NULL }, { 0, 7, -1, (int) (intptr_t) (pshader_basic_econst + 4), -1, } },
{ { pshader_basic_6 }, { NULL }, { 0, 7, -1, -1, -1, } },
{ { pshader_basic_7 }, { NULL }, { 0, 7, -1, (int) (intptr_t) (pshader_basic_econst + 6), -1, } },
{ { pshader_basic_8 }, { NULL }, { 0, 7, -1, (int) (intptr_t) (pshader_basic_econst + 6), -1, } },
{ { pshader_basic_9 }, { NULL }, { 0, 7, -1, -1, -1, } },
{ { pshader_basic_10 }, { NULL }, { 0, 7, -1, (int) (intptr_t) (pshader_basic_econst + 8), -1, } },
{ { pshader_basic_11 }, { NULL }, { 0, 7, -1, (int) (intptr_t) (pshader_basic_econst + 10), -1, } },
{ { pshader_basic_12 }, { NULL }, { 0, 7, -1, -1, (int) (intptr_t) (pshader_basic_econst + 12), } },
{ { pshader_basic_13 }, { NULL }, { 0, 7, -1, (int) (intptr_t) (pshader_basic_econst + 16), (int) (intptr_t) (pshader_basic_econst + 18), } },
{ { pshader_basic_14 }, { NULL }, { 0, 7, -1, (int) (intptr_t) (pshader_basic_econst + 22), (int) (intptr_t) (pshader_basic_econst + 24), } },
{ { pshader_basic_15 }, { NULL }, { 0, 7, -1, -1, -1, } },
{ { pshader_basic_16 }, { NULL }, { 0, 7, -1, (int) (intptr_t) (pshader_basic_econst + 2), -1, } },
{ { pshader_basic_17 }, { NULL }, { 0, 7, -1, (int) (intptr_t) (pshader_basic_econst + 6), -1, } },
};
static unsigned char pshader_exceptional_blend_1[368] = {
@@ -536,19 +536,19 @@ static int pshader_exceptional_blend_econst[4] = {
};
static ProgramWithCachedVariableLocations pshader_exceptional_blend_arr[13] = {
{ { nullptr }, { nullptr }, { -1, -1, -1, -1, } },
{ { pshader_exceptional_blend_1 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_exceptional_blend_econst + 0)), } },
{ { pshader_exceptional_blend_2 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_exceptional_blend_econst + 0)), } },
{ { pshader_exceptional_blend_3 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_exceptional_blend_econst + 0)), } },
{ { pshader_exceptional_blend_4 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_exceptional_blend_econst + 0)), } },
{ { pshader_exceptional_blend_5 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_exceptional_blend_econst + 0)), } },
{ { pshader_exceptional_blend_6 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_exceptional_blend_econst + 0)), } },
{ { pshader_exceptional_blend_7 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_exceptional_blend_econst + 0)), } },
{ { pshader_exceptional_blend_8 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_exceptional_blend_econst + 0)), } },
{ { pshader_exceptional_blend_9 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_exceptional_blend_econst + 0)), } },
{ { pshader_exceptional_blend_10 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_exceptional_blend_econst + 0)), } },
{ { pshader_exceptional_blend_11 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_exceptional_blend_econst + 2)), } },
{ { pshader_exceptional_blend_12 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_exceptional_blend_econst + 2)), } },
{ { NULL }, { NULL }, { -1, -1, -1, -1, } },
{ { pshader_exceptional_blend_1 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_exceptional_blend_econst + 0), } },
{ { pshader_exceptional_blend_2 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_exceptional_blend_econst + 0), } },
{ { pshader_exceptional_blend_3 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_exceptional_blend_econst + 0), } },
{ { pshader_exceptional_blend_4 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_exceptional_blend_econst + 0), } },
{ { pshader_exceptional_blend_5 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_exceptional_blend_econst + 0), } },
{ { pshader_exceptional_blend_6 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_exceptional_blend_econst + 0), } },
{ { pshader_exceptional_blend_7 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_exceptional_blend_econst + 0), } },
{ { pshader_exceptional_blend_8 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_exceptional_blend_econst + 0), } },
{ { pshader_exceptional_blend_9 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_exceptional_blend_econst + 0), } },
{ { pshader_exceptional_blend_10 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_exceptional_blend_econst + 0), } },
{ { pshader_exceptional_blend_11 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_exceptional_blend_econst + 2), } },
{ { pshader_exceptional_blend_12 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_exceptional_blend_econst + 2), } },
};
static unsigned char pshader_filter_0[416] = {
@@ -1121,38 +1121,38 @@ static int pshader_filter_econst[90] = {
};
static ProgramWithCachedVariableLocations pshader_filter_arr[32] = {
{ { pshader_filter_0 }, { nullptr }, { 0, 1, static_cast<int>((intptr_t)(pshader_filter_econst + 0)), static_cast<int>((intptr_t)(pshader_filter_econst + 2)), -1, static_cast<int>((intptr_t)(pshader_filter_econst + 5)), static_cast<int>((intptr_t)(pshader_filter_econst + 8)), -1, } },
{ { pshader_filter_1 }, { nullptr }, { 0, 1, static_cast<int>((intptr_t)(pshader_filter_econst + 11)), static_cast<int>((intptr_t)(pshader_filter_econst + 2)), -1, static_cast<int>((intptr_t)(pshader_filter_econst + 5)), static_cast<int>((intptr_t)(pshader_filter_econst + 8)), -1, } },
{ { pshader_filter_2 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 13)), 2, static_cast<int>((intptr_t)(pshader_filter_econst + 16)), static_cast<int>((intptr_t)(pshader_filter_econst + 5)), -1, } },
{ { pshader_filter_3 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 13)), 2, static_cast<int>((intptr_t)(pshader_filter_econst + 16)), static_cast<int>((intptr_t)(pshader_filter_econst + 5)), -1, } },
{ { pshader_filter_4 }, { nullptr }, { 0, 1, static_cast<int>((intptr_t)(pshader_filter_econst + 19)), static_cast<int>((intptr_t)(pshader_filter_econst + 2)), -1, static_cast<int>((intptr_t)(pshader_filter_econst + 5)), static_cast<int>((intptr_t)(pshader_filter_econst + 8)), -1, } },
{ { pshader_filter_5 }, { nullptr }, { 0, 1, static_cast<int>((intptr_t)(pshader_filter_econst + 11)), static_cast<int>((intptr_t)(pshader_filter_econst + 2)), -1, static_cast<int>((intptr_t)(pshader_filter_econst + 5)), static_cast<int>((intptr_t)(pshader_filter_econst + 8)), -1, } },
{ { pshader_filter_6 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 2)), 2, static_cast<int>((intptr_t)(pshader_filter_econst + 5)), static_cast<int>((intptr_t)(pshader_filter_econst + 8)), -1, } },
{ { pshader_filter_7 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 13)), 2, static_cast<int>((intptr_t)(pshader_filter_econst + 16)), static_cast<int>((intptr_t)(pshader_filter_econst + 5)), -1, } },
{ { pshader_filter_8 }, { nullptr }, { -1, 1, static_cast<int>((intptr_t)(pshader_filter_econst + 21)), -1, -1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 24)), -1, } },
{ { pshader_filter_9 }, { nullptr }, { -1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 27)), -1, -1, -1, -1, -1, } },
{ { pshader_filter_10 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 2)), 2, static_cast<int>((intptr_t)(pshader_filter_econst + 5)), static_cast<int>((intptr_t)(pshader_filter_econst + 8)), -1, } },
{ { pshader_filter_11 }, { nullptr }, { 0, -1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 29)), 2, static_cast<int>((intptr_t)(pshader_filter_econst + 32)), -1, -1, } },
{ { nullptr }, { nullptr }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { nullptr }, { nullptr }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { nullptr }, { nullptr }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { nullptr }, { nullptr }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { pshader_filter_16 }, { nullptr }, { 0, 1, static_cast<int>((intptr_t)(pshader_filter_econst + 35)), static_cast<int>((intptr_t)(pshader_filter_econst + 37)), -1, static_cast<int>((intptr_t)(pshader_filter_econst + 41)), static_cast<int>((intptr_t)(pshader_filter_econst + 46)), static_cast<int>((intptr_t)(pshader_filter_econst + 49)), } },
{ { pshader_filter_17 }, { nullptr }, { 0, 1, static_cast<int>((intptr_t)(pshader_filter_econst + 47)), static_cast<int>((intptr_t)(pshader_filter_econst + 37)), -1, static_cast<int>((intptr_t)(pshader_filter_econst + 41)), static_cast<int>((intptr_t)(pshader_filter_econst + 51)), static_cast<int>((intptr_t)(pshader_filter_econst + 35)), } },
{ { pshader_filter_18 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 37)), 2, static_cast<int>((intptr_t)(pshader_filter_econst + 54)), static_cast<int>((intptr_t)(pshader_filter_econst + 59)), -1, } },
{ { pshader_filter_19 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 62)), 2, static_cast<int>((intptr_t)(pshader_filter_econst + 41)), static_cast<int>((intptr_t)(pshader_filter_econst + 66)), -1, } },
{ { pshader_filter_20 }, { nullptr }, { 0, 1, static_cast<int>((intptr_t)(pshader_filter_econst + 35)), static_cast<int>((intptr_t)(pshader_filter_econst + 37)), -1, static_cast<int>((intptr_t)(pshader_filter_econst + 41)), static_cast<int>((intptr_t)(pshader_filter_econst + 46)), static_cast<int>((intptr_t)(pshader_filter_econst + 49)), } },
{ { pshader_filter_21 }, { nullptr }, { 0, 1, static_cast<int>((intptr_t)(pshader_filter_econst + 47)), static_cast<int>((intptr_t)(pshader_filter_econst + 37)), -1, static_cast<int>((intptr_t)(pshader_filter_econst + 41)), static_cast<int>((intptr_t)(pshader_filter_econst + 51)), static_cast<int>((intptr_t)(pshader_filter_econst + 35)), } },
{ { pshader_filter_22 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 69)), 2, static_cast<int>((intptr_t)(pshader_filter_econst + 41)), static_cast<int>((intptr_t)(pshader_filter_econst + 73)), -1, } },
{ { pshader_filter_23 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 62)), 2, static_cast<int>((intptr_t)(pshader_filter_econst + 41)), static_cast<int>((intptr_t)(pshader_filter_econst + 66)), -1, } },
{ { pshader_filter_24 }, { nullptr }, { 0, 1, static_cast<int>((intptr_t)(pshader_filter_econst + 35)), static_cast<int>((intptr_t)(pshader_filter_econst + 37)), -1, static_cast<int>((intptr_t)(pshader_filter_econst + 41)), static_cast<int>((intptr_t)(pshader_filter_econst + 46)), static_cast<int>((intptr_t)(pshader_filter_econst + 49)), } },
{ { pshader_filter_25 }, { nullptr }, { 0, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 76)), static_cast<int>((intptr_t)(pshader_filter_econst + 37)), -1, static_cast<int>((intptr_t)(pshader_filter_econst + 41)), -1, static_cast<int>((intptr_t)(pshader_filter_econst + 67)), } },
{ { pshader_filter_26 }, { nullptr }, { 0, 1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 78)), 2, static_cast<int>((intptr_t)(pshader_filter_econst + 82)), static_cast<int>((intptr_t)(pshader_filter_econst + 87)), -1, } },
{ { pshader_filter_27 }, { nullptr }, { 0, -1, -1, static_cast<int>((intptr_t)(pshader_filter_econst + 37)), 2, static_cast<int>((intptr_t)(pshader_filter_econst + 41)), -1, -1, } },
{ { nullptr }, { nullptr }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { nullptr }, { nullptr }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { nullptr }, { nullptr }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { nullptr }, { nullptr }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { pshader_filter_0 }, { NULL }, { 0, 1, (int) (intptr_t) (pshader_filter_econst + 0), (int) (intptr_t) (pshader_filter_econst + 2), -1, (int) (intptr_t) (pshader_filter_econst + 5), (int) (intptr_t) (pshader_filter_econst + 8), -1, } },
{ { pshader_filter_1 }, { NULL }, { 0, 1, (int) (intptr_t) (pshader_filter_econst + 11), (int) (intptr_t) (pshader_filter_econst + 2), -1, (int) (intptr_t) (pshader_filter_econst + 5), (int) (intptr_t) (pshader_filter_econst + 8), -1, } },
{ { pshader_filter_2 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_filter_econst + 13), 2, (int) (intptr_t) (pshader_filter_econst + 16), (int) (intptr_t) (pshader_filter_econst + 5), -1, } },
{ { pshader_filter_3 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_filter_econst + 13), 2, (int) (intptr_t) (pshader_filter_econst + 16), (int) (intptr_t) (pshader_filter_econst + 5), -1, } },
{ { pshader_filter_4 }, { NULL }, { 0, 1, (int) (intptr_t) (pshader_filter_econst + 19), (int) (intptr_t) (pshader_filter_econst + 2), -1, (int) (intptr_t) (pshader_filter_econst + 5), (int) (intptr_t) (pshader_filter_econst + 8), -1, } },
{ { pshader_filter_5 }, { NULL }, { 0, 1, (int) (intptr_t) (pshader_filter_econst + 11), (int) (intptr_t) (pshader_filter_econst + 2), -1, (int) (intptr_t) (pshader_filter_econst + 5), (int) (intptr_t) (pshader_filter_econst + 8), -1, } },
{ { pshader_filter_6 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_filter_econst + 2), 2, (int) (intptr_t) (pshader_filter_econst + 5), (int) (intptr_t) (pshader_filter_econst + 8), -1, } },
{ { pshader_filter_7 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_filter_econst + 13), 2, (int) (intptr_t) (pshader_filter_econst + 16), (int) (intptr_t) (pshader_filter_econst + 5), -1, } },
{ { pshader_filter_8 }, { NULL }, { -1, 1, (int) (intptr_t) (pshader_filter_econst + 21), -1, -1, -1, (int) (intptr_t) (pshader_filter_econst + 24), -1, } },
{ { pshader_filter_9 }, { NULL }, { -1, -1, (int) (intptr_t) (pshader_filter_econst + 27), -1, -1, -1, -1, -1, } },
{ { pshader_filter_10 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_filter_econst + 2), 2, (int) (intptr_t) (pshader_filter_econst + 5), (int) (intptr_t) (pshader_filter_econst + 8), -1, } },
{ { pshader_filter_11 }, { NULL }, { 0, -1, -1, (int) (intptr_t) (pshader_filter_econst + 29), 2, (int) (intptr_t) (pshader_filter_econst + 32), -1, -1, } },
{ { NULL }, { NULL }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { NULL }, { NULL }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { NULL }, { NULL }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { NULL }, { NULL }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { pshader_filter_16 }, { NULL }, { 0, 1, (int) (intptr_t) (pshader_filter_econst + 35), (int) (intptr_t) (pshader_filter_econst + 37), -1, (int) (intptr_t) (pshader_filter_econst + 41), (int) (intptr_t) (pshader_filter_econst + 46), (int) (intptr_t) (pshader_filter_econst + 49), } },
{ { pshader_filter_17 }, { NULL }, { 0, 1, (int) (intptr_t) (pshader_filter_econst + 47), (int) (intptr_t) (pshader_filter_econst + 37), -1, (int) (intptr_t) (pshader_filter_econst + 41), (int) (intptr_t) (pshader_filter_econst + 51), (int) (intptr_t) (pshader_filter_econst + 35), } },
{ { pshader_filter_18 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_filter_econst + 37), 2, (int) (intptr_t) (pshader_filter_econst + 54), (int) (intptr_t) (pshader_filter_econst + 59), -1, } },
{ { pshader_filter_19 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_filter_econst + 62), 2, (int) (intptr_t) (pshader_filter_econst + 41), (int) (intptr_t) (pshader_filter_econst + 66), -1, } },
{ { pshader_filter_20 }, { NULL }, { 0, 1, (int) (intptr_t) (pshader_filter_econst + 35), (int) (intptr_t) (pshader_filter_econst + 37), -1, (int) (intptr_t) (pshader_filter_econst + 41), (int) (intptr_t) (pshader_filter_econst + 46), (int) (intptr_t) (pshader_filter_econst + 49), } },
{ { pshader_filter_21 }, { NULL }, { 0, 1, (int) (intptr_t) (pshader_filter_econst + 47), (int) (intptr_t) (pshader_filter_econst + 37), -1, (int) (intptr_t) (pshader_filter_econst + 41), (int) (intptr_t) (pshader_filter_econst + 51), (int) (intptr_t) (pshader_filter_econst + 35), } },
{ { pshader_filter_22 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_filter_econst + 69), 2, (int) (intptr_t) (pshader_filter_econst + 41), (int) (intptr_t) (pshader_filter_econst + 73), -1, } },
{ { pshader_filter_23 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_filter_econst + 62), 2, (int) (intptr_t) (pshader_filter_econst + 41), (int) (intptr_t) (pshader_filter_econst + 66), -1, } },
{ { pshader_filter_24 }, { NULL }, { 0, 1, (int) (intptr_t) (pshader_filter_econst + 35), (int) (intptr_t) (pshader_filter_econst + 37), -1, (int) (intptr_t) (pshader_filter_econst + 41), (int) (intptr_t) (pshader_filter_econst + 46), (int) (intptr_t) (pshader_filter_econst + 49), } },
{ { pshader_filter_25 }, { NULL }, { 0, -1, (int) (intptr_t) (pshader_filter_econst + 76), (int) (intptr_t) (pshader_filter_econst + 37), -1, (int) (intptr_t) (pshader_filter_econst + 41), -1, (int) (intptr_t) (pshader_filter_econst + 67), } },
{ { pshader_filter_26 }, { NULL }, { 0, 1, -1, (int) (intptr_t) (pshader_filter_econst + 78), 2, (int) (intptr_t) (pshader_filter_econst + 82), (int) (intptr_t) (pshader_filter_econst + 87), -1, } },
{ { pshader_filter_27 }, { NULL }, { 0, -1, -1, (int) (intptr_t) (pshader_filter_econst + 37), 2, (int) (intptr_t) (pshader_filter_econst + 41), -1, -1, } },
{ { NULL }, { NULL }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { NULL }, { NULL }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { NULL }, { NULL }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
{ { NULL }, { NULL }, { -1, -1, -1, -1, -1, -1, -1, -1, } },
};
static unsigned char pshader_blur_2[368] = {
@@ -1560,16 +1560,16 @@ static int pshader_blur_econst[256] = {
};
static ProgramWithCachedVariableLocations pshader_blur_arr[10] = {
{ { nullptr }, { nullptr }, { -1, -1, -1, } },
{ { nullptr }, { nullptr }, { -1, -1, -1, } },
{ { pshader_blur_2 }, { nullptr }, { 0, static_cast<int>((intptr_t)(pshader_blur_econst + 0)), static_cast<int>((intptr_t)(pshader_blur_econst + 13)), } },
{ { pshader_blur_3 }, { nullptr }, { 0, static_cast<int>((intptr_t)(pshader_blur_econst + 18)), static_cast<int>((intptr_t)(pshader_blur_econst + 33)), } },
{ { pshader_blur_4 }, { nullptr }, { 0, static_cast<int>((intptr_t)(pshader_blur_econst + 40)), static_cast<int>((intptr_t)(pshader_blur_econst + 57)), } },
{ { pshader_blur_5 }, { nullptr }, { 0, static_cast<int>((intptr_t)(pshader_blur_econst + 66)), static_cast<int>((intptr_t)(pshader_blur_econst + 85)), } },
{ { pshader_blur_6 }, { nullptr }, { 0, static_cast<int>((intptr_t)(pshader_blur_econst + 96)), static_cast<int>((intptr_t)(pshader_blur_econst + 117)), } },
{ { pshader_blur_7 }, { nullptr }, { 0, static_cast<int>((intptr_t)(pshader_blur_econst + 130)), static_cast<int>((intptr_t)(pshader_blur_econst + 153)), } },
{ { pshader_blur_8 }, { nullptr }, { 0, static_cast<int>((intptr_t)(pshader_blur_econst + 168)), static_cast<int>((intptr_t)(pshader_blur_econst + 193)), } },
{ { pshader_blur_9 }, { nullptr }, { 0, static_cast<int>((intptr_t)(pshader_blur_econst + 210)), static_cast<int>((intptr_t)(pshader_blur_econst + 237)), } },
{ { NULL }, { NULL }, { -1, -1, -1, } },
{ { NULL }, { NULL }, { -1, -1, -1, } },
{ { pshader_blur_2 }, { NULL }, { 0, (int) (intptr_t) (pshader_blur_econst + 0), (int) (intptr_t) (pshader_blur_econst + 13), } },
{ { pshader_blur_3 }, { NULL }, { 0, (int) (intptr_t) (pshader_blur_econst + 18), (int) (intptr_t) (pshader_blur_econst + 33), } },
{ { pshader_blur_4 }, { NULL }, { 0, (int) (intptr_t) (pshader_blur_econst + 40), (int) (intptr_t) (pshader_blur_econst + 57), } },
{ { pshader_blur_5 }, { NULL }, { 0, (int) (intptr_t) (pshader_blur_econst + 66), (int) (intptr_t) (pshader_blur_econst + 85), } },
{ { pshader_blur_6 }, { NULL }, { 0, (int) (intptr_t) (pshader_blur_econst + 96), (int) (intptr_t) (pshader_blur_econst + 117), } },
{ { pshader_blur_7 }, { NULL }, { 0, (int) (intptr_t) (pshader_blur_econst + 130), (int) (intptr_t) (pshader_blur_econst + 153), } },
{ { pshader_blur_8 }, { NULL }, { 0, (int) (intptr_t) (pshader_blur_econst + 168), (int) (intptr_t) (pshader_blur_econst + 193), } },
{ { pshader_blur_9 }, { NULL }, { 0, (int) (intptr_t) (pshader_blur_econst + 210), (int) (intptr_t) (pshader_blur_econst + 237), } },
};
static unsigned char pshader_color_matrix_0[336] = {
@@ -1598,7 +1598,7 @@ static int pshader_color_matrix_econst[12] = {
};
static ProgramWithCachedVariableLocations pshader_color_matrix_arr[1] = {
{ { pshader_color_matrix_0 }, { nullptr }, { 0, static_cast<int>((intptr_t)(pshader_color_matrix_econst + 0)), } },
{ { pshader_color_matrix_0 }, { NULL }, { 0, (int) (intptr_t) (pshader_color_matrix_econst + 0), } },
};
static unsigned char vshader_vsps3_0[272] = {
@@ -1655,8 +1655,8 @@ static unsigned char vshader_vsps3_2[240] = {
};
static ProgramWithCachedVariableLocations vshader_vsps3_arr[3] = {
{ { vshader_vsps3_0 }, { nullptr }, { } },
{ { vshader_vsps3_1 }, { nullptr }, { } },
{ { vshader_vsps3_2 }, { nullptr }, { } },
{ { vshader_vsps3_0 }, { NULL }, { } },
{ { vshader_vsps3_1 }, { NULL }, { } },
{ { vshader_vsps3_2 }, { NULL }, { } },
};

View File

@@ -226,7 +226,7 @@ static void debug_check_raw_values(GDrawHandleCache *c)
s = s->next;
}
s = c->active;
while (s != nullptr) {
while (s != NULL) {
assert(s->raw_ptr != t->raw_ptr);
s = s->next;
}
@@ -368,7 +368,7 @@ static void gdraw_HandleTransitionInsertBefore(GDrawHandle *t, GDrawHandleState
{
check_lists(t->cache);
assert(t->state != GDRAW_HANDLE_STATE_sentinel); // sentinels should never get here!
assert(t->state != static_cast<U32>(new_state)); // code should never call "transition" if it's not transitioning!
assert(t->state != (U32) new_state); // code should never call "transition" if it's not transitioning!
// unlink from prev state
t->prev->next = t->next;
t->next->prev = t->prev;
@@ -433,7 +433,7 @@ static rrbool gdraw_HandleCacheLockStats(GDrawHandle *t, void *owner, GDrawStats
static rrbool gdraw_HandleCacheLock(GDrawHandle *t, void *owner)
{
return gdraw_HandleCacheLockStats(t, owner, nullptr);
return gdraw_HandleCacheLockStats(t, owner, NULL);
}
static void gdraw_HandleCacheUnlock(GDrawHandle *t)
@@ -461,11 +461,11 @@ static void gdraw_HandleCacheInit(GDrawHandleCache *c, S32 num_handles, S32 byte
c->is_thrashing = false;
c->did_defragment = false;
for (i=0; i < GDRAW_HANDLE_STATE__count; i++) {
c->state[i].owner = nullptr;
c->state[i].cache = nullptr; // should never follow cache link from sentinels!
c->state[i].owner = NULL;
c->state[i].cache = NULL; // should never follow cache link from sentinels!
c->state[i].next = c->state[i].prev = &c->state[i];
#ifdef GDRAW_MANAGE_MEM
c->state[i].raw_ptr = nullptr;
c->state[i].raw_ptr = NULL;
#endif
c->state[i].fence.value = 0;
c->state[i].bytes = 0;
@@ -478,7 +478,7 @@ static void gdraw_HandleCacheInit(GDrawHandleCache *c, S32 num_handles, S32 byte
c->handle[i].bytes = 0;
c->handle[i].state = GDRAW_HANDLE_STATE_free;
#ifdef GDRAW_MANAGE_MEM
c->handle[i].raw_ptr = nullptr;
c->handle[i].raw_ptr = NULL;
#endif
}
c->state[GDRAW_HANDLE_STATE_free].next = &c->handle[0];
@@ -486,10 +486,10 @@ static void gdraw_HandleCacheInit(GDrawHandleCache *c, S32 num_handles, S32 byte
c->prev_frame_start.value = 0;
c->prev_frame_end.value = 0;
#ifdef GDRAW_MANAGE_MEM
c->alloc = nullptr;
c->alloc = NULL;
#endif
#ifdef GDRAW_MANAGE_MEM_TWOPOOL
c->alloc_other = nullptr;
c->alloc_other = NULL;
#endif
check_lists(c);
}
@@ -497,14 +497,14 @@ static void gdraw_HandleCacheInit(GDrawHandleCache *c, S32 num_handles, S32 byte
static GDrawHandle *gdraw_HandleCacheAllocateBegin(GDrawHandleCache *c)
{
GDrawHandle *free_list = &c->state[GDRAW_HANDLE_STATE_free];
GDrawHandle *t = nullptr;
GDrawHandle *t = NULL;
if (free_list->next != free_list) {
t = free_list->next;
gdraw_HandleTransitionTo(t, GDRAW_HANDLE_STATE_alloc);
t->bytes = 0;
t->owner = 0;
#ifdef GDRAW_MANAGE_MEM
t->raw_ptr = nullptr;
t->raw_ptr = NULL;
#endif
#ifdef GDRAW_CORRUPTION_CHECK
t->has_check_value = false;
@@ -563,7 +563,7 @@ static GDrawHandle *gdraw_HandleCacheGetLRU(GDrawHandleCache *c)
// at the front of the LRU list are the oldest ones, since in-use resources
// will get appended on every transition from "locked" to "live".
GDrawHandle *sentinel = &c->state[GDRAW_HANDLE_STATE_live];
return (sentinel->next != sentinel) ? sentinel->next : nullptr;
return (sentinel->next != sentinel) ? sentinel->next : NULL;
}
static void gdraw_HandleCacheTick(GDrawHandleCache *c, GDrawFence now)
@@ -778,7 +778,7 @@ static GDrawTexture *gdraw_BlurPass(GDrawFunctions *g, GDrawBlurInfo *c, GDrawRe
if (!g->TextureDrawBufferBegin(draw_bounds, GDRAW_TEXTURE_FORMAT_rgba32, GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_color | GDRAW_TEXTUREDRAWBUFFER_FLAGS_needs_alpha, 0, gstats))
return r->tex[0];
c->BlurPass(r, taps, data, draw_bounds, tc, static_cast<F32>(c->h) / c->frametex_height, clamp, gstats);
c->BlurPass(r, taps, data, draw_bounds, tc, (F32) c->h / c->frametex_height, clamp, gstats);
return g->TextureDrawBufferEnd(gstats);
}
@@ -830,7 +830,7 @@ static GDrawTexture *gdraw_BlurPassDownsample(GDrawFunctions *g, GDrawBlurInfo *
assert(clamp[0] <= clamp[2]);
assert(clamp[1] <= clamp[3]);
c->BlurPass(r, taps, data, &z, tc, static_cast<F32>(c->h) / c->frametex_height, clamp, gstats);
c->BlurPass(r, taps, data, &z, tc, (F32) c->h / c->frametex_height, clamp, gstats);
return g->TextureDrawBufferEnd(gstats);
}
@@ -842,7 +842,7 @@ static void gdraw_BlurAxis(S32 axis, GDrawFunctions *g, GDrawBlurInfo *c, GDrawR
GDrawTexture *t;
F32 data[MAX_TAPS][4];
S32 off_axis = 1-axis;
S32 w = static_cast<S32>(ceil((blur_width - 1) / 2))*2+1; // 1.2 => 3, 2.8 => 3, 3.2 => 5
S32 w = ((S32) ceil((blur_width-1)/2))*2+1; // 1.2 => 3, 2.8 => 3, 3.2 => 5
F32 edge_weight = 1 - (w - blur_width)/2; // 3 => 0 => 1; 1.2 => 1.8 => 0.9 => 0.1
F32 inverse_weight = 1.0f / blur_width;
@@ -949,7 +949,7 @@ static void gdraw_BlurAxis(S32 axis, GDrawFunctions *g, GDrawBlurInfo *c, GDrawR
// max coverage is 25 samples, or a filter width of 13. with 7 taps, we sample
// 13 samples in one pass, max coverage is 13*13 samples or (13*13-1)/2 width,
// which is ((2T-1)*(2T-1)-1)/2 or (4T^2 - 4T + 1 -1)/2 or 2T^2 - 2T or 2T*(T-1)
S32 w_mip = static_cast<S32>(ceil(linear_remap(w, MAX_TAPS+1, MAX_TAPS*MAX_TAPS, 2, MAX_TAPS)));
S32 w_mip = (S32) ceil(linear_remap(w, MAX_TAPS+1, MAX_TAPS*MAX_TAPS, 2, MAX_TAPS));
S32 downsample = w_mip;
F32 sample_spacing = texel;
if (downsample < 2) downsample = 2;
@@ -1095,7 +1095,7 @@ static void make_pool_aligned(void **start, S32 *num_bytes, U32 alignment)
if (addr_aligned != addr_orig) {
S32 diff = (S32) (addr_aligned - addr_orig);
if (*num_bytes < diff) {
*start = nullptr;
*start = NULL;
*num_bytes = 0;
return;
} else {
@@ -1132,7 +1132,7 @@ static void *gdraw_arena_alloc(GDrawArena *arena, U32 size, U32 align)
UINTa remaining = arena->end - arena->current;
UINTa total_size = (ptr - arena->current) + size;
if (remaining < total_size) // doesn't fit
return nullptr;
return NULL;
arena->current = ptr + size;
return ptr;
@@ -1157,7 +1157,7 @@ static void *gdraw_arena_alloc(GDrawArena *arena, U32 size, U32 align)
// (i.e. block->next->prev == block->prev->next == block)
// - All allocated blocks are also kept in a hash table, indexed by their
// pointer (to allow free to locate the corresponding block_info quickly).
// There's a single-linked, nullptr-terminated list of elements in each hash
// There's a single-linked, NULL-terminated list of elements in each hash
// bucket.
// - The physical block list is ordered. It always contains all currently
// active blocks and spans the whole managed memory range. There are no
@@ -1166,7 +1166,7 @@ static void *gdraw_arena_alloc(GDrawArena *arena, U32 size, U32 align)
// they are coalesced immediately.
// - The maximum number of blocks that could ever be necessary is allocated
// on initialization. All block_infos not currently in use are kept in a
// single-linked, nullptr-terminated list of unused blocks. Every block is either
// single-linked, NULL-terminated list of unused blocks. Every block is either
// in the physical block list or the unused list, and the total number of
// blocks is constant.
// These invariants always hold before and after an allocation/free.
@@ -1384,7 +1384,7 @@ static void gfxalloc_check2(gfx_allocator *alloc)
static gfx_block_info *gfxalloc_pop_unused(gfx_allocator *alloc)
{
GFXALLOC_ASSERT(alloc->unused_list != nullptr);
GFXALLOC_ASSERT(alloc->unused_list != NULL);
GFXALLOC_ASSERT(alloc->unused_list->is_unused);
GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_unused);)
@@ -1457,7 +1457,7 @@ static gfx_allocator *gfxalloc_create(void *mem, U32 mem_size, U32 align, U32 ma
U32 i, max_blocks, size;
if (!align || (align & (align - 1)) != 0) // align must be >0 and a power of 2
return nullptr;
return NULL;
// for <= max_allocs live allocs, there's <= 2*max_allocs+1 blocks. worst case:
// [free][used][free] .... [free][used][free]
@@ -1465,7 +1465,7 @@ static gfx_allocator *gfxalloc_create(void *mem, U32 mem_size, U32 align, U32 ma
size = sizeof(gfx_allocator) + max_blocks * sizeof(gfx_block_info);
a = (gfx_allocator *) IggyGDrawMalloc(size);
if (!a)
return nullptr;
return NULL;
memset(a, 0, size);
@@ -1506,16 +1506,16 @@ static gfx_allocator *gfxalloc_create(void *mem, U32 mem_size, U32 align, U32 ma
a->blocks[i].is_unused = 1;
gfxalloc_check(a);
debug_complete_check(a, nullptr, 0,0);
debug_complete_check(a, NULL, 0,0);
return a;
}
static void *gfxalloc_alloc(gfx_allocator *alloc, U32 size_in_bytes)
{
gfx_block_info *cur, *best = nullptr;
gfx_block_info *cur, *best = NULL;
U32 i, best_wasted = ~0u;
U32 size = size_in_bytes;
debug_complete_check(alloc, nullptr, 0,0);
debug_complete_check(alloc, NULL, 0,0);
gfxalloc_check(alloc);
GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_blocks == alloc->num_alloc + alloc->num_free + alloc->num_unused);)
GFXALLOC_IF_CHECK(GFXALLOC_ASSERT(alloc->num_free <= alloc->num_blocks+1);)
@@ -1565,7 +1565,7 @@ gfxalloc_check(alloc);
debug_check_overlap(alloc->cache, best->ptr, best->size);
return best->ptr;
} else
return nullptr; // not enough space!
return NULL; // not enough space!
}
static void gfxalloc_free(gfx_allocator *alloc, void *ptr)
@@ -1735,7 +1735,7 @@ static void gdraw_DefragmentMain(GDrawHandleCache *c, U32 flags, GDrawStats *sta
// (unused for allocated blocks, we'll use it to store a back-pointer to the corresponding handle)
for (b = alloc->blocks[0].next_phys; b != alloc->blocks; b=b->next_phys)
if (!b->is_free)
b->prev = nullptr;
b->prev = NULL;
// go through all handles and store a pointer to the handle in the corresponding memory block
for (i=0; i < c->max_handles; i++)
@@ -1748,7 +1748,7 @@ static void gdraw_DefragmentMain(GDrawHandleCache *c, U32 flags, GDrawStats *sta
break;
}
GFXALLOC_ASSERT(b != nullptr); // didn't find this block anywhere!
GFXALLOC_ASSERT(b != NULL); // didn't find this block anywhere!
}
// clear alloc hash table (we rebuild it during defrag)
@@ -1910,7 +1910,7 @@ static rrbool gdraw_CanDefragment(GDrawHandleCache *c)
static rrbool gdraw_MigrateResource(GDrawHandle *t, GDrawStats *stats)
{
GDrawHandleCache *c = t->cache;
void *ptr = nullptr;
void *ptr = NULL;
assert(t->state == GDRAW_HANDLE_STATE_live || t->state == GDRAW_HANDLE_STATE_locked || t->state == GDRAW_HANDLE_STATE_pinned);
// anything we migrate should be in the "other" (old) pool
@@ -2300,7 +2300,7 @@ static void gdraw_bufring_init(gdraw_bufring * RADRESTRICT ring, void *ptr, U32
static void gdraw_bufring_shutdown(gdraw_bufring * RADRESTRICT ring)
{
ring->cur = nullptr;
ring->cur = NULL;
ring->seg_size = 0;
}
@@ -2310,7 +2310,7 @@ static void *gdraw_bufring_alloc(gdraw_bufring * RADRESTRICT ring, U32 size, U32
gdraw_bufring_seg *seg;
if (size > ring->seg_size)
return nullptr; // nope, won't fit
return NULL; // nope, won't fit
assert(align <= ring->align);
@@ -2415,7 +2415,7 @@ static rrbool gdraw_res_free_lru(GDrawHandleCache *c, GDrawStats *stats)
// was it referenced since end of previous frame (=in this frame)?
// if some, we're thrashing; report it to the user, but only once per frame.
if (c->prev_frame_end.value < r->fence.value && !c->is_thrashing) {
IggyGDrawSendWarning(nullptr, c->is_vertex ? "GDraw Thrashing vertex memory" : "GDraw Thrashing texture memory");
IggyGDrawSendWarning(NULL, c->is_vertex ? "GDraw Thrashing vertex memory" : "GDraw Thrashing texture memory");
c->is_thrashing = true;
}
@@ -2435,8 +2435,8 @@ static GDrawHandle *gdraw_res_alloc_outofmem(GDrawHandleCache *c, GDrawHandle *t
{
if (t)
gdraw_HandleCacheAllocateFail(t);
IggyGDrawSendWarning(nullptr, c->is_vertex ? "GDraw Out of static vertex buffer %s" : "GDraw Out of texture %s", failed_type);
return nullptr;
IggyGDrawSendWarning(NULL, c->is_vertex ? "GDraw Out of static vertex buffer %s" : "GDraw Out of texture %s", failed_type);
return NULL;
}
#ifndef GDRAW_MANAGE_MEM
@@ -2445,7 +2445,7 @@ static GDrawHandle *gdraw_res_alloc_begin(GDrawHandleCache *c, S32 size, GDrawSt
{
GDrawHandle *t;
if (size > c->total_bytes)
gdraw_res_alloc_outofmem(c, nullptr, "memory (single resource larger than entire pool)");
gdraw_res_alloc_outofmem(c, NULL, "memory (single resource larger than entire pool)");
else {
// given how much data we're going to allocate, throw out
// data until there's "room" (this basically lets us use
@@ -2453,7 +2453,7 @@ static GDrawHandle *gdraw_res_alloc_begin(GDrawHandleCache *c, S32 size, GDrawSt
// packing it and being exact)
while (c->bytes_free < size) {
if (!gdraw_res_free_lru(c, stats)) {
gdraw_res_alloc_outofmem(c, nullptr, "memory");
gdraw_res_alloc_outofmem(c, NULL, "memory");
break;
}
}
@@ -2468,8 +2468,8 @@ static GDrawHandle *gdraw_res_alloc_begin(GDrawHandleCache *c, S32 size, GDrawSt
// we'd trade off cost of regenerating)
if (gdraw_res_free_lru(c, stats)) {
t = gdraw_HandleCacheAllocateBegin(c);
if (t == nullptr) {
gdraw_res_alloc_outofmem(c, nullptr, "handles");
if (t == NULL) {
gdraw_res_alloc_outofmem(c, NULL, "handles");
}
}
}
@@ -2513,7 +2513,7 @@ static void gdraw_res_kill(GDrawHandle *r, GDrawStats *stats)
{
GDRAW_FENCE_FLUSH(); // dead list is sorted by fence index - make sure all fence values are current.
r->owner = nullptr;
r->owner = NULL;
gdraw_HandleCacheInsertDead(r);
gdraw_res_reap(r->cache, stats);
}
@@ -2521,11 +2521,11 @@ static void gdraw_res_kill(GDrawHandle *r, GDrawStats *stats)
static GDrawHandle *gdraw_res_alloc_begin(GDrawHandleCache *c, S32 size, GDrawStats *stats)
{
GDrawHandle *t;
void *ptr = nullptr;
void *ptr = NULL;
gdraw_res_reap(c, stats); // NB this also does GDRAW_FENCE_FLUSH();
if (size > c->total_bytes)
return gdraw_res_alloc_outofmem(c, nullptr, "memory (single resource larger than entire pool)");
return gdraw_res_alloc_outofmem(c, NULL, "memory (single resource larger than entire pool)");
// now try to allocate a handle
t = gdraw_HandleCacheAllocateBegin(c);
@@ -2537,7 +2537,7 @@ static GDrawHandle *gdraw_res_alloc_begin(GDrawHandleCache *c, S32 size, GDrawSt
gdraw_res_free_lru(c, stats);
t = gdraw_HandleCacheAllocateBegin(c);
if (!t)
return gdraw_res_alloc_outofmem(c, nullptr, "handles");
return gdraw_res_alloc_outofmem(c, NULL, "handles");
}
// try to allocate first

View File

@@ -356,13 +356,13 @@ IDOC typedef struct GDrawPrimitive
IDOC typedef void RADLINK gdraw_draw_indexed_triangles(GDrawRenderState *r, GDrawPrimitive *prim, GDrawVertexBuffer *buf, GDrawStats *stats);
/* Draws a collection of indexed triangles, ignoring special filters or blend modes.
If buf is nullptr, then the pointers in 'prim' are machine pointers, and
If buf is NULL, then the pointers in 'prim' are machine pointers, and
you need to make a copy of the data (note currently all triangles
implementing strokes (wide lines) go this path).
If buf is non-nullptr, then use the appropriate vertex buffer, and the
If buf is non-NULL, then use the appropriate vertex buffer, and the
pointers in prim are actually offsets from the beginning of the
vertex buffer -- i.e. offset = (char*) prim->whatever - (char*) nullptr;
vertex buffer -- i.e. offset = (char*) prim->whatever - (char*) NULL;
(note there are separate spaces for vertices and indices; e.g. the
first mesh in a given vertex buffer will normally have a 0 offset
for the vertices and a 0 offset for the indices)
@@ -455,7 +455,7 @@ IDOC typedef GDrawTexture * RADLINK gdraw_make_texture_end(GDraw_MakeTexture_Pro
/* Ends specification of a new texture.
$:info The same handle initially passed to $gdraw_make_texture_begin
$:return Handle for the newly created texture, or nullptr if an error occured
$:return Handle for the newly created texture, or NULL if an error occured
*/
IDOC typedef rrbool RADLINK gdraw_update_texture_begin(GDrawTexture *tex, void *unique_id, GDrawStats *stats);

View File

@@ -25,8 +25,8 @@ IDOC RADEXPFUNC HIGGYEXP RADEXPLINK IggyExpCreate(char *ip_address, S32 port, vo
$:storage A small block of storage that needed to store the $HIGGYEXP, must be at least $IGGYEXP_MIN_STORAGE
$:storage_size_in_bytes The size of the block pointer to by <tt>storage</tt>
Returns a nullptr HIGGYEXP if the IP address/hostname can't be resolved, or no Iggy Explorer
can be contacted at the specified address/port. Otherwise returns a non-nullptr $HIGGYEXP
Returns a NULL HIGGYEXP if the IP address/hostname can't be resolved, or no Iggy Explorer
can be contacted at the specified address/port. Otherwise returns a non-NULL $HIGGYEXP
which you can pass to $IggyUseExplorer. */
IDOC RADEXPFUNC void RADEXPLINK IggyExpDestroy(HIGGYEXP p);