Update boo

This commit is contained in:
Jack Andersen 2015-11-27 18:08:28 -10:00
parent 89077c3233
commit 8bf39efcd8
4 changed files with 4 additions and 5 deletions

2
hecl/extern/libBoo vendored

@ -1 +1 @@
Subproject commit 0b6f3cac3467ddd125d03d335001d29c2e28cb7c Subproject commit c0b93f39d833d3d0e8a9eb5188b96d1f04b307e7

View File

@ -153,7 +153,7 @@ class IShaderBackendFactory
{ {
friend class ShaderCacheManager; friend class ShaderCacheManager;
protected: protected:
boo::ITextureR* m_rtHint = nullptr; unsigned m_rtHint = 1;
using FReturnExtensionShader = std::function<void(boo::IShaderPipeline*)>; using FReturnExtensionShader = std::function<void(boo::IShaderPipeline*)>;
virtual ShaderCachedData buildShaderFromIR(const ShaderTag& tag, virtual ShaderCachedData buildShaderFromIR(const ShaderTag& tag,
const HECL::Frontend::IR& ir, const HECL::Frontend::IR& ir,
@ -212,7 +212,7 @@ public:
/* Some platforms (like Metal) require information about the render target /* Some platforms (like Metal) require information about the render target
* for encoding the pipeline state. This must be called before building shaders */ * for encoding the pipeline state. This must be called before building shaders */
void setRenderTargetHint(boo::ITextureR* tex) {m_factory->m_rtHint = tex;} void setRenderTargetSamples(unsigned samps) {m_factory->m_rtHint = samps;}
boo::IShaderPipeline* buildShader(const ShaderTag& tag, const std::string& source, boo::IShaderPipeline* buildShader(const ShaderTag& tag, const std::string& source,
const std::string& diagName); const std::string& diagName);

View File

@ -118,7 +118,7 @@ std::string Metal::makeVert(unsigned col, unsigned uv, unsigned w,
GenerateVertInStruct(col, uv, w) + "\n" + GenerateVertInStruct(col, uv, w) + "\n" +
GenerateVertToFragStruct() + "\n" + GenerateVertToFragStruct() + "\n" +
GenerateVertUniformStruct(s, tm) + GenerateVertUniformStruct(s, tm) +
"\nvertex VertToFrag vmain(VertData v [[ stage_in ]], constant HECLVertUniform& vu [[ buffer(1) ]])\n{\n" "\nvertex VertToFrag vmain(VertData v [[ stage_in ]], constant HECLVertUniform& vu [[ buffer(2) ]])\n{\n"
" VertToFrag vtf;\n"; " VertToFrag vtf;\n";
if (s) if (s)

View File

@ -80,7 +80,6 @@ struct HECLApplicationCallback : boo::IApplicationCallback
/* HECL managers */ /* HECL managers */
HECL::Runtime::FileStoreManager fileMgr(app->getUniqueName()); HECL::Runtime::FileStoreManager fileMgr(app->getUniqueName());
HECL::Runtime::ShaderCacheManager shaderMgr(fileMgr, gfxF); HECL::Runtime::ShaderCacheManager shaderMgr(fileMgr, gfxF);
shaderMgr.setRenderTargetHint(renderTex);
/* Compile HECL shader */ /* Compile HECL shader */
static std::string testShader = "HECLOpaque(Texture(0, UV(0)))"; static std::string testShader = "HECLOpaque(Texture(0, UV(0)))";