nvk: Avoid strict aliasing warning in the pushbuffer encoding.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
Emma Anholt 2022-09-10 22:19:57 -07:00 committed by Marge Bot
parent 5c853ed300
commit 5d0aa694ee
2 changed files with 3 additions and 2 deletions

View file

@ -47,6 +47,7 @@ TEMPLATE_H = Template("""\
#include "${clheader}"
#include <assert.h>
#include "util/u_math.h"
%for mthd in mthddict:
struct nv_${nvcl.lower()}_${mthd} {
@ -190,7 +191,7 @@ P_DUMP_${nvcl}_MTHD_DATA(uint16_t idx, uint32_t data, const char *prefix)
}
%else:
%if mthddict[mthd].is_float:
printf("%ff (0x%x)${bs}n", *(float *)&parsed, parsed);
printf("%ff (0x%x)${bs}n", uif(parsed), parsed);
%else:
printf("(0x%x)${bs}n", parsed);
%endif

View file

@ -35,7 +35,7 @@ endforeach
_libnvidia_headers = static_library(
'nvidia_headers',
cl_generated,
include_directories : ['.', 'classes'],
include_directories : ['.', 'classes', inc_include, inc_src],
c_args : [no_override_init_args],
gnu_symbol_visibility : 'hidden',
)