Re: no GL_ARB_texture_float

burlen <[email protected]>
Newsgroups gmane.comp.video.mesa3d.user
Message-ID <[email protected]>
On 04/19/2013 01:23 PM, burlen wrote:
> On 04/19/2013 08:27 AM, Brian Paul wrote:
>> On 04/18/2013 06:12 PM, burlen wrote:
>>> On 04/18/2013 07:24 AM, Brian Paul wrote:
>>>> I'm render to the texture with a vertex and fragment shader. however
>>>>> textures are clear, nothing got stored in them. Unfortunately the
>>>>> extensions loaded and no errors are reported. The code's been
>>>>> validated on all manner of hardware and platforms, so perhaps there's
>>>>> more to it? perhaps it's an unrelated issue with GLSL?
>>>>>
>>>>> Are there any known issues with GLSL and OS Mesa that would explain?
>>>>
>>>> Sounds like you should file a bug for this. Please provide a test
>>>> program if possible.
>>>>
>>> OK, I'll try to come up with one. I cloned from your git repo today,
>>> might as well work from that in case you've fixed the issue already. I
>>> ran into a few problems building the demos. I'll attach a patch that
>>> has fixes for those issues in case you didn't already fix them.
>>
>> Looks OK to me.  I'll push it in a bit.
>>
> Great!
>
> I tested my code using the git head + os mesa this morning and I am 
> happy to report that it works just fine!!
>
> I encountered a few issues though. The following symbols were missing 
> from libOSMesa when built with ---disable-shared-glapi. I'm attaching 
> the patch I used to solve it.
>
>                  U glAreTexturesResidentEXT
>                  U glDeleteTexturesEXT
>                  U glGenTexturesEXT
>                  U glGetColorTableEXT
>                  U glGetColorTableParameterfvEXT
>                  U glGetColorTableParameterivEXT
>                  U glIsTextureEXT
>
> I'm very excited about the recent improvements in os mesa!
>
> Burlen
Hi Brian,

please disregard the earlier patch. I had missed some changes made to 
generated files, and after some thought wanted to compartmentalize the 
change to only be used for --disable-shared-glapi. I'm attaching the 
updated patch. Not sure if this is really the right way to fix it , more 
specifically I didn't like the change I made to gl_apitemp.py,  so 
please be wary of this patch

Burlen

_______________________________________________
mesa-users mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-users
0001-osmesa-missing-symbols.patch (text/x-patch, 3.9 KB)
From 4b812e1899540a8209319b14c2f12b91f0c20ba6 Mon Sep 17 00:00:00 2001
From: Burlen Loring <[email protected]>
Date: Fri, 19 Apr 2013 13:03:10 -0700
Subject: [PATCH] osmesa missing symbols

fix a handful of missing symbols when
gallium/state_trackers version of osmesa
is built with --disable-shared-glapi.
---
 src/gallium/state_trackers/osmesa/Makefile.am    |    7 +++++-
 src/gallium/state_trackers/osmesa/osmesa_glapi.c |   29 ++++++++++++++++++++++
 src/mapi/glapi/gen/gl_apitemp.py                 |    8 +++---
 src/mapi/glapi/gen/gl_table.py                   |    3 +++
 4 files changed, 42 insertions(+), 5 deletions(-)
 create mode 100644 src/gallium/state_trackers/osmesa/osmesa_glapi.c

diff --git a/src/gallium/state_trackers/osmesa/Makefile.am b/src/gallium/state_trackers/osmesa/Makefile.am
index 3182012..612d5d7 100644
--- a/src/gallium/state_trackers/osmesa/Makefile.am
+++ b/src/gallium/state_trackers/osmesa/Makefile.am
@@ -37,5 +37,10 @@ AM_CPPFLAGS = \
 
 noinst_LTLIBRARIES = libosmesa.la
 
