mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-18 23:43:23 +09:00
[Fix] (CMakeLists.txt, MG_Backend/DirectGLES, MG_Pipe, MG_Test/Backend, MG_Test/ShaderTranspiler, MG_Util/ShaderTranspiler): give integer attributes their GL value in Espryt
- every integer array reaches the driver with its input's signedness, at the pointer, zero-stride and client-memory call sites, so each fetch is one ES defines - 8/16-bit data of the other signedness is widened back by the program's runtime-width seeds, armed on the first draw that needs them and set as two uniforms per draw - capture programs with integer inputs are armed at their first build; arming is part of the ESSL translation key - a build whose seeds cannot be verified keeps the driver's own value for narrow data; one that fails to link is rebuilt without them - the program's integer input masks are memoized on its shader record
This commit is contained in:
@@ -208,6 +208,7 @@ namespace MobileGL::MG_Util::ShaderTranspiler {
|
||||
builder.StringMap(inputs.outputBlockRenames ? *inputs.outputBlockRenames : kEmptyRenames);
|
||||
builder.Value(static_cast<Uint8>(inputs.stripInputBlockLocations));
|
||||
builder.Value(static_cast<Uint8>(inputs.stripOutputBlockLocations));
|
||||
builder.Value(static_cast<Uint8>(inputs.narrowIntegerSeedsArmed));
|
||||
static const Vector<Uint32> kEmptyWords;
|
||||
builder.Words(inputs.spirv ? *inputs.spirv : kEmptyWords);
|
||||
return MakeTranslationCacheKey(builder);
|
||||
|
||||
@@ -670,6 +670,10 @@ namespace MobileGL::MG_Util::ShaderTranspiler {
|
||||
// other end is in a different program must keep its location.
|
||||
Bool stripInputBlockLocations = false;
|
||||
Bool stripOutputBlockLocations = false;
|
||||
// Whether this (vertex) stage carries the narrow-integer seeds - a per-program arming, set
|
||||
// only once some draw fed the program 8/16-bit data of the other signedness, which changes
|
||||
// the emitted ESSL of the same module.
|
||||
Bool narrowIntegerSeedsArmed = false;
|
||||
|
||||
// The top of the reserved storage-block window atomic-counter blocks are moved into
|
||||
// (`top - N` for GL binding N). Derived from the driver's
|
||||
|
||||
Reference in New Issue
Block a user