| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "../RhiCapabilitiesBase.h" |
| 4 |
#include "GuDevice.h" |
| 5 |
#include "GuRenderTarget.h" |
| 6 |
#include "GuTexture.h" |
| 7 |
|
| 8 |
namespace nCine::RHI::GU |
| 9 |
{ |
| 10 |
/** |
| 11 |
@brief Runtime capabilities of the GU backend |
| 12 |
|
| 13 |
The Allegrex GE has no queryable API context, so the limits come from the device the window backend |
| 14 |
has already created (see @ref RhiCapabilitiesBase::SetDeviceCapabilities()). |
| 15 |
*/ |
| 16 |
class GuRhiCapabilities : public RhiCapabilitiesBase |
| 17 |
{ |
| 18 |
public: |
| 19 |
GuRhiCapabilities() |
| 20 |
{ |
| 21 |
// The GE's true texture-dimension limit (512) drives the tileset texture chunking in ContentResolver; |
| 22 |
// prebaked content that is larger anyway is paged internally by GuTexture rather than rejected (see |
| 23 |
// the note on GuDevice::GetMaxTextureDimension()). Uniforms are plain host memory decoded by the |
| 24 |
// draw dispatch |
| 25 |
SetDeviceCapabilities("GU", GuDevice::GetMaxTextureDimension(), std::int32_t(GuTexture::MaxTextureUnits), |
| 26 |
64 * 1024, 16, std::int32_t(GuRenderTarget::MaxColorAttachments)); |
| 27 |
|
| 28 |
LogCapabilities(); |
| 29 |
} |
| 30 |
}; |
| 31 |
} |