mirror of
https://github.com/open-goal/jak-project
synced 2026-06-26 02:24:34 -04:00
small fixes (#1256)
This commit is contained in:
@@ -36,7 +36,6 @@ struct SharedRenderState {
|
||||
|
||||
bool use_sky_cpu = true;
|
||||
bool use_occlusion_culling = true;
|
||||
bool render_debug = false;
|
||||
bool enable_merc_xgkick = true;
|
||||
bool enable_generic_xgkick = true;
|
||||
bool use_direct2 = true;
|
||||
|
||||
@@ -505,6 +505,9 @@ void Loader::update(std::string& status_out, TexturePool& texture_pool) {
|
||||
auto& lev = it->second;
|
||||
// we're the only place that erases, so it's okay to unlock and hold a reference
|
||||
lk.unlock();
|
||||
if (!lev.data.tfrag_load_done) {
|
||||
did_gpu_stuff = true;
|
||||
}
|
||||
if (upload_textures(loader_timer, lev.data, texture_pool)) {
|
||||
if (init_tie(loader_timer, lev.data)) {
|
||||
if (init_tfrag(loader_timer, lev.data)) {
|
||||
@@ -533,6 +536,7 @@ void Loader::update(std::string& status_out, TexturePool& texture_pool) {
|
||||
texture_pool.unload_texture(tex.debug_name, lev.second.data.textures.at(i));
|
||||
}
|
||||
}
|
||||
lk.unlock();
|
||||
for (auto tex : lev.second.data.textures) {
|
||||
if (EXTRA_TEX_DEBUG) {
|
||||
for (auto& slot : texture_pool.all_textures()) {
|
||||
|
||||
@@ -3,11 +3,7 @@
|
||||
void MercRenderer::mscal(int enter_address,
|
||||
SharedRenderState* render_state,
|
||||
ScopedProfilerNode& prof) {
|
||||
if (render_state->render_debug) {
|
||||
mscal_impl<true>(enter_address, render_state, prof);
|
||||
} else {
|
||||
mscal_impl<false>(enter_address, render_state, prof);
|
||||
}
|
||||
mscal_impl<false>(enter_address, render_state, prof);
|
||||
}
|
||||
|
||||
static inline REALLY_INLINE float erleng(const Vf& in) {
|
||||
|
||||
@@ -289,7 +289,7 @@ void OpenGLRenderer::render(DmaFollower dma, const RenderOptions& settings) {
|
||||
|
||||
{
|
||||
auto prof = m_profiler.root()->make_scoped_child("loader");
|
||||
if (m_last_pmode_alp == 0 && settings.pmode_alp_register != 0) {
|
||||
if (m_last_pmode_alp == 0 && settings.pmode_alp_register != 0 && m_enable_fast_blackout_loads) {
|
||||
// blackout, load everything and don't worry about frame rate
|
||||
m_render_state.loader->update_blocking(m_render_state.load_status_debug,
|
||||
*m_render_state.texture_pool);
|
||||
@@ -355,9 +355,9 @@ void OpenGLRenderer::draw_renderer_selection_window() {
|
||||
ImGui::SliderFloat("Fog Adjust", &m_render_state.fog_intensity, 0, 10);
|
||||
ImGui::Checkbox("Sky CPU", &m_render_state.use_sky_cpu);
|
||||
ImGui::Checkbox("Occlusion Cull", &m_render_state.use_occlusion_culling);
|
||||
ImGui::Checkbox("Render Debug (slower)", &m_render_state.render_debug);
|
||||
ImGui::Checkbox("Merc XGKICK", &m_render_state.enable_merc_xgkick);
|
||||
ImGui::Checkbox("Generic XGKICK", &m_render_state.enable_generic_xgkick);
|
||||
ImGui::Checkbox("Blackout Loads", &m_enable_fast_blackout_loads);
|
||||
ImGui::Checkbox("Direct 2", &m_render_state.use_direct2);
|
||||
ImGui::Checkbox("Generic 2", &m_render_state.use_generic2);
|
||||
|
||||
|
||||
@@ -60,4 +60,5 @@ class OpenGLRenderer {
|
||||
FullScreenDraw m_blackout_renderer;
|
||||
|
||||
float m_last_pmode_alp = 1.;
|
||||
bool m_enable_fast_blackout_loads = true;
|
||||
};
|
||||
|
||||
@@ -109,8 +109,8 @@ class ShadowRenderer : public BucketRenderer {
|
||||
};
|
||||
static_assert(sizeof(Vertex) == 16);
|
||||
|
||||
static constexpr int MAX_VERTICES = 8192;
|
||||
static constexpr int MAX_INDICES = 8192;
|
||||
static constexpr int MAX_VERTICES = 8192 * 3;
|
||||
static constexpr int MAX_INDICES = 8192 * 3;
|
||||
|
||||
Vertex m_vertices[MAX_VERTICES];
|
||||
u32 m_front_indices[MAX_INDICES];
|
||||
|
||||
Reference in New Issue
Block a user