| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "../RhiCapabilitiesBase.h" |
| 4 |
#include "GxDevice.h" |
| 5 |
#include "GxRenderTarget.h" |
| 6 |
#include "GxTexture.h" |
| 7 |
|
| 8 |
namespace nCine::RHI::GX |
| 9 |
{ |
| 10 |
/** |
| 11 |
@brief Runtime capabilities of the GX backend |
| 12 |
|
| 13 |
GX has no queryable API context, so the limits come from the device the window backend has already |
| 14 |
created (see @ref RhiCapabilitiesBase::SetDeviceCapabilities()). |
| 15 |
*/ |
| 16 |
class GxRhiCapabilities : public RhiCapabilitiesBase |
| 17 |
{ |
| 18 |
public: |
| 19 |
GxRhiCapabilities() |
| 20 |
{ |
| 21 |
// The Flipper/Hollywood texture-dimension limit (1024) is the value that drives the tileset |
| 22 |
// texture chunking in ContentResolver; uniforms are plain host memory decoded by the draw dispatch |
| 23 |
// (no device alignment), so 16 bytes / 64 KB are the engine-side packing granularity |
| 24 |
SetDeviceCapabilities("GX", GxDevice::GetMaxTextureDimension(), std::int32_t(GxTexture::MaxTextureUnits), |
| 25 |
64 * 1024, 16, std::int32_t(GxRenderTarget::MaxColorAttachments)); |
| 26 |
|
| 27 |
LogCapabilities(); |
| 28 |
} |
| 29 |
}; |
| 30 |
} |