mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
feat(gx): remove placeholder max tex size field from gx caps
This commit is contained in:
parent
5d49ab72c4
commit
27583b6f2e
3 changed files with 1 additions and 5 deletions
|
|
@ -16,7 +16,6 @@ class CGxCaps {
|
||||||
int32_t m_generateMipMaps = 0;
|
int32_t m_generateMipMaps = 0;
|
||||||
int32_t m_texTarget[GxTexTargets_Last];
|
int32_t m_texTarget[GxTexTargets_Last];
|
||||||
uint32_t m_texMaxSize[GxTexTargets_Last];
|
uint32_t m_texMaxSize[GxTexTargets_Last];
|
||||||
uint32_t m_maxTextureSize = 0;
|
|
||||||
int32_t m_texFmtDxt1 = 0;
|
int32_t m_texFmtDxt1 = 0;
|
||||||
int32_t m_texFmtDxt3 = 0;
|
int32_t m_texFmtDxt3 = 0;
|
||||||
int32_t m_texFmtDxt5 = 0;
|
int32_t m_texFmtDxt5 = 0;
|
||||||
|
|
|
||||||
|
|
@ -48,8 +48,6 @@ CGxCaps* GxCaps() {
|
||||||
|
|
||||||
g_placeholderGxCaps->m_generateMipMaps = 1;
|
g_placeholderGxCaps->m_generateMipMaps = 1;
|
||||||
|
|
||||||
g_placeholderGxCaps->m_maxTextureSize = 4096;
|
|
||||||
|
|
||||||
g_placeholderGxCaps->m_texFmtDxt1 = 1;
|
g_placeholderGxCaps->m_texFmtDxt1 = 1;
|
||||||
g_placeholderGxCaps->m_texFmtDxt3 = 1;
|
g_placeholderGxCaps->m_texFmtDxt3 = 1;
|
||||||
g_placeholderGxCaps->m_texFmtDxt5 = 1;
|
g_placeholderGxCaps->m_texFmtDxt5 = 1;
|
||||||
|
|
|
||||||
|
|
@ -508,10 +508,9 @@ uint32_t MippedImgCalcSize(uint32_t fourCC, uint32_t width, uint32_t height) {
|
||||||
// - order: width, height or height, width?
|
// - order: width, height or height, width?
|
||||||
void RequestImageDimensions(uint32_t* width, uint32_t* height, uint32_t* bestMip) {
|
void RequestImageDimensions(uint32_t* width, uint32_t* height, uint32_t* bestMip) {
|
||||||
CGxCaps systemCaps;
|
CGxCaps systemCaps;
|
||||||
|
|
||||||
memcpy(&systemCaps, GxCaps(), sizeof(systemCaps));
|
memcpy(&systemCaps, GxCaps(), sizeof(systemCaps));
|
||||||
|
|
||||||
uint32_t maxTextureSize = systemCaps.m_maxTextureSize;
|
auto maxTextureSize = systemCaps.m_texMaxSize[GxTex_2d];
|
||||||
|
|
||||||
if (maxTextureSize) {
|
if (maxTextureSize) {
|
||||||
while (*height > maxTextureSize || *width > maxTextureSize) {
|
while (*height > maxTextureSize || *width > maxTextureSize) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue