Skip to content
Snippets Groups Projects

nvk: support fills and clears and copies/blits

Merged Karol Herbst requested to merge karolherbst/mesa:vk/fill_and_clear into nouveau/vk
All threads resolved!
1 file
+ 4
1
Compare changes
  • Side-by-side
  • Inline
  • 92804678
    require valid values to be passed · 92804678
    Karol Herbst authored
    before you could just call it like P_...(push, .., 1); for multi value
    methods. Now it enforces one single value for a single value method and
    a proper struct for multi value ones.
    
    Should lead to less mistakes and lets us drop some code from nvk_push_val
    as immediates are always coming from P_IMMD now
@@ -131,7 +131,10 @@ for mthd in mthddict:
if len(mthddict[mthd].field_defs[field_name]):
for d in mthddict[mthd].field_defs[field_name]:
print("UNUSED uint32_t " + field_name + "_" + d + " = " + nvcl + "_" + mthd + "_" + field_name + "_" + d+"; \\")
print("\tstruct " + structname + " __data = { args }; \\")
if len(mthddict[mthd].field_name_start) > 1:
print("\tstruct " + structname + " __data = args; \\")
else:
print("\tstruct " + structname + " __data = { ." + next(iter(mthddict[mthd].field_name_start)).lower() + " = (args) }; \\")
print("\t__" + nvcl.strip() + "_" + mthd + "(&val, __data); \\")
print("\t}")
print("#define P_" + nvcl + "_" + mthd + "(push, " + ("idx, " if mthddict[mthd].is_array else "") + "args...) do { \\")
Loading