util/glsl2spriv: make --vn required

I'm not 100% sure whether it's right to make --vn required, or to avoid
the static conversion, but this seems correct. Mypy (type checking
coming soon) points out that if --vn is None then the
convert_to_static_variable function will fail. Our one use of this sets
--vn, so there is no change there. Making --vn required
ensures that it will never be None, avoiding the problem.

Reviewed-by: Luis Felipe Strano Moraes <luis.strano@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19449>
This commit is contained in:
Dylan Baker
2022-11-01 12:55:12 -07:00
committed by Marge Bot
parent 4ffa8a9ac0
commit 6a5863df82

View File

@@ -53,6 +53,7 @@ def get_args():
parser.add_argument("--vn",
dest="vn",
required=True,
help="Variable name. Creates a C header file that contains a uint32_t array.")
parser.add_argument("--stage",