mirror of
https://github.com/Vita3K/Vita3K-Android.git
synced 2024-11-23 05:29:54 +00:00
vita3k: typo fixes (#3179)
This commit is contained in:
parent
fe02f4c0f9
commit
d8b8e069d1
@ -12,7 +12,7 @@ All presets are named after `<target_os>-<project_generator>-<compiler>`, are au
|
||||
|
||||
If you still want to use presets but none of them works for your setup, you can make new ones by creating a `CMakeUserPresets.json` file and you can check the specification [here](https://cmake.org/cmake/help/latest/manual/cmake-presets.7.html). Git will ignore this file.
|
||||
|
||||
**Note: Vita3K doesn't support compilation for 32-bit/x86/i386 platforms. macOS is also considered unsupported due to incompatibilities with the OpenGL implementation.**
|
||||
**Note: Vita3K doesn't support compilation for 32-bit/x86/i386 platforms.**
|
||||
|
||||
For convenience, the following building instructions are given as examples:
|
||||
|
||||
|
@ -436,7 +436,7 @@ static std::string cmd_continue(EmuEnvState &state, PacketCommand &command) {
|
||||
case 'S': {
|
||||
bool step = cmd == 's' || cmd == 'S';
|
||||
|
||||
// inferior_thread is the thread that trigerred breakpoint before
|
||||
// inferior_thread is the thread that triggered breakpoint before
|
||||
// step or run that thread
|
||||
|
||||
if (state.gdb.inferior_thread != 0) {
|
||||
@ -466,7 +466,7 @@ static std::string cmd_continue(EmuEnvState &state, PacketCommand &command) {
|
||||
}
|
||||
}
|
||||
}
|
||||
// wait until some thread triger breakpoint
|
||||
// wait until some threads trigger breakpoint
|
||||
bool did_break = false;
|
||||
while (!did_break) {
|
||||
auto lock = std::unique_lock(state.kernel.mutex);
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
namespace gui {
|
||||
|
||||
// Add any new developer/contribor in alphabetic order
|
||||
// Add any new developer/contributor in alphabetic order
|
||||
static std::vector<const char *> developers_list = {
|
||||
"1whatleytay", "bookmist", "EXtremeExploit", "frangarcj", "IllusionMan1212",
|
||||
"KorewaWatchful", "Macdu", "pent0", "petmac", "Rinnegatamante",
|
||||
|
@ -369,7 +369,7 @@ void draw_app_context_menu(GuiState &gui, EmuEnvState &emuenv, const std::string
|
||||
}
|
||||
} else {
|
||||
if (ImGui::MenuItem(lang.main["create_state_report"].c_str())) {
|
||||
// Create body of state repport
|
||||
// Create body of state report
|
||||
|
||||
// Encode title for URL
|
||||
const auto encode_title_url = [](std::string title) {
|
||||
@ -381,7 +381,7 @@ void draw_app_context_menu(GuiState &gui, EmuEnvState &emuenv, const std::string
|
||||
// Add other replacement associations here if necessary.
|
||||
};
|
||||
|
||||
// Replace all occurences found in title
|
||||
// Replace all occurrences found in title
|
||||
for (const auto &[replace, with] : replace_map) {
|
||||
boost::replace_all(title, replace, with);
|
||||
}
|
||||
@ -406,7 +406,7 @@ void draw_app_context_menu(GuiState &gui, EmuEnvState &emuenv, const std::string
|
||||
auto user = std::getenv("USER");
|
||||
#endif // WIN32
|
||||
|
||||
// Test environement summary
|
||||
// Test environment summary
|
||||
const auto test_env_summary = fmt::format(
|
||||
"%23 Test environment summary%0A- Tested by: {} <!-- Change your username if is needed -->%0A- OS: Windows 10/macOS/Linux Distro, Kernel Version?%0A- CPU: AMD/Intel?%0A- GPU: AMD/NVIDIA/Intel?%0A- RAM: {} GB",
|
||||
user ? user : "?", SDL_GetSystemRAM() / 1000);
|
||||
|
@ -34,9 +34,9 @@ static void draw_ime_dialog(DialogState &common_dialog, float FONT_SCALE) {
|
||||
ImGui::SetCursorPosX((ImGui::GetWindowWidth() / 2.f) - (ImGui::CalcTextSize(common_dialog.ime.title).x / 2.f));
|
||||
ImGui::TextColored(GUI_COLOR_TEXT_TITLE, "%s", common_dialog.ime.title);
|
||||
ImGui::Spacing();
|
||||
// TODO: setting the bufsize to max_length + 1 is not correct (except when using only 1-byte UTF-8 caracters)
|
||||
// the reason being that the max_length is the number of caracters allowed but the parameter given to ImGui::InputTextMultiline/ImGui::InputText
|
||||
// is the size of the buffer, which includes the ending 0 (+1). However, as caracters can have a variable size using UTF-8,
|
||||
// TODO: setting the bufsize to max_length + 1 is not correct (except when using only 1-byte UTF-8 characters)
|
||||
// the reason being that the max_length is the number of characters allowed but the parameter given to ImGui::InputTextMultiline/ImGui::InputText
|
||||
// is the size of the buffer, which includes the ending 0 (+1). However, as characters can have a variable size using UTF-8,
|
||||
// this will not necessarily match the max_length (but be at most it)
|
||||
if (common_dialog.ime.multiline) {
|
||||
ImGui::InputTextMultiline(
|
||||
|
@ -79,7 +79,7 @@ void set_shaders_compiled_display(GuiState &gui, EmuEnvState &emuenv) {
|
||||
gui.shaders_compiled_display_time = time;
|
||||
emuenv.renderer->shaders_count_compiled = 0;
|
||||
} else if (gui.shaders_compiled_display_count > 0) {
|
||||
// Display shaders compliled count during 3 sec
|
||||
// Display shaders compiled count during 3 sec
|
||||
if ((gui.shaders_compiled_display_time + 3) <= time)
|
||||
gui.shaders_compiled_display_count = 0;
|
||||
}
|
||||
|
@ -53,8 +53,8 @@ void get_app_info(GuiState &gui, EmuEnvState &emuenv, const std::string &app_pat
|
||||
auto &lang = gui.lang.app_context.info;
|
||||
gui.app_selector.app_info.trophy = fs::exists(APP_PATH / "sce_sys/trophy") ? lang["eligible"] : lang["ineligible"];
|
||||
|
||||
const auto last_writen = fs::last_write_time(APP_PATH);
|
||||
SAFE_LOCALTIME(&last_writen, &gui.app_selector.app_info.updated);
|
||||
const auto last_written = fs::last_write_time(APP_PATH);
|
||||
SAFE_LOCALTIME(&last_written, &gui.app_selector.app_info.updated);
|
||||
}
|
||||
}
|
||||
|
||||
@ -106,8 +106,8 @@ static void get_save_data_list(GuiState &gui, EmuEnvState &emuenv) {
|
||||
if (fs::is_directory(save.path()) && !fs::is_empty(save.path()) && get_app_index(gui, title_id)) {
|
||||
tm updated_tm = {};
|
||||
|
||||
const auto last_writen = fs::last_write_time(save);
|
||||
SAFE_LOCALTIME(&last_writen, &updated_tm);
|
||||
const auto last_written = fs::last_write_time(save);
|
||||
SAFE_LOCALTIME(&last_written, &updated_tm);
|
||||
|
||||
const auto size = get_recursive_directory_size(save);
|
||||
save_data_list.push_back({ get_app_index(gui, title_id)->title, title_id, size, updated_tm });
|
||||
@ -204,8 +204,8 @@ static void get_content_info(GuiState &gui, EmuEnvState &emuenv) {
|
||||
for (const auto &addcont : fs::directory_iterator(ADDCONT_PATH)) {
|
||||
const auto content_id = addcont.path().stem().string();
|
||||
|
||||
const auto last_writen = fs::last_write_time(addcont);
|
||||
SAFE_LOCALTIME(&last_writen, &addcont_info[content_id].date);
|
||||
const auto last_written = fs::last_write_time(addcont);
|
||||
SAFE_LOCALTIME(&last_written, &addcont_info[content_id].date);
|
||||
|
||||
const auto addcont_size = get_recursive_directory_size(addcont);
|
||||
addcont_info[content_id].size = get_unit_size(addcont_size);
|
||||
|
@ -437,7 +437,7 @@ static bool get_user_apps(GuiState &gui, EmuEnvState &emuenv) {
|
||||
// Read language of cache
|
||||
apps_cache.read((char *)&gui.app_selector.apps_cache_lang, sizeof(uint32_t));
|
||||
if (gui.app_selector.apps_cache_lang != emuenv.cfg.sys_lang) {
|
||||
LOG_WARN("Current lang of cache: {}, is diferent config: {}, recreate it.", get_sys_lang_name(gui.app_selector.apps_cache_lang), get_sys_lang_name(emuenv.cfg.sys_lang));
|
||||
LOG_WARN("Current lang of cache: {}, is different configuration: {}, recreate it.", get_sys_lang_name(gui.app_selector.apps_cache_lang), get_sys_lang_name(emuenv.cfg.sys_lang));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ static bool init_notice_icon(GuiState &gui, EmuEnvState &emuenv, const fs::path
|
||||
if (!vfs::read_app_file(buffer, emuenv.pref_path.wstring(), info.id, "sce_sys/icon0.png")) {
|
||||
buffer = init_default_icon(gui, emuenv);
|
||||
if (buffer.empty()) {
|
||||
LOG_WARN("Not found defaut icon for this notice content: {}", info.content_id);
|
||||
LOG_WARN("Not found default icon for this notice content: {}", info.content_id);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@ -325,8 +325,8 @@ void init_live_area(GuiState &gui, EmuEnvState &emuenv, const std::string &app_p
|
||||
liveitem[app_path][frame]["text"]["y"].first = livearea.child("liveitem").child("text").attribute("y").as_int();
|
||||
if (!livearea.child("liveitem").child("text").attribute("margin-top").empty())
|
||||
liveitem[app_path][frame]["text"]["margin-top"].first = livearea.child("liveitem").child("text").attribute("margin-top").as_int();
|
||||
if (!livearea.child("liveitem").child("text").attribute("margin-buttom").empty())
|
||||
liveitem[app_path][frame]["text"]["margin-buttom"].first = livearea.child("liveitem").child("text").attribute("margin-buttom").as_int();
|
||||
if (!livearea.child("liveitem").child("text").attribute("margin-bottom").empty())
|
||||
liveitem[app_path][frame]["text"]["margin-bottom"].first = livearea.child("liveitem").child("text").attribute("margin-bottom").as_int();
|
||||
if (!livearea.child("liveitem").child("text").attribute("margin-left").empty())
|
||||
liveitem[app_path][frame]["text"]["margin-left"].first = livearea.child("liveitem").child("text").attribute("margin-left").as_int();
|
||||
if (!livearea.child("liveitem").child("text").attribute("margin-right").empty())
|
||||
@ -719,7 +719,7 @@ void draw_live_area_screen(GuiState &gui, EmuEnvState &emuenv) {
|
||||
auto bg_pos_init = ImVec2((FRAME_SIZE.x - bg_size.x) / 2.f, (FRAME_SIZE.y - bg_size.y) / 2.f);
|
||||
auto img_pos_init = ImVec2((FRAME_SIZE.x - img_size.x) / 2.f, (FRAME_SIZE.y - img_size.y) / 2.f);
|
||||
|
||||
// Allign items
|
||||
// Align items
|
||||
if ((liveitem[app_path][frame.id]["background"]["align"].second == "left") && (liveitem[app_path][frame.id]["background"]["x"].first >= 0))
|
||||
bg_pos_init.x = 0.0f;
|
||||
else if ((liveitem[app_path][frame.id]["background"]["align"].second == "right") && (liveitem[app_path][frame.id]["background"]["x"].first <= 0))
|
||||
@ -764,13 +764,13 @@ void draw_live_area_screen(GuiState &gui, EmuEnvState &emuenv) {
|
||||
if (img_size.y == FRAME_SIZE.y)
|
||||
img_pos.y = VIEWPORT_SIZE.y - FRAME_POS.y;
|
||||
|
||||
// Scal size items
|
||||
// Scale size items
|
||||
const auto bg_scal_size = ImVec2(bg_size.x * SCALE.x, bg_size.y * SCALE.y);
|
||||
const auto img_scal_size = ImVec2(img_size.x * SCALE.x, img_size.y * SCALE.y);
|
||||
|
||||
const auto pos_frame = ImVec2(VIEWPORT_SIZE.x - FRAME_POS.x, VIEWPORT_SIZE.y - FRAME_POS.y);
|
||||
|
||||
// Scal size frame
|
||||
// Scale size frame
|
||||
const auto scal_size_frame = ImVec2(FRAME_SIZE.x * SCALE.x, FRAME_SIZE.y * SCALE.y);
|
||||
|
||||
// Reset position if get outside frame
|
||||
@ -846,7 +846,7 @@ void draw_live_area_screen(GuiState &gui, EmuEnvState &emuenv) {
|
||||
}
|
||||
|
||||
auto str_wrap = scal_size_frame.x;
|
||||
if (liveitem[app_path][frame.id]["text"]["allign"].second == "outside-right")
|
||||
if (liveitem[app_path][frame.id]["text"]["align"].second == "outside-right")
|
||||
str_wrap = str_size.x;
|
||||
|
||||
if (liveitem[app_path][frame.id]["text"]["width"].first > 0) {
|
||||
@ -865,7 +865,7 @@ void draw_live_area_screen(GuiState &gui, EmuEnvState &emuenv) {
|
||||
const auto size_text_scale = str_tag.size != 0 ? str_tag.size / 19.2f : 1.f;
|
||||
ImGui::SetWindowFontScale(size_text_scale * RES_SCALE.x);
|
||||
|
||||
// Calcule text pixel size
|
||||
// Calculate text pixel size
|
||||
ImVec2 calc_text_size;
|
||||
if (frame.autoflip > 0) {
|
||||
if (liveitem[app_path][frame.id]["text"]["word-wrap"].second != "off")
|
||||
@ -885,7 +885,7 @@ void draw_live_area_screen(GuiState &gui, EmuEnvState &emuenv) {
|
||||
|
||||
ImVec2 str_pos_init;
|
||||
|
||||
// Allign
|
||||
// Align
|
||||
if (liveitem[app_path][frame.id]["text"]["align"].second.empty()) {
|
||||
if (liveitem[app_path][frame.id]["text"]["text-align"].second.empty()) {
|
||||
if (liveitem[app_path][frame.id]["text"]["line-align"].second == "left")
|
||||
@ -981,7 +981,7 @@ void draw_live_area_screen(GuiState &gui, EmuEnvState &emuenv) {
|
||||
}
|
||||
|
||||
// Text Display
|
||||
// TODO Multible color support on same frame, used by eg: Asphalt: Injection
|
||||
// TODO Multiple color support on same frame, used by eg: Asphalt: Injection
|
||||
// TODO Correct display few line on same frame, used by eg: Asphalt: Injection
|
||||
ImGui::SetNextWindowPos(ImVec2(VIEWPORT_POS.x + text_pos.x, VIEWPORT_POS.y + text_pos.y));
|
||||
ImGui::BeginChild(frame.id.c_str(), str_size, false, ImGuiWindowFlags_NoDecoration | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoSavedSettings);
|
||||
|
@ -167,7 +167,7 @@ void draw_manual(GuiState &gui, EmuEnvState &emuenv) {
|
||||
// Set window font scale for buttons
|
||||
ImGui::SetWindowFontScale(RES_SCALE.x);
|
||||
|
||||
// Hide button wien right click is pressed on mouse
|
||||
// Hide button when right click is pressed on mouse
|
||||
if (!ImGui::IsAnyItemHovered() && ImGui::IsMouseClicked(0))
|
||||
hidden_button = !hidden_button;
|
||||
|
||||
|
@ -95,7 +95,7 @@ static void get_themes_list(GuiState &gui, EmuEnvState &emuenv) {
|
||||
if (doc.load_file(theme_path_xml.c_str())) {
|
||||
const auto infomation = doc.child("theme").child("InfomationProperty");
|
||||
|
||||
// Thumbmail theme
|
||||
// Thumbnail theme
|
||||
theme_preview_name[content_id][PACKAGE] = infomation.child("m_packageImageFilePath").text().as_string();
|
||||
|
||||
// Preview theme
|
||||
|
@ -54,7 +54,7 @@ void CPUProtocol::call_svc(CPUState &cpu, uint32_t svc, Address pc, ThreadState
|
||||
// the only benefit of using thread_id instead--namely less locking-- has been gone for long
|
||||
call_import(cpu, nid, thread.id);
|
||||
|
||||
// ARM recommends claering exclusive state inside interrupt handler
|
||||
// ARM recommends clearing exclusive state inside interrupt handler
|
||||
clear_exclusive(kernel->exclusive_monitor, get_processor_id(cpu));
|
||||
}
|
||||
|
||||
|
@ -318,7 +318,7 @@ bool relocate(const void *entries, uint32_t size, const SegmentInfosForReloc &se
|
||||
g_offset = 0,
|
||||
g_patchseg = 0;
|
||||
|
||||
// initiliazed in format 0, 1, 2, and 3
|
||||
// initialized in format 0, 1, 2, and 3
|
||||
Address g_saddr = 0,
|
||||
g_addend = 0,
|
||||
g_type = 0,
|
||||
|
@ -335,7 +335,7 @@ uint32_t ThreadState::run_callback(Address callback_address, const std::vector<u
|
||||
push_arguments(callback_address, args);
|
||||
thread_lock.unlock();
|
||||
|
||||
// unlock but then immediatly lock back in the run_loop function
|
||||
// unlock but then immediately lock back in the run_loop function
|
||||
// shouldn't cause an issue, but maybe we could use a recursive mutex instead
|
||||
run_loop();
|
||||
|
||||
|
@ -113,7 +113,7 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
// if either effective uid or uid is the one of the root user assume running as root.
|
||||
// else if euid and uid are different then permissions errors can happen if its running
|
||||
// as a completly different user than the uid/euid
|
||||
// as a completely different user than the uid/euid
|
||||
if (uid == 0 || euid == 0 || uid != euid)
|
||||
adminPriv = true;
|
||||
#endif
|
||||
|
@ -169,7 +169,7 @@ static Address alloc_inner(MemState &state, uint32_t start_page, int page_count,
|
||||
const Address addr = page_num * state.page_size;
|
||||
uint8_t *const memory = &state.memory[addr];
|
||||
|
||||
// Make memory chunck available to access
|
||||
// Make memory chunk available to access
|
||||
#ifdef WIN32
|
||||
const void *const ret = VirtualAlloc(memory, size, MEM_COMMIT, PAGE_READWRITE);
|
||||
LOG_CRITICAL_IF(!ret, "VirtualAlloc failed: {}", get_error_msg());
|
||||
|
@ -127,7 +127,7 @@ void VoiceScheduler::update(KernelState &kern, const MemState &mem, const SceUID
|
||||
std::unique_lock<std::recursive_mutex> scheduler_lock(mutex);
|
||||
is_updating = true;
|
||||
|
||||
// make a copy of the queue, this way we have no issue if it is modified in a callbck
|
||||
// make a copy of the queue, this way we have no issue if it is modified in a callback
|
||||
std::vector<ngs::Voice *> queue_copy = queue;
|
||||
|
||||
// Do a first routine to clear inputs from previous update session
|
||||
|
@ -96,7 +96,7 @@ static std::string make_filename(unsigned char *hdr, int64_t filetype) {
|
||||
|
||||
static int typecount = 0;
|
||||
|
||||
if (t < 0x1C) { // 0x1C is the file seperator
|
||||
if (t < 0x1C) { // 0x1C is the file separator
|
||||
std::string name = fmt::format("{}-{:0>2}.pkg", FSTYPE[t], typecount);
|
||||
typecount++;
|
||||
return name;
|
||||
|
@ -80,7 +80,7 @@ struct TextureCacheState;
|
||||
|
||||
// Attribute formats.
|
||||
GLenum attribute_format_to_gl_type(SceGxmAttributeFormat format);
|
||||
GLboolean attribute_format_normalised(SceGxmAttributeFormat format);
|
||||
GLboolean attribute_format_normalized(SceGxmAttributeFormat format);
|
||||
|
||||
namespace texture {
|
||||
|
||||
|
@ -50,7 +50,7 @@ GLenum attribute_format_to_gl_type(SceGxmAttributeFormat format) {
|
||||
return GL_UNSIGNED_BYTE;
|
||||
}
|
||||
|
||||
GLboolean attribute_format_normalised(SceGxmAttributeFormat format) {
|
||||
GLboolean attribute_format_normalized(SceGxmAttributeFormat format) {
|
||||
R_PROFILE(__func__);
|
||||
|
||||
switch (format) {
|
||||
|
@ -462,7 +462,7 @@ void sync_vertex_streams_and_attributes(GLContext &context, GxmRecordState &stat
|
||||
|
||||
const SceGxmAttributeFormat attribute_format = static_cast<SceGxmAttributeFormat>(attribute.format);
|
||||
GLenum type = attribute_format_to_gl_type(attribute_format);
|
||||
const GLboolean normalised = attribute_format_normalised(attribute_format);
|
||||
const GLboolean normalized = attribute_format_normalized(attribute_format);
|
||||
|
||||
int attrib_location = 0;
|
||||
bool upload_integral = false;
|
||||
@ -527,7 +527,7 @@ void sync_vertex_streams_and_attributes(GLContext &context, GxmRecordState &stat
|
||||
if (upload_integral || (attribute_format == SCE_GXM_ATTRIBUTE_FORMAT_UNTYPED)) {
|
||||
glVertexAttribIPointer(attrib_location + i, component_count, type, stream.stride, reinterpret_cast<const GLvoid *>(i * array_element_size + attribute.offset + offset_in_buffer[stream_index]));
|
||||
} else {
|
||||
glVertexAttribPointer(attrib_location + i, component_count, type, normalised, stream.stride, reinterpret_cast<const GLvoid *>(i * array_element_size + attribute.offset + offset_in_buffer[stream_index]));
|
||||
glVertexAttribPointer(attrib_location + i, component_count, type, normalized, stream.stride, reinterpret_cast<const GLvoid *>(i * array_element_size + attribute.offset + offset_in_buffer[stream_index]));
|
||||
}
|
||||
|
||||
glEnableVertexAttribArray(attrib_location + i);
|
||||
|
@ -204,7 +204,7 @@ void TextureCache::export_texture_impl(SceGxmTextureBaseFormat base_format, uint
|
||||
apply_swizzle_4<uint16_t, 5, 5, 5, 1>(pixels, data_unswizzled.data(), nb_pixels, alpha_is_1, swap_rb);
|
||||
break;
|
||||
default:
|
||||
LOG_ERROR("Unhandled swizzle for texture format {}, please report it to the developpers.", log_hex(fmt::underlying(base_format)));
|
||||
LOG_ERROR("Unhandled swizzle for texture format {}, please report it to the developers.", log_hex(fmt::underlying(base_format)));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -331,7 +331,7 @@ void TextureCache::export_texture_impl(SceGxmTextureBaseFormat base_format, uint
|
||||
break;
|
||||
}
|
||||
default:
|
||||
LOG_ERROR("Unhandled format for png exportation {}, please report it to the developpers.", log_hex(fmt::underlying(base_format)));
|
||||
LOG_ERROR("Unhandled format for png exportation {}, please report it to the developers.", log_hex(fmt::underlying(base_format)));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -50,7 +50,7 @@ static void perform_transfer_copy_impl(MemState &mem, const SceGxmTransferImage
|
||||
|
||||
for (uint32_t dx = 0; dx < src.width; dx++) {
|
||||
for (uint32_t dy = 0; dy < src.height; dy++) {
|
||||
// compute offset depedning on the texture type used
|
||||
// compute offset depending on the texture type used
|
||||
// the function compute_offset gets inlined
|
||||
uint32_t src_offset = compute_offset(src.x + dx, src.y + dy, src, src_type);
|
||||
uint32_t dst_offset = compute_offset(dst.x + dx, dst.y + dy, dst, dst_type);
|
||||
|
@ -454,7 +454,7 @@ vk::Format translate_format(SceGxmColorBaseFormat format) {
|
||||
case SCE_GXM_COLOR_BASE_FORMAT_SE5M9M9M9:
|
||||
return vk::Format::eE5B9G9R9UfloatPack32;
|
||||
case SCE_GXM_COLOR_BASE_FORMAT_U8U8U8:
|
||||
// 24 bit packed RGB is not supported (on many GPUs), use rgba8 instad
|
||||
// 24 bit packed RGB is not supported (on many GPUs), use rgba8 instead
|
||||
return vk::Format::eR8G8B8A8Unorm;
|
||||
|
||||
case SCE_GXM_COLOR_BASE_FORMAT_U1U5U5U5:
|
||||
|
@ -413,7 +413,7 @@ vk::PipelineShaderStageCreateInfo PipelineCache::retrieve_shader(const SceGxmPro
|
||||
*shader_module = state.device.createShaderModule(shader_info);
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(shaders_mutex);
|
||||
// Save shader cache haches
|
||||
// Save shader cache hashes
|
||||
// vertex and fragment shaders are not linked together so no need to associate them
|
||||
Sha256Hash empty_hash{};
|
||||
if (is_vertex) {
|
||||
@ -781,7 +781,7 @@ vk::Pipeline PipelineCache::compile_pipeline(SceGxmPrimitiveType type, vk::Rende
|
||||
vk::PipelineDynamicStateCreateInfo dynamic_info{};
|
||||
dynamic_info.setDynamicStates(dynamic_states);
|
||||
|
||||
// we still need to specifiy the viewport and scissor count even though they are dynamic
|
||||
// we still need to specify the viewport and scissor count even though they are dynamic
|
||||
vk::PipelineViewportStateCreateInfo viewport{
|
||||
.viewportCount = 1,
|
||||
.scissorCount = 1
|
||||
|
@ -785,7 +785,7 @@ void VKState::set_screen_filter(const std::string_view &filter) {
|
||||
|
||||
bool VKState::map_memory(MemState &mem, Ptr<void> address, uint32_t size) {
|
||||
assert(features.support_memory_mapping);
|
||||
// the adress should be 4K aligned
|
||||
// the address should be 4K aligned
|
||||
assert((address.address() & 4095) == 0);
|
||||
constexpr vk::BufferUsageFlags mapped_memory_flags = vk::BufferUsageFlagBits::eIndexBuffer | vk::BufferUsageFlagBits::eVertexBuffer | vk::BufferUsageFlagBits::eShaderDeviceAddress | vk::BufferUsageFlagBits::eTransferDst;
|
||||
|
||||
|
@ -68,7 +68,7 @@ void set_uniform_buffer(VKContext &context, const MemState &mem, const ShaderPro
|
||||
void mid_scene_flush(VKContext &context, const SceGxmNotification notification) {
|
||||
// two cases :
|
||||
// notification.addr is 0: this means that the mid scene flush must be used as a barrier in the renderpass
|
||||
// notification.addr is not 0: this means the app is waiting for this part to be finished to re-use the ressources
|
||||
// notification.addr is not 0: this means the app is waiting for this part to be finished to re-use the resources
|
||||
|
||||
// Note: however, when testing, the barrier inside a pipeline does not work (or not entirely, depending on the GPU)
|
||||
// maybe because I'm writing using buffer device addresses, not sure...
|
||||
|
@ -136,7 +136,7 @@ SurfaceRetrieveResult VKSurfaceCache::retrieve_color_surface_for_framebuffer(Mem
|
||||
overlap = false;
|
||||
else
|
||||
ite--;
|
||||
// ite is now the first item with an adress lower or equal to key
|
||||
// ite is now the first item with an address lower or equal to key
|
||||
|
||||
overlap = (overlap && (ite->first + ite->second->total_bytes) > address);
|
||||
|
||||
@ -323,7 +323,7 @@ std::optional<TextureLookupResult> VKSurfaceCache::retrieve_color_surface_as_tex
|
||||
overlap = false;
|
||||
else
|
||||
ite--;
|
||||
// ite is now the first item with an adress lower or equal to key
|
||||
// ite is now the first item with an address lower or equal to key
|
||||
bool invalidated = false;
|
||||
|
||||
overlap = (overlap && (ite->first + ite->second->total_bytes) > address);
|
||||
|
@ -76,7 +76,7 @@ ProgramInput get_program_input(const SceGxmProgram &program) {
|
||||
ProgramInput program_input;
|
||||
std::map<int, UniformBuffer> uniform_buffers;
|
||||
|
||||
// TODO split these to functions (e.g. get_literals, get_paramters)
|
||||
// TODO split these to functions (e.g. get_literals, get_parameters)
|
||||
auto gxp_parameters = program.program_parameters();
|
||||
auto vertex_varyings_ptr = program.vertex_varyings();
|
||||
|
||||
|
@ -1375,7 +1375,7 @@ void store(spv::Builder &b, const SpirvShaderParameters ¶ms, SpirvUtilFuncti
|
||||
|
||||
std::vector<spv::IdImmediate> ops;
|
||||
|
||||
// The provided source are stored in continous order, however the dest mask may not be the same
|
||||
// The provided source are stored in continuous order, however the dest mask may not be the same
|
||||
const int total_elem_to_copy_first_vec = std::min<int>(4 - (insert_offset % 4), total_comp_source);
|
||||
std::uint32_t dest_comp_stored_so_far = 0;
|
||||
|
||||
|
@ -79,7 +79,7 @@ void float_to_half_basic(const float *src, uint16_t *dest, const int total) {
|
||||
// check and use AVX+F16C instruction set if possible
|
||||
|
||||
// use function variable as imitation of self-modifying code.
|
||||
// on first use we check processor features and set appropriate realisation, later we immediately use appropriate realisation
|
||||
// on first use we check processor features and set appropriate realization, later we immediately use appropriate realization.
|
||||
void float_to_half_init(const float *src, uint16_t *dest, const int total);
|
||||
|
||||
void (*float_to_half_var)(const float *src, uint16_t *dest, const int total) = float_to_half_init;
|
||||
|
Loading…
Reference in New Issue
Block a user