• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2017 Google Inc.
3  *
4  * Use of this source code is governed by a BSD-style license that can
5  * be found in the LICENSE file.
6  *
7  */
8 
9 #pragma once
10 
11 //
12 //
13 //
14 
15 #include <CL/opencl.h>
16 
17 #include "styling.h"
18 #include "grid.h"
19 #include "extent_cl_12.h"
20 #include "assert_state.h"
21 
22 //
23 // styling states
24 //
25 
26 typedef enum skc_styling_state_e {
27 
28   SKC_STYLING_STATE_UNSEALING,
29   SKC_STYLING_STATE_UNSEALED,
30   SKC_STYLING_STATE_SEALING,
31   SKC_STYLING_STATE_SEALED
32 
33 } skc_styling_state_e;
34 
35 //
36 // IMPL
37 //
38 
39 struct skc_styling_impl
40 {
41   struct skc_styling         * styling;
42   struct skc_runtime         * runtime;
43 
44   SKC_ASSERT_STATE_DECLARE(skc_styling_state_e);
45 
46   skc_int                      lock_count;  // # of wip renders
47 
48   skc_grid_t                   grid;
49 
50   // in-order command queue
51   cl_command_queue             cq;
52 
53   //
54   // only 3 extents
55   //
56   struct skc_extent_phwN_pdrN  layers;
57   struct skc_extent_phwN_pdrN  groups;
58   struct skc_extent_phwN_pdrN  extras;
59 };
60 
61 //
62 // ONLY VISIBLE WITHIN THIS RUNTIME
63 //
64 
65 void
66 skc_styling_retain_and_lock(struct skc_styling * const styling);
67 
68 void
69 skc_styling_unlock_and_release(struct skc_styling * const styling);
70 
71 //
72 //
73 //
74