Maybe begin work on replay jobs?
authorCafe <cafe@not.applicable>
Wed, 26 Jul 2017 00:00:00 +0000 (00:00 +0000)
committerCafe <cafe@not.applicable>
Wed, 26 Jul 2017 16:07:40 +0000 (16:07 +0000)
re.c

diff --git a/re.c b/re.c
index dcec32dc67aea4c82b5a017d03412ff28ec5489d..064138ae8de05b3080e6733f7134fced5622c5b4 100644 (file)
--- a/re.c
+++ b/re.c
@@ -368,6 +368,31 @@ int job_chain_vertex_tiler(int fd) {
        return 0;
 }
 
+void job_chain_replay(int fd)
+{
+       struct base_dependency depNoDep = {
+               .atom_id = 0,
+               .dependency_type = BASE_JD_DEP_TYPE_INVALID
+       };
+
+       uint64_t resource = framebuffer | BASE_EXT_RES_ACCESS_EXCLUSIVE;
+
+       struct base_jd_atom_v2 job = {
+               .jc = /* TBD */0,
+               .extres_list = &resource,
+               .nr_extres = 1,
+               .core_req = BASE_JD_REQ_EXTERNAL_RESOURCES | BASE_JD_REQ_SOFT_REPLAY,
+               .atom_number = ++atom_count,
+               .prio = BASE_JD_PRIO_LOW,
+               .device_nr = 0
+       };
+
+       job.pre_dep[0] = depNoDep;
+       job.pre_dep[1] = depNoDep;
+
+       submit_job(fd, &job, 1);
+}
+
 int main()
 {
        int fd = open_kernel_module();
@@ -379,6 +404,7 @@ int main()
        framebuffer = (uint64_t) (uint32_t) galloc(fb_size);
        job_chain_vertex_tiler(fd);
        job_chain_fragment(fd);
+       //job_chain_replay(fd);
 
        /* Dump framebuffer to a file */
        uint8_t *fb = (uint8_t*) (uint32_t) framebuffer;