PDA

View Full Version : GLSlang and resource virtualization



flamz
02-23-2004, 07:36 AM
Can anyone tell me if GLSlang is using virtualization to enable, among other things, programs of arbitrary length? I remember hearing this, but I can find any information to confirm it.

Zeross
02-23-2004, 01:47 PM
GLSlang doesn't have any limits on the number of instructions in a vertex or a fragment shader so in a way we can speak of virtualization of ressources. But if by this term you're implying automatic multipass when your program exceeds hardware limits then it's not the case.

V-man
02-23-2004, 02:44 PM
Other technologies like F-buffer are suppose to virtualize the resources and do auto-multipass.

I think GLSL doesn't have the requirement to virtualize anything.

This will be the next new addition to the 3D scene but who knows when it will happen.

simongreen
02-23-2004, 09:40 PM
The language is spec'd to allow resource virtualization, but as far I'm aware nobody has actually shipped an implementation that supports this. It's harder than it sounds.

-S.

flamz
02-24-2004, 07:31 AM
When you say that no current driver supports this, will a program with too many instruction simply not run at all or will run but extremely slowly?

Korval
02-24-2004, 10:28 AM
A glslang compiler/linker is allowed to fail due to too many instructions. So, you will get a compiler/linker error.

V-man
02-24-2004, 07:18 PM
Oh sorry, I meant to say it will be the next BIG addition, because I wanted to emphasize that it will be a significant advancement.

And this is one of the reasons I made my post about Ashli (much further down) because it converts GLSL to ARBvp+fp (and vp?, ps2.0)
and does multipass.

mrbill
02-25-2004, 11:24 AM
Originally posted by simongreen:
The language is spec'd to allow resource virtualization, but as far I'm aware nobody has actually shipped an implementation that supports this. It's harder than it sounds.

-S.

Simon -

ATI's implementation supports resource virtualization.

BTW, there is only limitted resource virtualization with the OpenGL Shading Language and related extensions.

The resources virtualized are number of temporaries and number of instructions.


The resources *not* virtualized are number of vertex texture units, number of fragment texture units, number of total texture units, number of active vertex attributes, number of active interpolators,
size of active uniform storage. All of these resources have hard physical limits.

-mr. bill

mrbill
02-25-2004, 12:28 PM
Originally posted by Korval:
A glslang compiler/linker is allowed to fail due to too many instructions. So, you will get a compiler/linker error.

Early implementations failed to compile, but early implementations were not conformant. Our implementation issues a warning in the link infolog of shaders that exceed HW physical resources.

And just to set expectations correctly, *currently* our implementation shades significantly slower if a shader exceeds HW physical resources.

-mr. bill