diff options
-rw-r--r-- | Backend/GL/Backend.hs | 5 | ||||
-rw-r--r-- | SampleIR.hs | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/Backend/GL/Backend.hs b/Backend/GL/Backend.hs index 9adff30..decf93c 100644 --- a/Backend/GL/Backend.hs +++ b/Backend/GL/Backend.hs | |||
@@ -225,7 +225,10 @@ compileProgram uniTrie p = do | |||
225 | (attributes,attributesType) <- queryStreams po | 225 | (attributes,attributesType) <- queryStreams po |
226 | print uniforms | 226 | print uniforms |
227 | print attributes | 227 | print attributes |
228 | when (uniformsType /= (toTrie $ programUniforms p) `unionL` (toTrie $ programInTextures p)) $ fail "shader program uniform input mismatch!" | 228 | when (uniformsType /= (toTrie $ programUniforms p) `unionL` (toTrie $ programInTextures p)) $ do |
229 | putStrLn $ "expected: " ++ show ((toTrie $ programUniforms p) `unionL` (toTrie $ programInTextures p)) | ||
230 | putStrLn $ "actual: " ++ show uniformsType | ||
231 | fail "shader program uniform input mismatch!" | ||
229 | when (attributesType /= fmap snd (toTrie $ programStreams p)) $ fail $ "shader program stream input mismatch! " ++ show (attributesType,fmap snd (toTrie $ programStreams p)) | 232 | when (attributesType /= fmap snd (toTrie $ programStreams p)) $ fail $ "shader program stream input mismatch! " ++ show (attributesType,fmap snd (toTrie $ programStreams p)) |
230 | -- the public (user) pipeline and program input is encoded by the slots, therefore the programs does not distinct the render and slot textures input | 233 | -- the public (user) pipeline and program input is encoded by the slots, therefore the programs does not distinct the render and slot textures input |
231 | let inUniNames = toTrie $ programUniforms p | 234 | let inUniNames = toTrie $ programUniforms p |
diff --git a/SampleIR.hs b/SampleIR.hs index 6f81f3d..1332b6d 100644 --- a/SampleIR.hs +++ b/SampleIR.hs | |||
@@ -139,10 +139,10 @@ main = do | |||
139 | let sn = ExpN srcName | 139 | let sn = ExpN srcName |
140 | pplRes <- compileMain (ioFetch ["."]) OpenGL33 undefined sn | 140 | pplRes <- compileMain (ioFetch ["."]) OpenGL33 undefined sn |
141 | case pplRes of | 141 | case pplRes of |
142 | (Left err,a) -> putStrLn ("error: " ++ show err ++ show a) >> return Nothing | 142 | (Left err,a) -> putStrLn ("error: " ++ show err) >> return Nothing |
143 | (Right (ppl,a),b) -> do | 143 | (Right (ppl,a),b) -> do |
144 | putStrLn $ ppShow ppl | 144 | putStrLn $ ppShow ppl |
145 | print [a,b] | 145 | --print [a,b] |
146 | renderer <- allocPipeline ppl | 146 | renderer <- allocPipeline ppl |
147 | setPipelineInput renderer (Just pplInput) | 147 | setPipelineInput renderer (Just pplInput) |
148 | sortSlotObjects pplInput | 148 | sortSlotObjects pplInput |