Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(802)

Issue 4236041: Build fixes for Visual Studio (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 7 months ago by brechtvl
Modified:
14 years, 7 months ago
Reviewers:
larrygritz, osl-dev, ckulla
Base URL:
http://openshadinglanguage.googlecode.com/svn/trunk/
Visibility:
Public.

Description

These are source code changes to get OSL compiling on windows with visual studio (2008). There is still a big problem in generating llvm bitcode, and there are also some changes to make in the cmake files, but I have no solutions for those things yet. Overview of the changes: Renamed DLLPUBLIC because it conflicts with the OIIO define. Now there's a different define per OSL library, because they also conflict with each other, oslcomp use files from oslexec and vice versa. Sprinkled these defines in the header files where necessary, and put #include "export.h" in oslconfig.h. Replaced all the platform specific hash stuff symtab.h with OIIO hash, which then compiles on windows too. Compatibility fixes for popen/pclose, snprintf, RGB, access, strtof, and use of 'and' operator. Code tweaks to handle spline template compile error, and double/float overloading problem with fmod. Use "OpenImageIO/fmath.h" instead of <cmath> to fix missing M_1_PI and similar defines. Use ${OPENIMAGEIO_INCLUDES} instead of ${OPENIMAGEIOHOME}/include for LLVM, as was already used for all other files. Avoids having to define the environment variable.

Patch Set 1 #

Patch Set 2 : Removed a define that was only there for testing #

Patch Set 3 : Attempt to fix patch parse error #

Patch Set 4 : Simplify export.h #

Total comments: 2

Patch Set 5 : Different fix for splineimpl.h #

Patch Set 6 : #undef BTYPE macro #

Total comments: 3

Patch Set 7 : Addressed some more comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+88 lines, -91 lines) Patch
src/include/accum.h View 1 2 3 4 3 chunks +3 lines, -3 lines 0 comments Download
src/include/export.h View 1 2 3 4 2 chunks +32 lines, -21 lines 0 comments Download
src/include/oslclosure.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
src/include/oslcomp.h View 1 2 3 4 2 chunks +2 lines, -3 lines 0 comments Download
src/include/oslconfig.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
src/include/oslexec.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
src/include/oslquery.h View 1 2 3 4 2 chunks +1 line, -3 lines 0 comments Download
src/liboslcomp/oslcomp.cpp View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
src/liboslcomp/symtab.h View 1 2 3 4 2 chunks +3 lines, -31 lines 0 comments Download
src/liboslexec/CMakeLists.txt View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/automata.cpp View 1 2 3 4 2 chunks +4 lines, -1 line 0 comments Download
src/liboslexec/background.cpp View 1 2 3 4 5 6 1 chunk +1 line, -3 lines 0 comments Download
src/liboslexec/bsdf.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/bsdf_ashikhmin_velvet.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/bsdf_cloth.cpp View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
src/liboslexec/bsdf_cloth_fncs.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/bsdf_cloth_specular.cpp View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
src/liboslexec/bsdf_diffuse.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/bsdf_fakefur.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/bsdf_hair.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/bsdf_microfacet.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/bsdf_phong.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/bsdf_reflection.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/bsdf_refraction.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/bsdf_transparent.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/bsdf_ward.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/bsdf_westin.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/dictionary.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
src/liboslexec/oslexec_pvt.h View 1 2 3 4 2 chunks +2 lines, -2 lines 0 comments Download
src/liboslexec/shadingsys.cpp View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
src/liboslexec/splineimpl.h View 1 2 3 4 5 6 1 chunk +5 lines, -0 lines 0 comments Download
src/liboslexec/vol_subsurface.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14
brechtvl
14 years, 7 months ago (2011-02-25 02:29:49 UTC) #1
larrygritz
LGTM, pending answers to my two inline comments. I don't even have access to a ...
14 years, 7 months ago (2011-03-01 00:43:12 UTC) #2
larrygritz
On 2011/03/01 00:43:12, larrygritz wrote: > src/liboslexec/vol_subsurface.cpp:29: #include "OpenImageIO/fmath.h" > What is the benefit of ...
14 years, 7 months ago (2011-03-01 00:44:03 UTC) #3
larrygritz
If nobody else objects, I'm happy to commit this as soon as we get a ...
14 years, 7 months ago (2011-03-01 00:44:49 UTC) #4
brechtvl
> Brecht, have you sent us a CLA? You can find it at > http://code.google.com/p/openshadinglanguage/downloads/list ...
14 years, 7 months ago (2011-03-01 01:09:21 UTC) #5
brechtvl
Different fix for splineimpl.h
14 years, 7 months ago (2011-03-01 18:12:28 UTC) #6
brechtvl
CLA sent. It turns out the problem in splineimpl.h is because BTYPE is a macro ...
14 years, 7 months ago (2011-03-01 18:17:40 UTC) #7
ckulla
On 2011/03/01 18:17:40, brechtvl wrote: > CLA sent. > > It turns out the problem ...
14 years, 7 months ago (2011-03-01 18:44:04 UTC) #8
larrygritz
On 2011/03/01 18:44:04, ckulla wrote: > Is it possible to just #undef BTYPE if its ...
14 years, 7 months ago (2011-03-01 18:52:33 UTC) #9
brechtvl
Alright, added patch with #undef BTYPE.
14 years, 7 months ago (2011-03-01 19:31:01 UTC) #10
ckulla
A few more small comments ... http://codereview.appspot.com/4236041/diff/49003/src/liboslexec/bsdf_cloth.cpp File src/liboslexec/bsdf_cloth.cpp (right): http://codereview.appspot.com/4236041/diff/49003/src/liboslexec/bsdf_cloth.cpp#newcode29 src/liboslexec/bsdf_cloth.cpp:29: #include "OpenImageIO/fmath.h" OpenImageIO ...
14 years, 7 months ago (2011-03-01 19:44:22 UTC) #11
brechtvl
The defines are indeed from windows.h. Latest patch changes the #ifdef tests and uses <> ...
14 years, 7 months ago (2011-03-01 19:58:38 UTC) #12
ckulla
On 2011/03/01 19:58:38, brechtvl wrote: > The defines are indeed from windows.h. Latest patch changes ...
14 years, 7 months ago (2011-03-01 20:12:13 UTC) #13
larrygritz
14 years, 7 months ago (2011-03-01 22:39:24 UTC) #14
Committed as r898.

Thanks, and I'll add that a few times people have suggested a couple lines of
bug fixes here or there, this is the first nontrivial commit of code from
somebody not at all associated with Imageworks.  Congrats!
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b