r600/sfn: Add a load GDS result instruction
authorGert Wollny <gert.wollny@collabora.com>
Fri, 27 Dec 2019 16:49:27 +0000 (17:49 +0100)
committerMarge Bot <eric+marge@anholt.net>
Mon, 10 Feb 2020 19:09:08 +0000 (19:09 +0000)
This is required to read results for atomic SSBO  instructions

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3225>

src/gallium/drivers/r600/sfn/sfn_instruction_fetch.cpp
src/gallium/drivers/r600/sfn/sfn_instruction_fetch.h

index e51bb5889690539b62f25ac05513b01e645a5ef8..0fc4f26358de3a1e018ea4fb35cad1952c752ff7 100644 (file)
@@ -301,6 +301,33 @@ LoadFromScratch::LoadFromScratch(GPRVector dst, PValue src, int scratch_size):
 {
 }
 
+FetchGDSOpResult::FetchGDSOpResult(const GPRVector dst, const PValue src):
+   FetchInstruction(vc_fetch,
+                    no_index_offset,
+                    fmt_32,
+                    vtx_nf_int,
+                    vtx_es_none,
+                    src,
+                    dst,
+                    0,
+                    false,
+                    0xf,
+                    R600_IMAGE_IMMED_RESOURCE_OFFSET,
+                    0,
+                    bim_none,
+                    false,
+                    false,
+                    0,
+                    0,
+                    0,
+                    PValue(),
+                    {0,7,7,7})
+{
+   set_flag(vtx_srf_mode);
+   set_flag(vtx_vpm);
+}
+
+
 static const char *fmt_descr[64] = {
    "INVALID",
    "8",
index 465f604fed53fb17be037cff85da781d520a3cba..d1cc42f6135eac7437150513beabcbcf5a086551 100644 (file)
@@ -169,6 +169,11 @@ public:
    LoadFromScratch(GPRVector dst, PValue src, int scratch_size);
 };
 
+class FetchGDSOpResult : public FetchInstruction {
+public:
+   FetchGDSOpResult(const GPRVector dst, const PValue src);
+};
+
 }
 
 #endif // SFN_INSTRUCTION_FETCH_H