blob: e1a8bdafb6a84bda634f5c54cec152197a93ede4 [file] [log] [blame]
John Bauman66b8ab22014-05-06 15:57:45 -04001// SwiftShader Software Renderer
2//
3// Copyright(c) 2005-2012 TransGaming Inc.
4//
5// All rights reserved. No part of this software may be copied, distributed, transmitted,
6// transcribed, stored in a retrieval system, translated into any human or computer
7// language by any means, or disclosed to third parties without the explicit written
8// agreement of TransGaming Inc. Without such an agreement, no rights or licenses, express
9// or implied, including but not limited to any patent rights, are granted to you.
10//
11
12#include "TranslatorASM.h"
13
14#include "InitializeParseContext.h"
15
Nicolas Capens08ca3c62015-02-13 16:06:45 -050016TranslatorASM::TranslatorASM(glsl::Shader *shaderObject, GLenum shaderType) : TCompiler(shaderType), shaderObject(shaderObject)
John Bauman66b8ab22014-05-06 15:57:45 -040017{
18}
19
Nicolas Capens014b9a62014-10-15 10:28:29 -040020bool TranslatorASM::translate(TIntermNode* root)
John Bauman66b8ab22014-05-06 15:57:45 -040021{
22 TParseContext& parseContext = *GetGlobalParseContext();
Nicolas Capens5597eef2015-01-22 09:33:04 -050023 glsl::OutputASM outputASM(parseContext, shaderObject);
John Bauman66b8ab22014-05-06 15:57:45 -040024
25 outputASM.output();
Nicolas Capens014b9a62014-10-15 10:28:29 -040026
27 return parseContext.numErrors() == 0;
John Bauman66b8ab22014-05-06 15:57:45 -040028}