[Mesa-dev] [PATCH] mesa: remove validation of shaders that should be done elsewhere
Timothy Arceri
timothy.arceri at collabora.com
Tue Dec 15 12:53:41 PST 2015
On Tue, 2015-12-15 at 14:32 +0200, Tapani Pälli wrote:
> On 12/15/2015 01:25 AM, Timothy Arceri wrote:
> > On Wed, 2015-12-09 at 00:17 +1100, Timothy Arceri wrote:
> > > In core profile even if re-linking fails rendering shouldn't fail
> > > as
> > > the
> > > previous succesfully linked program will still be available. It
> > > also
> > > shouldn't be possible to have an unlinked program as part of the
> > > current rendering state.
> > Hey guys,
> >
> > Any thoughts on this change?
> >
> > Thinking about this some more we should probably rework the compat
> > code
> > also and only do the check for link status if there is an assembly
> > shader right?
>
> I wanted to hear from others first since for me it feels this change
> seems specific to separate shader programs (I had a patch on list
> that
> skipped the check for those programs that were not in use by current
> pipeline).
> The reason is that with regular programs I can't see a way to
> continue
> if relinking fails (because program is now in bad state). I think
> user
> should detach the malfunctioning stage and link again. However with
> SSO
> relink to a unused stage may fail but we can still have a complete
> working program with stages marked as used.
Hi Tapani,
I don't see anything that says this is specific to separate shader programs. For full programs you still need to call UseProgram to install the executable code as part of the rendering state just like with SSO.
>From Section 7.3 (Program Objects) of the OpenGL 4.5 spec under UseProgram:
"This will install executable code as part of the current rendering state for each shader stage present when the program was last successfully linked."
...
"If LinkProgram or ProgramBinary successfully re-links a program object that is active for any shader stage, then the newly generated executable code will be installed as part of the current rendering state for all shader stages where the program is active."
...
"If a program object that is active for any shader stage is re-linked unsuccess-fully, the link status will be set to FALSE, but any existing executables and associ-ated state will remain part of the current rendering state until a subsequent call to UseProgram, UseProgramStages, or BindProgramPipeline removes them from use."
...
"An unsuc-cessfully linked program may not be made part of the current rendering state by UseProgram or added to program pipeline objects by UseProgramStages until it is successfully re-linked."
As far as I can tell it should not be possible to have an unsuccessfully linked program as part of the current rendering state, which is why this patch removes the LinkStatus check completely.
I can add all of this to the commit message.
Tim
>
>
> > Thanks,
> > Tim
>
> // Tapani
>
More information about the mesa-dev
mailing list