| 1 |
#pragma once |
| 2 |
|
| 3 |
#include "../RhiCapabilitiesBase.h" |
| 4 |
#include "GsDevice.h" |
| 5 |
#include "GsRenderTarget.h" |
| 6 |
#include "GsTexture.h" |
| 7 |
|
| 8 |
namespace nCine::RHI::GS |
| 9 |
{ |
| 10 |
/** |
| 11 |
@brief Runtime capabilities of the Graphics Synthesizer backend |
| 12 |
|
| 13 |
The GS has no queryable API context at all - it is a set of memory-mapped registers - so the limits |
| 14 |
are the hardware's own, stated here (see @ref RhiCapabilitiesBase::SetDeviceCapabilities()). |
| 15 |
*/ |
| 16 |
class GsRhiCapabilities : public RhiCapabilitiesBase |
| 17 |
{ |
| 18 |
public: |
| 19 |
GsRhiCapabilities() |
| 20 |
{ |
| 21 |
// `TEX0.TW`/`TH` are log2 sizes capped at 10, so 1024 is the hardware texture-dimension limit - |
| 22 |
// the same as the PowerVR's, and it drives the tileset texture chunking in ContentResolver. |
| 23 |
// Uniforms are plain host memory decoded by the draw dispatch. |
| 24 |
SetDeviceCapabilities("Graphics Synthesizer", GsDevice::GetMaxTextureDimension(), std::int32_t(GsTexture::MaxTextureUnits), |
| 25 |
64 * 1024, 16, std::int32_t(GsRenderTarget::MaxColorAttachments)); |
| 26 |
|
| 27 |
LogCapabilities(); |
| 28 |
} |
| 29 |
}; |
| 30 |
} |