diff options
author | Tom Stellard <[email protected]> | 2012-04-24 12:36:34 -0400 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-06-01 11:28:09 -0400 |
commit | d724190bce7a10becfb378cad7ef9886ee4d2c8c (patch) | |
tree | 81b1501783559449e793338e5adc78289a3d0966 | |
parent | 5cc08efe8f708633271adc16208f020d79ddca46 (diff) |
clover: Add constructors to some of the module classes v3
This is for the llvm code that can't use extended initializers.
v2:
- Use const references for vector arguments
- Move constructor defs before data members
- Initialize all values in the default constructors
v3:
- Fix typo
-rw-r--r-- | src/gallium/state_trackers/clover/core/module.hpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/clover/core/module.hpp b/src/gallium/state_trackers/clover/core/module.hpp index bc4b203af8e..b1dd7549e4b 100644 --- a/src/gallium/state_trackers/clover/core/module.hpp +++ b/src/gallium/state_trackers/clover/core/module.hpp @@ -44,6 +44,11 @@ namespace clover { data_private }; + section(resource_id id, enum type type, size_t size, + const clover::compat::vector<char> &data) : + id(id), type(type), size(size), data(data) { } + section() : id(0), type(text), size(0), data() { } + resource_id id; type type; size_t size; @@ -63,11 +68,19 @@ namespace clover { sampler }; + argument(enum type type, size_t size) : type(type), size(size) { } + argument() : type(scalar), size(0) { } + type type; size_t size; }; struct symbol { + symbol(const clover::compat::vector<char> &name, resource_id section, + size_t offset, const clover::compat::vector<argument> &args) : + name(name), section(section), offset(offset), args(args) { } + symbol() : name(), section(0), offset(0), args() { } + clover::compat::vector<char> name; resource_id section; size_t offset; |