diff --git a/examples/rdpqdemo/rdpqdemo.c b/examples/rdpqdemo/rdpqdemo.c index e75b2c3e8..f89aa21db 100644 --- a/examples/rdpqdemo/rdpqdemo.c +++ b/examples/rdpqdemo/rdpqdemo.c @@ -149,7 +149,7 @@ int main() // render mode, and then restore it at the end. rdpq_mode_push(); rdpq_mode_tlut(TLUT_RGBA16); - rdpq_tex_load_tlut(sprite_get_palette(tiles_sprite), 0, 16); + rdpq_tex_upload_tlut(sprite_get_palette(tiles_sprite), 0, 16); tlut = true; } uint32_t tile_width = tiles_sprite->width / tiles_sprite->hslices; @@ -164,7 +164,7 @@ int main() // Notice that this code is agnostic to both the texture format // and the render mode (standard vs copy), it will work either way. int s = RANDN(2)*32, t = RANDN(2)*32; - rdpq_tex_load_sub(TILE0, &tiles_surf, NULL, s, t, s+32, t+32); + rdpq_tex_upload_sub(TILE0, &tiles_surf, NULL, s, t, s+32, t+32); rdpq_texture_rectangle(TILE0, tx, ty, tx+32, ty+32, s, t); } } diff --git a/src/rdpq/rdpq_font.c b/src/rdpq/rdpq_font.c index fc747ca08..5e91d661f 100644 --- a/src/rdpq/rdpq_font.c +++ b/src/rdpq/rdpq_font.c @@ -31,7 +31,7 @@ static rdpq_tile_t atlas_activate(atlas_t *atlas) if (draw_ctx.last_atlas != atlas) { draw_ctx.atlas_tile = (draw_ctx.atlas_tile + 2) & 7; surface_t s = surface_make_linear(atlas->buf, atlas->fmt, atlas->width, atlas->height); - rdpq_tex_load(draw_ctx.atlas_tile, &s, NULL); + rdpq_tex_upload(draw_ctx.atlas_tile, &s, NULL); draw_ctx.last_atlas = atlas; } return draw_ctx.atlas_tile; diff --git a/tests/test_rdpq.c b/tests/test_rdpq.c index 8b693ea5e..215d54dd0 100644 --- a/tests/test_rdpq.c +++ b/tests/test_rdpq.c @@ -804,7 +804,7 @@ void test_rdpq_syncfull_resume(TestContext *ctx) debugf("Dynamic mode\n"); for (int j=0;j<4;j++) { for (int i=0;i<80;i++) { - rdpq_tex_load_sub(TILE0, &tex, NULL, 0, 0, WIDTH, WIDTH); + rdpq_tex_upload_sub(TILE0, &tex, NULL, 0, 0, WIDTH, WIDTH); rdpq_texture_rectangle(TILE0, 0, 0, WIDTH, WIDTH, 0, 0); } rdpq_sync_full(NULL, NULL); @@ -815,7 +815,7 @@ void test_rdpq_syncfull_resume(TestContext *ctx) debugf("Dynamic mode with multiple syncs per buffer\n"); for (int j=0;j<4;j++) { for (int i=0;i<6;i++) { - rdpq_tex_load_sub(TILE0, &tex, NULL, 0, 0, WIDTH, WIDTH); + rdpq_tex_upload_sub(TILE0, &tex, NULL, 0, 0, WIDTH, WIDTH); rdpq_texture_rectangle(TILE0, 0, 0, WIDTH, WIDTH, 0, 0); } rdpq_sync_full(NULL, NULL); @@ -829,7 +829,7 @@ void test_rdpq_syncfull_resume(TestContext *ctx) debugf("Dynamic mode with buffer change\n"); for (int j=0;j<4;j++) { for (int i=0;i<80;i++) { - rdpq_tex_load_sub(TILE0, &tex, NULL, 0, 0, WIDTH, WIDTH); + rdpq_tex_upload_sub(TILE0, &tex, NULL, 0, 0, WIDTH, WIDTH); rdpq_texture_rectangle(TILE0, 0, 0, WIDTH, WIDTH, 0, 0); } rdpq_sync_full(NULL, NULL); @@ -841,7 +841,7 @@ void test_rdpq_syncfull_resume(TestContext *ctx) debugf("Block mode\n"); rspq_block_begin(); for (int i=0;i<80;i++) { - rdpq_tex_load_sub(TILE0, &tex, NULL, 0, 0, WIDTH, WIDTH); + rdpq_tex_upload_sub(TILE0, &tex, NULL, 0, 0, WIDTH, WIDTH); rdpq_texture_rectangle(TILE0, 0, 0, WIDTH, WIDTH, 0, 0); } rspq_block_t *rect_block = rspq_block_end(); @@ -858,7 +858,7 @@ void test_rdpq_syncfull_resume(TestContext *ctx) debugf("Block mode with sync inside\n"); rspq_block_begin(); for (int i=0;i<80;i++) { - rdpq_tex_load_sub(TILE0, &tex, NULL, 0, 0, WIDTH, WIDTH); + rdpq_tex_upload_sub(TILE0, &tex, NULL, 0, 0, WIDTH, WIDTH); rdpq_texture_rectangle(TILE0, 0, 0, WIDTH, WIDTH, 0, 0); } rdpq_sync_full(NULL, NULL); @@ -1229,7 +1229,7 @@ void test_rdpq_blender_memory(TestContext *ctx) { rdpq_set_fog_color(RGBA32(0,0,0,0x80)); rdpq_set_color_image(&fb); - rdpq_tex_load(TILE0, &tex, NULL); + rdpq_tex_upload(TILE0, &tex, NULL); rdpq_set_mode_standard(); rdpq_mode_blender(RDPQ_BLENDER_MULTIPLY); rdpq_triangle(&TRIFMT_TEX, diff --git a/tests/test_rdpq_tex.c b/tests/test_rdpq_tex.c index a7930111b..dc49dd222 100644 --- a/tests/test_rdpq_tex.c +++ b/tests/test_rdpq_tex.c @@ -116,7 +116,7 @@ static color_t surface_debug_expected_color(surface_t *surf, int x, int y) } } -void test_rdpq_tex_load(TestContext *ctx) { +void test_rdpq_tex_upload(TestContext *ctx) { RDPQ_INIT(); static const tex_format_t fmts[] = { @@ -153,7 +153,7 @@ void test_rdpq_tex_load(TestContext *ctx) { // Activate the palette if needed for this format if (fmt == FMT_CI4 || fmt == FMT_CI8) { - rdpq_tex_load_tlut(tlut, 0, 256); + rdpq_tex_upload_tlut(tlut, 0, 256); rdpq_mode_tlut(TLUT_RGBA16); } else { rdpq_mode_tlut(TLUT_NONE); @@ -170,9 +170,9 @@ void test_rdpq_tex_load(TestContext *ctx) { surface_clear(&fb, 0); if (off == 0) - rdpq_tex_load(TILE2,&surf, NULL); + rdpq_tex_upload(TILE2,&surf, NULL); else - rdpq_tex_load_sub(TILE2,&surf, NULL, off, off, surf.width, surf.width); + rdpq_tex_upload_sub(TILE2,&surf, NULL, off, off, surf.width, surf.width); rdpq_texture_rectangle(TILE2, 5, 5, 5+surf.width-off, 5+surf.width-off, off, off); @@ -196,7 +196,7 @@ void test_rdpq_tex_load(TestContext *ctx) { } } -void test_rdpq_tex_load_multi(TestContext *ctx) { +void test_rdpq_tex_upload_multi(TestContext *ctx) { RDPQ_INIT(); surface_t tex1 = surface_alloc(FMT_RGBA32, 8, 8); @@ -347,7 +347,7 @@ void test_rdpq_tex_blit_normal(TestContext *ctx) // Activate the palette if needed for this format if (fmt == FMT_CI4 || fmt == FMT_CI8) { - rdpq_tex_load_tlut(tlut, 0, 256); + rdpq_tex_upload_tlut(tlut, 0, 256); rdpq_mode_tlut(TLUT_RGBA16); } else { rdpq_mode_tlut(TLUT_NONE); diff --git a/tests/test_rdpq_tri.c b/tests/test_rdpq_tri.c index cb654ce56..52fb47083 100644 --- a/tests/test_rdpq_tri.c +++ b/tests/test_rdpq_tri.c @@ -172,7 +172,7 @@ void test_rdpq_triangle_w1(TestContext *ctx) { surface_clear(&tex, 0); rdpq_set_color_image(&fb); - rdpq_tex_load(TILE0, &tex, NULL); + rdpq_tex_upload(TILE0, &tex, NULL); rdpq_set_mode_standard(); rspq_wait(); diff --git a/tests/testrom.c b/tests/testrom.c index e6558fa82..79f21681c 100644 --- a/tests/testrom.c +++ b/tests/testrom.c @@ -310,8 +310,8 @@ static const struct Testsuite TEST_FUNC(test_rdpq_triangle_w1, 0, TEST_FLAGS_NO_BENCHMARK), TEST_FUNC(test_rdpq_attach_clear, 0, TEST_FLAGS_NO_BENCHMARK), TEST_FUNC(test_rdpq_attach_stack, 0, TEST_FLAGS_NO_BENCHMARK), - TEST_FUNC(test_rdpq_tex_load, 0, TEST_FLAGS_NO_BENCHMARK), - TEST_FUNC(test_rdpq_tex_load_multi, 0, TEST_FLAGS_NO_BENCHMARK), + TEST_FUNC(test_rdpq_tex_upload, 0, TEST_FLAGS_NO_BENCHMARK), + TEST_FUNC(test_rdpq_tex_upload_multi, 0, TEST_FLAGS_NO_BENCHMARK), TEST_FUNC(test_rdpq_tex_blit_normal, 0, TEST_FLAGS_NO_BENCHMARK), TEST_FUNC(test_mpeg1_idct, 0, TEST_FLAGS_NO_BENCHMARK), TEST_FUNC(test_mpeg1_block_decode, 0, TEST_FLAGS_NO_BENCHMARK),