Closed 3b closed 11 months ago
:UNSIGNED-INT-24-8 is not defined as a keyword for enum type #
from #93: in glTextureSubImage3d
:UNSIGNED-INT-8-8-8-8-REV is not defined as a keyword for enum type #<CFFI::FOREIGN-ENUM CL-OPENGL-BINDINGS::PIXEL-TYPE>.
:UNSIGNED-INT-2-10-10-10-REV is not defined as a keyword for enum type #<CFFI::FOREIGN-ENUM CL-OPENGL-BINDINGS::PIXEL-TYPE>.
also check :unsigned-int-5-9-9-9-rev
Adding error details as requested in #lispgames (hoping I understood the request correctly): When building nineveh (using SBCL 2.0.9 and 2.0.9.48, as well as CCL v1.12-32):
; processing (DEFN BUFFER-STREAMER-PUSH-FROM-RANGE ...)
; file: /cl/scm/nineveh/streams/buffer-streamer.lisp
; in: DEFN BUFFER-STREAMER-PUSH-FROM-RANGE
; (CEPL.GPU-ARRAYS:WITH-GPU-ARRAY-RANGE-AS-POINTER (NINEVEH.STREAMS::G-PTR
; NINEVEH.STREAMS::G-ARR
; NINEVEH.STREAMS::NEW-START-POS
; NINEVEH.STREAMS::C-LEN
; :ACCESS-SET
; '(:MAP-WRITE
; :MAP-UNSYNCHRONIZED))
; (CEPL.TYPES::%MEMCPY NINEVEH.STREAMS::G-PTR NINEVEH.STREAMS::C-PTR
; (*
; (%CEPL.TYPES:C-ARRAY-ELEMENT-BYTE-SIZE
; %CEPL.TYPES:C-ARRAY)
; NINEVEH.STREAMS::C-LEN)))
;
; caught ERROR:
; during macroexpansion of
; (WITH-GPU-ARRAY-RANGE-AS-POINTER (G-PTR G-ARR NEW-START-POS ...)
; (CEPL.TYPES::%MEMCPY G-PTR C-PTR ...)).
; Use *BREAK-ON-SIGNALS* to intercept.
;
; Unknown CFFI type CL-OPENGL-BINDINGS::MAPBUFFERUSAGEMASK
Expanding the macro (but not sure I'm doing this correctly, so any guidance appreciated):
0: (CFFI::UNDEFINED-FOREIGN-TYPE-ERROR CL-OPENGL-BINDINGS::MAPBUFFERUSAGEMASK :DEFAULT)
Locals:
NAMESPACE = :DEFAULT
TYPE-NAME = CL-OPENGL-BINDINGS::MAPBUFFERUSAGEMASK
1: (CFFI::FIND-TYPE-PARSER CL-OPENGL-BINDINGS::MAPBUFFERUSAGEMASK :DEFAULT)
Locals:
NAMESPACE = :DEFAULT
SYMBOL = CL-OPENGL-BINDINGS::MAPBUFFERUSAGEMASK
2: (CFFI::PARSE-TYPE CL-OPENGL-BINDINGS::MAPBUFFERUSAGEMASK)
Locals:
TYPE = CL-OPENGL-BINDINGS::MAPBUFFERUSAGEMASK
3: (CFFI::ENSURE-PARSED-BASE-TYPE CL-OPENGL-BINDINGS::MAPBUFFERUSAGEMASK)
Locals:
TYPE = CL-OPENGL-BINDINGS::MAPBUFFERUSAGEMASK
4: (CFFI:FOREIGN-BITFIELD-SYMBOL-LIST CL-OPENGL-BINDINGS::MAPBUFFERUSAGEMASK)
Locals:
BITFIELD-TYPE = CL-OPENGL-BINDINGS::MAPBUFFERUSAGEMASK
5: (CEPL.GPU-ARRAYS::%PROCESS-WITH-GPU-ARRAY-RANGE-MACRO-ARGS :ARRAY-BUFFER (QUOTE (:MAP-WRITE :MAP-UNSYNCHRONIZED)))
Locals:
ACCESS-SET = '(:MAP-WRITE :MAP-UNSYNCHRONIZED)
#:TEMP0 = :ARRAY-BUFFER
6: ((MACRO-FUNCTION WITH-GPU-ARRAY-RANGE-AS-POINTER) (WITH-GPU-ARRAY-RANGE-AS-POINTER (G-PTR G-ARR NEW-START-POS C-LEN :ACCESS-SET (QUOTE #)) (CEPL.TYPES::%MEMCPY G-PTR C-PTR (* # C-LEN))) #<unused argum..
Locals:
#:EXPR = (WITH-GPU-ARRAY-RANGE-AS-POINTER (G-PTR G-ARR NEW-START-POS C-LEN :ACCESS-SET '(:MAP-WRITE :MAP-UNSYNCHRONIZED)) ..)
CEPL.GPU-ARRAYS::GTARGET = #:GTARGET3876
CEPL.GPU-ARRAYS::TARGET = :ARRAY-BUFFER
Noticed this comment:
{TODO} make a PR to add this to cl-opengl
close to the macro definition.
Replacing mapbufferusagemask
with mapbufferaccessmask
in CEPL seems to be all that's needed to solve the nineveh issue.
Gave up on the new enum groups in order to get cl-opengl development moving again, so closing this.
(Didn't have enough energy to get the gl spec changes upstream, and the more specific enum types seemed to cause more problems than they helped anyway)
todo list:
:framebuffer-ext
inFRAMEBUFFER-ATTACHMENT
:RENDERBUFFER-EXT
inRENDERBUFFER-TARGET
:DEPTH-COMPONENT24
inINTERNAL-FORMAT
:MAX-TEXTURE-MAX-ANISOTROPY-EXT
inGET-PNAME
gl:get*
in general; Unknown CFFI type CL-OPENGL-BINDINGS::MAPBUFFERUSAGEMASK
PIXEL-TYPE
::UNSIGNED-INT-24-8
:float-32-unsigned-int-24-8-rev
:UNSIGNED-INT-8-8-8-8-REV
:UNSIGNED-INT-2-10-10-10-REV
:unsigned-int-5-9-9-9-rev
:DEPTH-STENCIL-ATTACHMENT
inFRAMEBUFFER-ATTACHMENT
things that need verified as either cl-opengl bugs, or problems with new enough groups in gl.xml:
:FRAMEBUFFER-EXT is not defined as a keyword for enum type #<CFFI::FOREIGN-ENUM CL-OPENGL-BINDINGS::FRAMEBUFFER-TARGET>.
(%GL:BIND-FRAMEBUFFER-EXT :FRAMEBUFFER-EXT 1)
(%GL:FRAMEBUFFER-TEXTURE-2D-EXT :FRAMEBUFFER-EXT :COLOR-ATTACHMENT0-EXT :TEXTURE-2D 1 0)
(gl:framebuffer-renderbuffer-ext :framebuffer-ext :depth-attachment-ext :renderbuffer-ext depthbuffer))
:RENDERBUFFER-EXT is not defined as a keyword for enum type #<CFFI::FOREIGN-ENUM CL-OPENGL-BINDINGS::RENDERBUFFER-TARGET>.
(CL-OPENGL-BINDINGS:BIND-RENDERBUFFER-EXT :RENDERBUFFER-EXT 1)
(gl:renderbuffer-storage-ext :renderbuffer-ext :depth-component24 512 512)
:DEPTH-COMPONENT24 is not defined as a keyword for enum type #<CFFI::FOREIGN-ENUM CL-OPENGL-BINDINGS::INTERNAL-FORMAT>.
(gl:renderbuffer-storage-ext :renderbuffer-ext :depth-component24 512 512)
`:MAX-TEXTURE-MAX-ANISOTROPY-EXT is not defined as a keyword for enum type #.)
(CL-OPENGL:GET-FLOAT :MAX-TEXTURE-MAX-ANISOTROPY-EXT 1)