diff options
author | Francisco Jerez <[email protected]> | 2013-07-21 00:49:54 +0200 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2013-07-22 22:47:27 +0200 |
commit | 2265b40e377cc2c9d1091498df2aede5df2ff684 (patch) | |
tree | 682fde6f8c3b1f37e23f02505e003f0b3835bed9 | |
parent | a3dcab43c6b6fed2f35aa0e802be6398985f100c (diff) |
clover: Add kernel argument fields to allow differing host/target data types.
Loosely based on a similar patch by Tom Stellard.
Cc: [email protected]
Reviewed-by: Tom Stellard <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/clover/core/module.hpp | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/gallium/state_trackers/clover/core/module.hpp b/src/gallium/state_trackers/clover/core/module.hpp index 88dfc9f3fc9..e25524eb3dd 100644 --- a/src/gallium/state_trackers/clover/core/module.hpp +++ b/src/gallium/state_trackers/clover/core/module.hpp @@ -68,11 +68,32 @@ namespace clover { sampler }; - argument(enum type type, size_t size) : type(type), size(size) { } - argument() : type(scalar), size(0) { } + enum ext_type { + zero_ext, + sign_ext + }; + + argument(enum type type, size_t size, + size_t target_size, size_t target_align, + enum ext_type ext_type) : + type(type), size(size), + target_size(target_size), target_align(target_align), + ext_type(ext_type) { } + + argument(enum type type, size_t size) : + type(type), size(size), + target_size(size), target_align(1), + ext_type(zero_ext) { } + + argument() : type(scalar), size(0), + target_size(0), target_align(1), + ext_type(zero_ext) { } type type; size_t size; + size_t target_size; + size_t target_align; + ext_type ext_type; }; struct symbol { |