mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-25 01:30:30 +01:00
generate a link error if the vertex shader references too many textures
This commit is contained in:
parent
43346fb1fb
commit
6befdca6a3
1 changed files with 6 additions and 0 deletions
|
|
@ -474,6 +474,12 @@ _slang_link(GLcontext *ctx,
|
|||
}
|
||||
}
|
||||
|
||||
/* Check that the vertex program doesn't use too many sampler units */
|
||||
if (shProg->VertexProgram &&
|
||||
_mesa_bitcount(shProg->VertexProgram->Base.SamplersUsed) > ctx->Const.MaxVertexTextureImageUnits) {
|
||||
link_error(shProg, "Vertex program uses too many samplers.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (fragProg && shProg->FragmentProgram) {
|
||||
/* notify driver that a new fragment program has been compiled/linked */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue