That's interesting. Some d3d10 docs list this indeed as 15+1 (and that +1 is really needed too for the immediates, as you can have indirectly addressed immediates which are little more than ordinary uniforms for the hw). So does d3d11: https://msdn.microsoft.com/en-us/library/windows/desktop/ff819065%28v=vs.85%29.aspx "Common-shader core constant-buffer slots D3D11_COMMONSHADER_CONSTANT_BUFFER_HW_SLOT_COUNT (15) (+1 set aside for an immediate constant buffer in shaders)"
Albeit currently for d3d10 it indeed lists 14: https://msdn.microsoft.com/en-us/library/windows/desktop/cc308052%28v=vs.85%29.aspx "Common-shader core constant-buffer slots 14" Maybe it got lowered because nvidia couldn't do more... Roland Am 01.12.2015 um 01:55 schrieb Ilia Mirkin: > How sure are you about this? This would make it very annoying to > implement on recent (kepler+) nvidia hardware... there are 16 constbuf > positions total, of which one has to contain texture descriptor data > (mandated by the hw), and it's common to have at least one > driver-internal one. If you're careful it could be shared with the > texture one, but iirc nvidia isn't too careful about it. FWIW nouveau > currently exposes 13, while nvidia apparently does 14. > > On Mon, Nov 30, 2015 at 7:49 PM, Kenneth Graunke <[email protected]> > wrote: >> I believe that DirectX offers 16 UBOs, with one reserved for special >> purposes. This means that the practical lower bound is 15, even if >> OpenGL only mandates 12. >> >> Without this, Shadow of Mordor shaders fail to work because of limit >> checking around GL_MAX_UNIFORM_BUFFER_BINDINGS. >> >> Signed-off-by: Kenneth Graunke <[email protected]> >> --- >> src/mesa/drivers/dri/i965/brw_context.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> Shadow of Mordor also needs tessellation, so backporting this wouldn't >> help the game any. >> >> diff --git a/src/mesa/drivers/dri/i965/brw_context.h >> b/src/mesa/drivers/dri/i965/brw_context.h >> index e45df46..e20082f 100644 >> --- a/src/mesa/drivers/dri/i965/brw_context.h >> +++ b/src/mesa/drivers/dri/i965/brw_context.h >> @@ -414,7 +414,7 @@ struct brw_ff_gs_prog_data { >> #define BRW_MAX_DRAW_BUFFERS 8 >> >> /** Max number of UBOs in a shader */ >> -#define BRW_MAX_UBO 12 >> +#define BRW_MAX_UBO 15 >> >> /** Max number of SSBOs in a shader */ >> #define BRW_MAX_SSBO 12 >> -- >> 2.6.2 >> >> _______________________________________________ >> mesa-dev mailing list >> [email protected] >> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.freedesktop.org_mailman_listinfo_mesa-2Ddev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=Vjtt0vs_iqoI31UfJxBl7yv9I2FeiaeAYgMTLKRBc_I&m=2nwoeQr1mIb_4Ji81wSuflBwCfM7pmHs9mMFZ3GJTLs&s=ZraX3l1wImjdkZdflVOk6Y_3RI7bR3cQJpZo32YJB3E&e= >> > _______________________________________________ > mesa-dev mailing list > [email protected] > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.freedesktop.org_mailman_listinfo_mesa-2Ddev&d=BQIGaQ&c=Sqcl0Ez6M0X8aeM67LKIiDJAXVeAw-YihVMNtXt-uEs&r=Vjtt0vs_iqoI31UfJxBl7yv9I2FeiaeAYgMTLKRBc_I&m=2nwoeQr1mIb_4Ji81wSuflBwCfM7pmHs9mMFZ3GJTLs&s=ZraX3l1wImjdkZdflVOk6Y_3RI7bR3cQJpZo32YJB3E&e= > > _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
