Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/supertuxkart/stk-code int…
Browse files Browse the repository at this point in the history
…o main---move-ranking-out
  • Loading branch information
kimden committed Dec 19, 2024
2 parents f48b40f + fe08205 commit fe9d935
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
matrix:
arch: [i686, x86_64, armv7, aarch64]
os: [windows-latest, ubuntu-latest]
exclude:
- arch: armv7
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down
23 changes: 15 additions & 8 deletions src/graphics/sp/sp_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ unsigned g_skinning_offset = 0;
// ----------------------------------------------------------------------------
std::vector<SPMeshNode*> g_skinning_mesh;
// ----------------------------------------------------------------------------
int g_skinning_tbo_limit = 0;
bool g_skinning_use_tbo = false;
// ----------------------------------------------------------------------------
int sp_cur_shadow_cascade = 0;
// ----------------------------------------------------------------------------
Expand Down Expand Up @@ -319,12 +319,13 @@ void initSkinning()
else
{
#ifndef USE_GLES2
glGetIntegerv(GL_MAX_TEXTURE_BUFFER_SIZE, &g_skinning_tbo_limit);
if (stk_config->m_max_skinning_bones << 6 > (unsigned)g_skinning_tbo_limit)
int skinning_tbo_limit;
glGetIntegerv(GL_MAX_TEXTURE_BUFFER_SIZE, &skinning_tbo_limit);
if (stk_config->m_max_skinning_bones << 6 > (unsigned)skinning_tbo_limit)
{
Log::warn("SharedGPUObjects", "Too many bones for skinning, max: %d",
g_skinning_tbo_limit >> 6);
stk_config->m_max_skinning_bones = g_skinning_tbo_limit >> 6;
skinning_tbo_limit >> 6);
stk_config->m_max_skinning_bones = skinning_tbo_limit >> 6;
}
Log::info("SharedGPUObjects", "Hardware Skinning enabled, method: TBO, "
"max bones: %u", stk_config->m_max_skinning_bones);
Expand Down Expand Up @@ -444,7 +445,14 @@ void init()

if (CVS->isARBTextureBufferObjectUsable())
{
glGetIntegerv(GL_MAX_TEXTURE_BUFFER_SIZE_ARB, &g_skinning_tbo_limit);
int skinning_tbo_limit;
glGetIntegerv(GL_MAX_TEXTURE_BUFFER_SIZE_ARB, &skinning_tbo_limit);

g_skinning_use_tbo = skinning_tbo_limit >= stk_config->m_max_skinning_bones << 6;
}
else
{
g_skinning_use_tbo = false;
}

initSkinning();
Expand Down Expand Up @@ -655,8 +663,7 @@ SPShader* getNormalVisualizer()
// ----------------------------------------------------------------------------
bool skinningUseTBO()
{
return CVS->isARBTextureBufferObjectUsable()
&& g_skinning_tbo_limit >= 64 * stk_config->m_max_skinning_bones;
return g_skinning_use_tbo;
}


Expand Down
2 changes: 1 addition & 1 deletion src/items/item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ void Item::handleNewMesh(ItemType type)
m_node->setRotation(hpr.toIrrHPR());

if (m_icon_node)
m_node->removeChild(m_icon_node);
m_appear_anime_node->removeChild(m_icon_node);
m_icon_node = NULL;
auto icon = ItemManager::getIcon(type);

Expand Down

0 comments on commit fe9d935

Please sign in to comment.