diff options
author | Hans de Goede <[email protected]> | 2016-03-10 13:52:00 +0100 |
---|---|---|
committer | Hans de Goede <[email protected]> | 2016-03-21 12:20:24 +0100 |
commit | 3788e1bf748eca3186377dfa60dbba1c37f8939e (patch) | |
tree | f11c11e8c07eff743e57d11a59ca794cb473014a /src/gallium/auxiliary/tgsi/tgsi_build.c | |
parent | 43ddec2f435b3e42a1c271ef485f6959bd59b148 (diff) |
tgsi: Add support for global / private / input MEMORY
Extend the MEMORY file support to differentiate between global, private
and shared memory, as well as "input" memory.
"MEMORY[x], INPUT" is intended to access OpenCL kernel parameters, a
special memory type is added for this, since the actual storage of these
(e.g. UBO-s) may differ per implementation. The uploading of kernel
parameters is handled by launch_grid, "MEMORY[x], INPUT" allows drivers
to use an access mechanism for parameter reads which matches with the
upload method.
Signed-off-by: Hans de Goede <[email protected]>
Reviewed-by: Ilia Mirkin <[email protected]> (v1)
Reviewed-by: Samuel Pitoiset <[email protected]> (v2)
Diffstat (limited to 'src/gallium/auxiliary/tgsi/tgsi_build.c')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_build.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_build.c b/src/gallium/auxiliary/tgsi/tgsi_build.c index f767b089133..7e30bb646e2 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_build.c +++ b/src/gallium/auxiliary/tgsi/tgsi_build.c @@ -111,7 +111,7 @@ tgsi_default_declaration( void ) declaration.Local = 0; declaration.Array = 0; declaration.Atomic = 0; - declaration.Shared = 0; + declaration.MemType = TGSI_MEMORY_TYPE_GLOBAL; declaration.Padding = 0; return declaration; @@ -128,7 +128,7 @@ tgsi_build_declaration( unsigned local, unsigned array, unsigned atomic, - unsigned shared, + unsigned mem_type, struct tgsi_header *header ) { struct tgsi_declaration declaration; @@ -146,7 +146,7 @@ tgsi_build_declaration( declaration.Local = local; declaration.Array = array; declaration.Atomic = atomic; - declaration.Shared = shared; + declaration.MemType = mem_type; header_bodysize_grow( header ); return declaration; @@ -406,7 +406,7 @@ tgsi_build_full_declaration( full_decl->Declaration.Local, full_decl->Declaration.Array, full_decl->Declaration.Atomic, - full_decl->Declaration.Shared, + full_decl->Declaration.MemType, header ); if (maxsize <= size) |