diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-12-18 00:04:22 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-12-18 00:04:22 +0300 |
commit | 25a434fd250a740ef23263af11d0a53a2539007b (patch) | |
tree | 3c644b792f82bbf50832f5084853ab9c54b25376 /source/blender/render/intern/include | |
parent | 5dfef1ae3580aeef8601fca4883bf186be82f29d (diff) |
Threaded Shadowbuffers Creation
===============================
- One shadowbuffer per thread.
- Added more break tests in shadow buffer code.
- Removed R.clipcrop global, solution is not nice yet, but at
least threadsafe.
- Fixed bug in strand render shadow buffer code.
Diffstat (limited to 'source/blender/render/intern/include')
-rw-r--r-- | source/blender/render/intern/include/render_types.h | 4 | ||||
-rw-r--r-- | source/blender/render/intern/include/shadbuf.h | 2 | ||||
-rw-r--r-- | source/blender/render/intern/include/zbuf.h | 4 |
3 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/render/intern/include/render_types.h b/source/blender/render/intern/include/render_types.h index 84230bd4f6d..4a731878ffb 100644 --- a/source/blender/render/intern/include/render_types.h +++ b/source/blender/render/intern/include/render_types.h @@ -446,6 +446,10 @@ typedef struct LampRen { ObjectInstanceRen *obi_last[BLENDER_MAX_THREADS]; struct MTex *mtex[MAX_MTEX]; + + /* threading */ + int thread_assigned; + int thread_ready; } LampRen; /* **************** defines ********************* */ diff --git a/source/blender/render/intern/include/shadbuf.h b/source/blender/render/intern/include/shadbuf.h index b4f196a89fa..20a266f8579 100644 --- a/source/blender/render/intern/include/shadbuf.h +++ b/source/blender/render/intern/include/shadbuf.h @@ -46,6 +46,8 @@ struct ObjectRen; void makeshadowbuf(struct Render *re, LampRen *lar); void freeshadowbuf(struct LampRen *lar); +void threaded_makeshadowbufs(struct Render *re); + /** * Determines the shadow factor for a face and lamp. There is some * communication with global variables here. diff --git a/source/blender/render/intern/include/zbuf.h b/source/blender/render/intern/include/zbuf.h index 5f1aa5679bf..4d30c1e0dfb 100644 --- a/source/blender/render/intern/include/zbuf.h +++ b/source/blender/render/intern/include/zbuf.h @@ -91,6 +91,8 @@ typedef struct ZSpan { float shad_alpha; /* copy from material, used by irregular shadbuf */ int mask, apsmcounter; /* in use by apixbuf */ + float clipcrop; /* for shadow, was in R global before */ + void *sss_handle; /* used by sss */ void (*sss_func)(void *, int, int, int, int, int); @@ -108,7 +110,7 @@ void zspan_scanconvert(struct ZSpan *zpan, void *handle, float *v1, float *v2, f /* exported to edge render... */ void zbufclip(struct ZSpan *zspan, int obi, int zvlnr, float *f1, float *f2, float *f3, int c1, int c2, int c3); -void zbuf_alloc_span(struct ZSpan *zspan, int rectx, int recty); +void zbuf_alloc_span(struct ZSpan *zspan, int rectx, int recty, float clipcrop); void zbufclipwire(struct ZSpan *zspan, int obi, int zvlnr, int ec, float *ho1, float *ho2, float *ho3, float *ho4, int c1, int c2, int c3, int c4); /* exported to shadeinput.c */ |