From: Tom Stellard Date: Tue, 24 Apr 2012 16:36:34 +0000 (-0400) Subject: clover: Add constructors to some of the module classes v3 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d724190bce7a10becfb378cad7ef9886ee4d2c8c;p=mesa.git 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 --- 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 &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 &name, resource_id section, + size_t offset, const clover::compat::vector &args) : + name(name), section(section), offset(offset), args(args) { } + symbol() : name(), section(0), offset(0), args() { } + clover::compat::vector name; resource_id section; size_t offset;