From 5b2b4719e67ce8084977fa1b85f71f91df855119 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 5 Mar 2019 12:05:08 +0100 Subject: [PATCH] gallium: inline u_format_pack.generate This makes this code a bit simpler to follow. Signed-off-by: Erik Faye-Lund Signed-off-by: Dave Airlie --- src/gallium/auxiliary/util/u_format_pack.py | 9 --------- src/gallium/auxiliary/util/u_format_table.py | 9 +++++++-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/gallium/auxiliary/util/u_format_pack.py b/src/gallium/auxiliary/util/u_format_pack.py index bd17bd7..3e4fc38 100644 --- a/src/gallium/auxiliary/util/u_format_pack.py +++ b/src/gallium/auxiliary/util/u_format_pack.py @@ -50,12 +50,3 @@ def print_channels(format, func): print('#else') func(format.le_channels, format.le_swizzles) print('#endif') - -def generate(formats): - print() - print('#include "pipe/p_compiler.h"') - print('#include "u_math.h"') - print('#include "u_half.h"') - print('#include "u_format.h"') - print() - diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py index 50146b2..923a6be 100755 --- a/src/gallium/auxiliary/util/u_format_table.py +++ b/src/gallium/auxiliary/util/u_format_table.py @@ -89,8 +89,13 @@ def write_format_table(formats): print('#include "u_format.h"') print() - u_format_pack.generate(formats) - + print() + print('#include "pipe/p_compiler.h"') + print('#include "u_math.h"') + print('#include "u_half.h"') + print('#include "u_format.h"') + print() + def do_channel_array(channels, swizzles): print(" {") for i in range(4):