|
@@ -1225,7 +1225,7 @@ class DX12Driver extends h3d.impl.Driver {
|
|
|
// Remove the size cost of the root constant and add one descriptor table.
|
|
|
var withoutVP = total - vertexParamSizeCost + 1;
|
|
|
var withoutFP = total - fragmentParamSizeCost + 1;
|
|
|
- if( withoutVP < 64 || withoutFP > 64 ) {
|
|
|
+ if( withoutVP < 64 || ( withoutFP > 64 && withoutVP > 64 ) ) {
|
|
|
vertexParamsCBV = true;
|
|
|
total = withoutVP;
|
|
|
}
|
|
@@ -1235,6 +1235,9 @@ class DX12Driver extends h3d.impl.Driver {
|
|
|
}
|
|
|
if( total > 64 ) {
|
|
|
globalsParamsCBV = true;
|
|
|
+ var withoutGlobal = total - (shader.vertex.globalsSize << 2) - (shader.fragment.globalsSize << 2) + 2;
|
|
|
+ if ( withoutGlobal > 64 )
|
|
|
+ throw "Too many params. Use less textures or improve descriptor table packing";
|
|
|
}
|
|
|
}
|
|
|
|