Michał Król wrote:
Hello, I have enabled GLSL in Mesa, although it is not
complete.Some programming "candies" are not supported, butthis will
change soon as I have now a plenty of free time. I have commited a
demo, arbfslight, which is a GLSL versionof Brian's arbfplight.c.
It contains some hacks, but shouldlook identically. Jeffrey Timanus
offered implementing the preprocessor part.If you are ready, I am
also ready to include it. I will need some help with incorporating
the GLSL intostate machine from somebody who has the overallsight
on the Mesa project. Specifically, I meanall the code that gets
executed when the GL statechanges (like in texstate.c), the
interactions betweenGLSL and the rest of the code, the additional
actionsthat need to be taken when a valid program objectis bound or
unbound, etc.

Generally, when GL state is changed, such as in glProgramStringARB() we set a 'dirty state flag': _NEW_PROGRAM

Later, just before we render anything we validate/update the derived state. See _mesa_update_state() in main/state.c.

I would expect that the GLSL code will need some hooks into that area.


CONCERNING 3DLABS' GLSL COMPILER We have agreed that 3DLabs'
compiler is going to be incorporatedinto Mesa. Because of problems
with getting it compile under MesaI have decided to write custom
plain-C compiler. So is to theNVIDIA's preprocessor.

I think 3Dlabs has released new code since last summer. I'd encourage you to work with 3Dlabs to resolve any issues.


Having this in
mind I separated GL_ARB_shader_objects fromthe remaining 3
extensions. Also I separated the front-compiler(the
slang_compile*.[ch] files) from code generations
(theslang_assemble*.[ch] files). It is possible to plug the
3DLabs'front-end compiler into Mesa, while having the plain-C
version.It is possible, but one is not limited to, to use the
existingassembly generator to generate the code from 3DLabs'
front-endoutput tree.However, currently I dont have so much time to
incorporate the3DLabs' compiler into Mesa. Dont get me wrong, I
just cannotguarantee I will be able to do it in a short time. I do
not wantto block other people form doing that. If there is a
volunteer,I offer my help in solving the questions.

That sounds reasonable.

I'm going to check in some fixes for warnings in the new code (nested comments, missing switch/default clauses, etc.).

I'd also like to run the code through 'indent' to make the style match the rest of Mesa (3-space indentation etc).

I've got other things going on this week so I'll try to look at the new code in more detail next week.

Thanks for your work!

-Brian


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Mesa3d-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to