-
-
Notifications
You must be signed in to change notification settings - Fork 694
Closed
Description
Haxe: latest git
Hashlink: latest git
Heaps.io: latest git
I'm compiling a sample Heaps.io project with DX12 backend to HL/C target.
Compiler throws "Error: Don't know how to compare array and array (hlc)" message.
My investigation has shown the following:
The "flushPipeline" method of heaps/h3d/DX12Driver.hx has the following code:
function flushPipeline() {
if( !needPipelineFlush ) return;
needPipelineFlush = false;
var signature = pipelineSignature;
var signatureSize = PSIGN_LAYOUT + currentShader.inputCount;
adlerOut.setI32(0, 0);
hl.Format.digest(adlerOut, signature, signatureSize, 3);
var hash = adlerOut.getI32(0);
var pipes = currentShader.pipelines.get(hash);
if( pipes == null ) {
pipes = new hl.NativeArray(1);
currentShader.pipelines.set(hash, pipes);
}And something between:
var pipes = currentShader.pipelines.get(hash);
if( pipes == null ) {makes HL/C generate the following C code:
r36 = r0->currentShader;
if( r36 == NULL ) hl_null_access();
r35 = r36->pipelines;
if( r35 == NULL ) hl_null_access();
r37 = r32;
r34 = haxe_ds_IntMap_get(r35,r37);
r38 = (varray*)r34;
r39 = (varray*)hl_dyn_castp(&r34,&t$_dyn,&t$_array);
### WRONG 0 ### r38 == r39 -> label$6a3cd68_69_40 ###;
hl_assert();
label$6a3cd68_69_40:
r40 = r38;
r43 = r40;
if( r43 ) goto label$6a3cd68_69_54;The ### WRONG ### part is my modification to debug this as the haxe compiler actually fails at this point because it can't generate comparison statement for 2 arrays.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels