diff options
author | Karol Herbst <[email protected]> | 2020-07-06 16:57:07 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-07-07 11:32:14 +0000 |
commit | 31e344799a701630164f6f7907b09e5699a769d9 (patch) | |
tree | 55aab43e860819f5e0407c9ccad97dddb4e19f9d /src/gallium/drivers | |
parent | a43eb650de4b7b7f2f1378df1adf167ba9a4a2cc (diff) |
gv100/ir: fix coherent and volatile memory access
Signed-off-by: Karol Herbst <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5747>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.cpp | 23 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.h | 2 |
2 files changed, 10 insertions, 15 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.cpp index 0b59f64f156..ef33743e610 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.cpp @@ -991,21 +991,22 @@ CodeEmitterGV100::emitISBERD() } void -CodeEmitterGV100::emitLDSTc(int pos) +CodeEmitterGV100::emitLDSTc(int posm, int poso) { int mode = 0; + int order = 1; switch (insn->cache) { - case CACHE_CA: mode = 0; break; - case CACHE_CG: mode = 1; break; - case CACHE_CS: mode = 2; break; - case CACHE_CV: mode = 3; break; + case CACHE_CA: mode = 0; order = 1; break; + case CACHE_CG: mode = 2; order = 2; break; + case CACHE_CV: mode = 3; order = 2; break; default: assert(!"invalid caching mode"); break; } - emitField(pos, 2, mode); + emitField(poso, 2, order); + emitField(posm, 2, mode); } void @@ -1459,7 +1460,6 @@ CodeEmitterGV100::emitSULD() assert(0); break; } - // emitLDSTc(0x18); emitField(73, 3, type); } else { emitInsn(0x998); @@ -1468,7 +1468,7 @@ CodeEmitterGV100::emitSULD() } emitPRED (81); - emitField(79, 2, 1); + emitLDSTc(77, 79); emitGPR (16, insn->def(0)); emitGPR (24, insn->src(0)); @@ -1488,12 +1488,7 @@ CodeEmitterGV100::emitSUST() #endif emitSUTarget(); - -#if 0 - emitLDSTc(0x18); -#endif - - emitField(79, 2, 1); + emitLDSTc(77, 79); emitField(72, 4, 0xf); // rgba emitGPR(32, insn->src(1)); emitGPR(24, insn->src(0)); diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.h b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.h index e97bf6580a1..15ab717e460 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.h +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gv100.h @@ -364,7 +364,7 @@ private: void emitATOMS(); void emitIPA(); void emitISBERD(); - void emitLDSTc(int); + void emitLDSTc(int, int); void emitLDSTs(int, DataType); void emitLD(); void emitLDC(); |