Commit Graph

8 Commits

Author SHA1 Message Date
Sergey Sharybin
5908340f79 OpenSubdiv: Attempt to solve crash on certain GPUs/drivers 2015-08-27 11:05:23 +02:00
Sergey Sharybin
bcc0d2fb1d OpenSubdiv: Fix/workaround bad shading on AMD devices
Uniform block data layout was different on CPU and GPU which caused wrong
data being used from shader.

In theory using layout(std140) is what we need to do, but for some reason
such layout specifier is being ignored. This is probably caused by the way
how we exploit extensions from older version of glsl.

For until we've upgraded our glsl pipeline used different approach which
is basically about removing unused fields form the struct manual in hope
that it'll keep memory layout consistent for both CPU and GPU.

This seems to work so far for both NVidia GTX580 and AMD FirePro W8000
here in the studio.
2015-08-26 12:07:38 +02:00
Antony Riakiotakis
10edaff5c1 Fix ATI part of T45708, crash when enabling opensubdiv.
In fact exit was getting called because we
had an error in shader compilation:

Uniform buffer objects are in fact required.

Since it looks like original intent was to
write the shader against older GLSL version,
I will be adding an extension here instead
of a version.

Thanks to Anshu Arya for letting me borrow his machine through
VPN to do the debugging :)
2015-08-20 16:23:33 +03:00
Sergey Sharybin
868d3605ee Fix T45693: Fix for using 4-component vector as 3 component in osd shader 2015-08-05 21:35:38 +02:00
Sergey Sharybin
b50916d172 OpenSubdiv: forgot this in the previous commit
Need to find better approach for dealing with shadeless materials.
2015-08-04 11:04:27 +02:00
Sergey Sharybin
abb976ae88 OpenSubdiv: Optimize drawing shader
The idea is to cut as much code as possible and use compile-time
ifdefs rather than runtime if() statements.

Gives about 2x speedup on catmark_car model from OpenSubdiv repository
making our FPS much closer to what glViewer is capable of.
2015-08-04 10:52:50 +02:00
Sergey Sharybin
0951ea2c6d OpenSubdiv: Support shadeless shading 2015-08-03 20:18:33 +02:00
Sergey Sharybin
a040157e5d OpenSubdiv: Add new OpenSubdiv related files
This includes C-API bindings in intern/opensubdiv and CMAke module
which finds the OpenSubdiv library. This filea are not in use so
far, making it a separate commit to make actual integration commit
more clear.
2015-07-20 22:29:25 +02:00