+if !HAVE_SHARED_GLAPI
+OSMESA_GLAPI = \
+	osmesa_glapi.c
+endif
+
 libosmesa_la_SOURCES = \
-	osmesa.c
+	osmesa.c $(OSMESA_GLAPI)
diff --git a/src/gallium/state_trackers/osmesa/osmesa_glapi.c b/src/gallium/state_trackers/osmesa/osmesa_glapi.c
new file mode 100644
index 0000000..9a27f66
--- /dev/null
+++ b/src/gallium/state_trackers/osmesa/osmesa_glapi.c
@@ -0,0 +1,29 @@
+/**
+
+ * When GLX_INDIRECT_RENDERING is defined, some symbols are missing in
+ * libglapi.a.  We need to define them here.
+ */
+#ifdef GLX_INDIRECT_RENDERING
+
+#define GL_GLEXT_PROTOTYPES
+#include "GL/gl.h"
+#include "glapi/glapi.h"
+#include "glapi/glapitable.h"
+
+#if defined(USE_MGL_NAMESPACE)
+#define NAME(func)  mgl##func
+#else
+#define NAME(func)  gl##func
+#endif
+
+#define DISPATCH(FUNC, ARGS, MESSAGE)		\
+   GET_DISPATCH()->FUNC ARGS
+
+#define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) 	\
+   return GET_DISPATCH()->FUNC ARGS
+
+/* skip normal ones */
+#define _GLAPI_SKIP_NORMAL_ENTRY_POINTS
+#include "glapi/glapitemp.h"
+
+#endif /* GLX_INDIRECT_RENDERING */
diff --git a/src/mapi/glapi/gen/gl_apitemp.py b/src/mapi/glapi/gen/gl_apitemp.py
index 4157032..8752edc 100644
--- a/src/mapi/glapi/gen/gl_apitemp.py
+++ b/src/mapi/glapi/gen/gl_apitemp.py
@@ -51,7 +51,7 @@ class PrintGlOffsets(gl_XML.gl_print_base):
         self.undef_list.append( "TABLE_ENTRY" )
 
 
-    def printFunction(self, f, name):
+    def printFunction(self, f, name, need_proto):
         p_string = ""
         o_string = ""
         t_string = ""
@@ -89,7 +89,7 @@ class PrintGlOffsets(gl_XML.gl_print_base):
         else:
             dispatch = "DISPATCH"
 
-        need_proto = False
+        #need_proto = False
         if not f.is_static_entry_point(name):
             need_proto = True
         elif self.es:
@@ -282,7 +282,7 @@ _glapi_proc UNUSED_TABLE_NAME[] = {"""
         print ''
         for func, ents in normal_entry_points:
             for ent in ents:
-                self.printFunction(func, ent)
+                self.printFunction(func, ent, False)
         print ''
         print '#endif /* _GLAPI_SKIP_NORMAL_ENTRY_POINTS */'
         print ''
@@ -291,7 +291,7 @@ _glapi_proc UNUSED_TABLE_NAME[] = {"""
         print ''
         for func, ents in proto_entry_points:
             for ent in ents:
-                self.printFunction(func, ent)
+                self.printFunction(func, ent, True)
         print ''
         print '#endif /* _GLAPI_SKIP_PROTO_ENTRY_POINTS */'
         print ''
diff --git a/src/mapi/glapi/gen/gl_table.py b/src/mapi/glapi/gen/gl_table.py
index fd38468..f1dd16d 100644
--- a/src/mapi/glapi/gen/gl_table.py
+++ b/src/mapi/glapi/gen/gl_table.py
@@ -63,6 +63,9 @@ class PrintGlTable(gl_XML.gl_print_base):
         print '# define GLAPIENTRYP GLAPIENTRY *'
         print '#endif'
         print ''
+        print '/* for GLfixed */'
+        print '#include "glapi_priv.h"'
+        print ''
         print ''
         print 'struct _glapi_table'
         print '{'
-- 
1.7.9.5
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.