diff options
author | Samuel Pitoiset <[email protected]> | 2019-08-20 15:23:11 +0200 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2019-08-21 08:17:38 +0200 |
commit | 1650e747c6ddd7179e9bbee44c9704d1e80b7655 (patch) | |
tree | fb0c7978de21f86a579a011d4c1c9f7c6e7dcfb5 /src/amd | |
parent | 958390a9bf8904522a50f8e9c26c50c96179c183 (diff) |
radv/gfx10: tidy up gfx10_format_table.py
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r-- | src/amd/vulkan/gfx10_format_table.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/amd/vulkan/gfx10_format_table.py b/src/amd/vulkan/gfx10_format_table.py index 34ad5f6cdf2..81b0bed92aa 100644 --- a/src/amd/vulkan/gfx10_format_table.py +++ b/src/amd/vulkan/gfx10_format_table.py @@ -21,7 +21,7 @@ # USE OR OTHER DEALINGS IN THE SOFTWARE. # """ -Script that generates the mapping from Gallium PIPE_FORMAT_xxx to gfx10 +Script that generates the mapping from Vulkan VK_FORMAT_xxx to gfx10 IMG_FORMAT_xxx enums. """ @@ -34,12 +34,10 @@ import re import sys AMD_REGISTERS = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "../registers")) -#GALLIUM_UTIL = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), "../../auxiliary/util")) sys.path.extend([AMD_REGISTERS]) from regdb import Object, RegisterDatabase from vk_format_parse import * -#from u_format_parse import * # ---------------------------------------------------------------------------- # Hard-coded mappings @@ -82,11 +80,11 @@ header_template = mako.template.Template("""\ ##__VA_ARGS__ } static const struct gfx10_format gfx10_format_table[VK_FORMAT_RANGE_SIZE] = { -% for pipe_format, args in formats: +% for vk_format, args in formats: % if args is not None: - [${pipe_format}] = FMT(${args}), + [${vk_format}] = FMT(${args}), % else: -/* ${pipe_format} is not supported */ +/* ${vk_format} is not supported */ % endif % endfor }; @@ -114,8 +112,8 @@ class Gfx10Format(object): class Gfx10FormatMapping(object): - def __init__(self, pipe_formats, gfx10_formats): - self.pipe_formats = pipe_formats + def __init__(self, vk_formats, gfx10_formats): + self.vk_formats = vk_formats self.gfx10_formats = gfx10_formats self.plain_gfx10_formats = dict( @@ -219,17 +217,17 @@ class Gfx10FormatMapping(object): if __name__ == '__main__': - pipe_formats = parse(sys.argv[1]) + vk_formats = parse(sys.argv[1]) with open(sys.argv[2], 'r') as filp: db = RegisterDatabase.from_json(json.load(filp)) gfx10_formats = [Gfx10Format(entry) for entry in db.enum('IMG_FORMAT').entries] - mapping = Gfx10FormatMapping(pipe_formats, gfx10_formats) + mapping = Gfx10FormatMapping(vk_formats, gfx10_formats) formats = [] - for fmt in pipe_formats: + for fmt in vk_formats: if fmt.name in HARDCODED: obj = HARDCODED[fmt.name] else: |