Skip to main content

validate-hardcoded

Validate our hardcoded commands against code generated variants

Ir a la instalación

Datos de origen

Repositorio
ARM-software/lavatube
Última actividad en el origen
2 de agosto de 2026 a las 22:43
Idioma detectado de SKILL.md
inglés
Estrellas
9
Forks
5

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
name
validate-hardcoded
description
Validate our hardcoded commands against code generated variants
metadata
{"short-description":"Validate lavatube's hardcoded command implementations to see if we missed anything"}
1. The generated code is not version controlled. You can make a temporary copy of the generated code to diff the new code against. It can be done like this: ``` tmpdir=$(mktemp -d /tmp/validate_hardcoded.XXXXXX) cp generated/read_auto.cpp generated/read_auto.h \ generated/write_auto.cpp generated/write_auto.h \ generated/struct_read_auto.cpp generated/struct_write_auto.cpp \ "$tmpdir"/ ``` Code diffs can now be created with eg `diff -u "$tmpdir/write_auto.cpp" generated/write_auto.cpp`. 3. In `scripts/vkconfig.py` set the lists `hardcoded`, `hardcoded_write`, `hardcoded_read` to empty (or if a specific command is requested for validation, simply remove this command from the list). 4. In `scripts/util.py` set the variable `bypass_checks` to `True` 5. Rerun the script `scripts/lava.py`. This will generate code generated variants of these hardcoded commands. 6. Revert the changes made to the above scripts. 7. In `scripts/vkconfig.py`, for each command in the lists `hardcoded`, `hardcoded_write`, `hardcoded_read` compare their hardcoded implementation in `src/hardcode_read.cpp` and `src/hardcode_write` with their autogenerated variants in the `generated/` folder. Assume that the hardcoded variant is older, and look for things it may be missing compared to generated variant. It is hardcoded because we want to deviate from the behaviour of this particular command, but we want it still to be a well-behaved member of the same family of commands. So behaviour common to all commands should still be present, such as callbacks for replay and `thaw` calls for capture. 8. Rerun `scripts/lava.py` to restore everything back to normal.
Ver en GitHub