wimrijnders / V3DLib

C++ library for programming the VideoCore GPU on all Raspberry Pi's.
Other
116 stars 22 forks source link

Build error on non-debug builds #7

Open cspanier opened 2 years ago

cspanier commented 2 years ago

When building with DEBUG=0 I get an error at https://github.com/wimrijnders/V3DLib/blob/6988cce3b00d859fdc59a8a9eed3f62bbc0d3a31/Lib/v3d/KernelDriver.cpp#L735 stating that checkUniformAtTop is not defined. In fact the function is defined in the same file above within a preprocessor #if directive:

#ifdef DEBUG
bool checkUniformAtTop(V3DLib::Instr::List const &instrs) {
...
#endif
cspanier commented 2 years ago

I fixed the code real quick for myself by putting the line within the same #if directive:

--- a/Lib/v3d/KernelDriver.cpp
+++ b/Lib/v3d/KernelDriver.cpp
@@ -732,7 +732,9 @@ bool checkUniformAtTop(V3DLib::Instr::List const &instrs) {
  * Translate instructions from target to v3d
  */
 void _encode(V3DLib::Instr::List const &instrs, Instructions &instructions) {
+#ifdef DEBUG
   assertq(checkUniformAtTop(instrs), "_encode(): checkUniformAtTop() failed (v3d)", true);
+#endif
   bool prev_was_init_begin = false;
   bool prev_was_init_end    = false;
riban-bw commented 2 years ago

Good catch @cspanier. There hasn't been any activity on this project for over a year which may point to it being abandoned or mothballed. @wimrijnders seems to be absent from github since August 2021. I hope he is okay!