mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 21:58:48 +00:00
ogl: fix ubo workaround
This commit is contained in:
parent
1469342f83
commit
c9e13f6b7a
4 changed files with 37 additions and 12 deletions
|
@ -33,9 +33,12 @@ void SetPSConstant4fvByName(const char * name, unsigned int offset, const float
|
|||
{
|
||||
if (tmp.shader.UniformLocations[a] == -1)
|
||||
return;
|
||||
else if (tmp.shader.UniformSize[a] <= offset)
|
||||
return;
|
||||
else
|
||||
{
|
||||
glUniform4fv(tmp.shader.UniformLocations[a] + offset, count, f);
|
||||
unsigned int maxcount= tmp.shader.UniformSize[a]-offset;
|
||||
glUniform4fv(tmp.shader.UniformLocations[a] + offset, std::min(count, maxcount), f);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue