Commit Graph

293 Commits

Author SHA1 Message Date
Matteo Bruni f2b5f71218 d3dcompiler: Parse unary and prefix operators. 2012-07-20 21:30:06 +02:00
Matteo Bruni e851bf211e d3dcompiler: Parse some postfix operators. 2012-07-20 21:30:05 +02:00
Matteo Bruni 6c92d78c8c d3dcompiler: Parse relational operators, stub out more rules. 2012-07-18 17:15:24 +02:00
Matteo Bruni 57a7479f77 d3dcompiler: Parse multiplicative expressions. 2012-07-18 17:15:24 +02:00
Matteo Bruni 7293c1c0fe d3dcompiler: Don't allow semantics on local variables. 2012-07-18 17:15:23 +02:00
Matteo Bruni 110045816c d3dcompiler: Don't allow const variables without initializers. 2012-07-18 17:15:23 +02:00
Matteo Bruni c9a42ca5fc d3dcompiler: Check for invalid matrix majority modifiers. 2012-07-18 17:15:23 +02:00
Matteo Bruni 27880abb97 d3dcompiler: Implement basic expressions parsing. 2012-07-17 11:55:20 +02:00
Matteo Bruni 604a91eb57 d3dcompiler: Don't allow semantics on void functions. 2012-07-17 11:55:20 +02:00
Matteo Bruni 1252930bc0 d3dcompiler: Variables and functions can't have the same name. 2012-07-17 11:55:19 +02:00
Matteo Bruni 7ebab8c4f7 d3dcompiler: Pass the complete location to add_func_parameter(). 2012-07-17 11:55:19 +02:00
Matteo Bruni be350b0bb3 d3dcompiler: Store location information in constants, variable dereferences and constructors. 2012-07-17 11:55:18 +02:00
Matteo Bruni 2b2b850106 d3dcompiler: Use location information in add_modifier(). 2012-07-12 11:47:56 -05:00
Matteo Bruni a84784e057 d3dcompiler: Store (and begin to use) location information for variables. 2012-07-12 11:47:52 -05:00
Matteo Bruni 5bcf8de8cf d3dcompiler: Introduce source_location structure. 2012-07-12 11:47:47 -05:00
Matteo Bruni 40cbcabc0b d3dcompiler: Track the location of each lexer token. 2012-07-12 11:47:41 -05:00
Matteo Bruni 632703d8cf d3dcompiler: Add hlsl_report_message function to standardize error messages. 2012-07-12 11:47:33 -05:00
Matteo Bruni 4a01368809 d3dcompiler: Improve debug_hlsl_type function. 2012-07-11 11:18:04 -05:00
Matteo Bruni 995fb30d58 d3dcompiler: Add a trace to the scope push/pop functions. 2012-07-11 11:17:57 -05:00
Matteo Bruni 3d052768ab d3dcompiler: Pass the shader filename to the preprocessor. 2012-07-11 11:17:49 -05:00
Matteo Bruni 6fbed51ef1 d3dcompiler: Make declaration_statement return a list. 2012-07-11 11:17:41 -05:00
Matteo Bruni b33e1ceaf2 d3dcompiler: Properly print compilation messages. 2012-07-11 11:17:35 -05:00
Matteo Bruni 110249d664 d3dcompiler: Initialize and fix compilation messages generation. 2012-07-10 11:01:03 -05:00
Matteo Bruni 45e8a644eb d3dcompiler: Parse compilation target. 2012-07-10 11:00:58 -05:00
Matteo Bruni 29ba39face d3dcompiler: Carry around both shader major and minor version. 2012-07-10 11:00:53 -05:00
Matteo Bruni b8cdf2ee18 d3dcompiler: Type names have to be allocated on the heap. 2012-07-10 11:00:48 -05:00
Matteo Bruni 0d34c9dab7 d3dcompiler: Fix line info update. 2012-07-10 11:00:43 -05:00
Marcus Meissner 1f1686fddd d3dcompiler_43: Fixed small overread possibility (Coverity). 2012-07-09 10:07:10 -04:00
Francois Gouget 768c38034c d3dcompiler_43: Make debug_dump_ir_constructor() static. 2012-06-13 21:35:41 +02:00
Matteo Bruni f5ffa3004d d3dcompiler: Add some tests for 'system' type includes. 2012-06-13 21:35:40 +02:00
Matteo Bruni 80034de243 wpp: Explicitly pass include type to the lookup callback function.
Also, always pass the parent name to the callback, d3dcompiler needs
that information.
2012-06-13 21:35:39 +02:00
Matteo Bruni 8b0d3d9f9a wpp: Invert 'type' callback parameter value, to match comment. 2012-06-13 21:35:38 +02:00
Matteo Bruni eeb550c0c3 d3dcompiler: Parse constructors. 2012-06-12 10:20:35 +02:00
Matteo Bruni d2673848ea d3dcompiler: Parse function definitions. 2012-06-12 10:20:32 +02:00
Matteo Bruni 552f10d0e8 d3dcompiler: Parse function declarations. 2012-06-12 10:20:30 +02:00
Matteo Bruni 5e34375238 d3dcompiler: Parse sampler declarations. 2012-06-12 10:20:27 +02:00
Matteo Bruni de11f800fd d3dcompiler: Parse vector and matrix declarations. 2012-06-12 10:20:24 +02:00
Francois Gouget b0a339707f d3dcompiler_43: Make debug_{base,node}_type() static. 2012-06-08 19:35:17 +02:00
Matteo Bruni 96470dfcb4 d3dcompiler: Parse variable references in expressions. 2012-06-07 10:32:46 +02:00
Matteo Bruni 887ef49419 d3dcompiler: Parse variable initializers, basic expressions. 2012-06-07 10:32:41 +02:00
Matteo Bruni 3275cca970 d3dcompiler: Parse modifiers. 2012-06-07 10:32:36 +02:00
Matteo Bruni 9d9dae0cdb d3dcompiler: Distinguish between scalars, vectors and matrices. 2012-06-07 10:32:31 +02:00
Matteo Bruni a8839cd1de d3dcompiler: Dump preprocessed shader sources. 2012-06-07 10:32:23 +02:00
Matteo Bruni 2aa6c460f7 d3dcompiler: Parse variable declarations. 2012-06-05 10:20:20 +02:00
Matteo Bruni 2ad2c5fa01 d3dcompiler: Add identifiers parsing. 2012-06-05 10:20:17 +02:00
Matteo Bruni 5e82c397f4 d3dcompiler: Flesh out the lexer more. 2012-06-05 10:20:11 +02:00
Matteo Bruni 233101b0ca d3dcompiler: Use a separate bytecodewriter debug channel. 2012-06-05 10:20:07 +02:00
Francois Gouget 1f6d078e1b Assorted spelling fixes. 2012-06-04 12:17:54 +02:00
Matteo Bruni d2ddd20054 d3dcompiler: Add a stub lexer. 2012-05-16 18:30:07 +02:00
Matteo Bruni 949de2e520 d3dcompiler: Add a stub parser. 2012-05-16 16:46:06 +02:00
Matteo Bruni 47a7f7f13d d3dcompiler: Trace compilation messages. 2012-05-16 16:45:10 +02:00
Matteo Bruni 14ec785fc3 d3dcompiler: Partially implement D3DCompile function. 2012-05-16 16:44:47 +02:00
Matteo Bruni ddab7fcda9 d3dcompiler: Make SlWriteBytecode return the shader size. 2012-05-16 16:44:35 +02:00
Matteo Bruni 491d0e9d6b d3dcompiler: Rename asm_alloc/realloc/free functions to more generic names. 2012-05-08 20:21:18 +02:00
Matteo Bruni e2866d6fa1 d3dcompiler: Generalize message reporting function. 2012-05-08 20:21:13 +02:00
Matteo Bruni 555f634912 d3dcompiler: Make set_parse_status() more general. 2012-05-08 20:21:09 +02:00
Matteo Bruni 167612aea9 d3dcompiler: Remove shader_type typedef. 2012-05-08 20:21:04 +02:00
Józef Kucia 6a706d587a d3dcompiler: Allow the alternative shader version format (with dots instead of underscores). 2012-04-09 11:48:21 +02:00
Józef Kucia d2b164f0b4 d3dcompiler: Fix parsing the tex instruction in ps_1_0 shaders. 2012-04-09 11:48:01 +02:00
Józef Kucia 8e3b050f44 d3dcompiler/tests: Add test for comments containing quotation marks. 2012-03-12 10:12:56 +01:00
Andrew Talbot 5c7ba2c330 d3dcompiler_43: Mark fall-throughs in switch statement. 2011-09-26 18:14:24 +02:00
André Hentschel 550e2a9f6a d3dcompiler_43/tests: Fix printing a NULL string. 2011-08-30 11:53:09 +02:00
Frédéric Delanoy f932abf326 dlls: Assorted spelling fixes. 2011-08-01 18:26:27 +02:00
Dan Kegel b732d428de d3dcompiler_43: Don't crash on long TRACE(). 2011-07-05 14:40:19 +02:00
Matteo Bruni bfda69d0e9 d3dcompiler: Fix error messages generation. 2011-05-05 17:25:39 +02:00
Matteo Bruni 1d160beda0 d3dcompiler: Improve some parameter names and fix code style. 2011-05-05 17:24:53 +02:00
Alexandre Julliard cd2beae51b d3dcompiler: Specify arguments for stub entry points that are used in forwards. 2011-05-03 19:34:25 +02:00
Francois Gouget 4d29b9716e d3dcompiler_43: Make write_dword_unknown() static. 2011-05-03 14:38:06 +02:00
Rico Schüller c49f09d6f8 d3dcompiler: Fix HeapAlloc/HeapFree for type members in the reflection parser. 2011-04-13 14:13:53 +02:00
Rico Schüller 96aa08ecfd d3dcompiler: Make some variables static. 2011-04-04 13:43:33 +02:00
Rico Schüller 5c999d650f d3dcompiler: Move blob and strip functions to blob.c. 2011-04-04 13:43:29 +02:00
Rico Schüller c4530c56d1 d3dcompiler: Remove type cast in D3DCreateBlob(). 2011-04-04 13:43:23 +02:00
Rico Schüller 4d54360765 d3dcompiler: Move D3DCreateBlob() to blob.c. 2011-04-04 13:43:01 +02:00
Marcus Meissner 1548c2b985 d3dcompiler_43: Initialize a variable (Coverity). 2011-03-15 17:14:07 +01:00
Francois Gouget fdf97125cb d3dcompiler_43: Add a '\n' to a couple of FIXME() traces. 2011-03-07 11:08:38 +01:00
Rico Schüller 7832577ad7 d3dcompiler: Add debug helper for shader variable type. 2011-03-04 16:25:58 +01:00
Rico Schüller 525dee0778 d3dcompiler: Add debug helper for shader variable class. 2011-03-04 16:25:58 +01:00
Rico Schüller 5861deaefc d3dcompiler: Move some code from header to source file. 2011-03-02 12:50:58 +01:00
Rico Schüller 4080242d7f d3dcompiler: Implement ID3D11ShaderReflectionType::IsEqual(). 2011-03-02 12:50:58 +01:00
Rico Schüller 66b286470e d3dcompiler/tests: Add GetMemberType* tests. 2011-03-02 12:50:45 +01:00
Rico Schüller f7571743c9 d3dcompiler: Use defines for shader target masks. 2011-03-01 13:21:58 +01:00
Rico Schüller f9696983cf d3dcompiler: Implement ID3D11ShaderReflectionType::GetMemberTypeName(). 2011-03-01 13:21:58 +01:00
Rico Schüller 54b5364988 d3dcompiler: Implement ID3D11ShaderReflectionType::GetMemberTypeByName(). 2011-03-01 13:21:58 +01:00
Rico Schüller 3ca651cce1 d3dcompiler: Implement ID3D11ShaderReflectionType::GetMemberTypeByIndex(). 2011-03-01 13:21:58 +01:00
Rico Schüller a300481187 d3dcompiler: Parse member types. 2011-03-01 13:21:58 +01:00
Rico Schüller f9d4a45fbb d3dcompiler/tests: Improve test_reflection_bound_resources(). 2011-02-28 11:10:36 +01:00
Rico Schüller a0abef6b45 d3dcompiler/tests: Add constant buffer test. 2011-02-28 11:10:31 +01:00
Rico Schüller 3c1ffbf2e7 d3dcompiler: Reorder section parsing to reflect the order from the shader blob. 2011-02-28 11:10:25 +01:00
Rico Schüller 3850e8f4e3 d3dcompiler/tests: Add reflection ps output desc test. 2011-02-28 11:10:21 +01:00
Rico Schüller 3f04448dbb d3dcompiler: Fix SystemValueType for pixelshader output signature. 2011-02-28 11:10:12 +01:00
Amine Khaldi b6990fa77a d3dcompiler_43: Avoid an unintended fall-through. 2011-02-23 19:24:05 +01:00
Rico Schüller 12d4683f05 d3dcompiler: Implement ID3D11ShaderReflectionVariable::GetType(). 2011-02-23 18:21:36 +01:00
Rico Schüller c647243ed9 d3dcompiler: Implement ID3D11ShaderReflectionType::GetDesc(). 2011-02-23 18:21:34 +01:00
Rico Schüller 3c75a985e3 d3dcompiler: Implement ID3D11ShaderRefleflection::GetVariableByName(). 2011-02-23 18:21:32 +01:00
Rico Schüller e8c6ea220d d3dcompiler: Implement ID3D11ShaderReflectionVariable::GetBuffer(). 2011-02-22 12:28:59 +01:00
Rico Schüller 49651c105e d3dcompiler: Implement ID3D11ShaderReflectionVariable::GetDesc(). 2011-02-22 12:28:55 +01:00
Rico Schüller a386f480be d3dcompiler: Implement ID3D11ShaderReflectionConstantBuffer::GetVariableByName(). 2011-02-22 12:28:51 +01:00
Rico Schüller 73f9d9f516 d3dcompiler: Implement ID3D11ShaderReflectionConstantBuffer::GetVariableByIndex(). 2011-02-22 12:28:46 +01:00
Rico Schüller debfb06148 d3dcompiler: Parse reflection types. 2011-02-22 12:28:37 +01:00
Rico Schüller 0e8d142ea6 d3dcompiler: Parse reflection variables. 2011-02-21 12:58:58 +01:00
Rico Schüller c6ec32aec7 d3dcompiler: Implement ID3D11ShaderReflectionConstantBuffer::GetDesc(). 2011-02-21 12:58:57 +01:00
Rico Schüller dd934099e1 d3dcompiler: Implement ID3D11ShaderReflection::GetConstantBufferByName(). 2011-02-21 12:58:55 +01:00
Rico Schüller a7483f4bcc d3dcompiler: Implement ID3D11ShaderReflection::GetConstantBufferByIndex(). 2011-02-21 12:58:53 +01:00
Rico Schüller 3f6c54f263 d3dcompiler: Parse reflection constant buffers. 2011-02-21 12:58:50 +01:00
Matteo Bruni 005910957b d3dcompiler: Fix initial allocation (Valgrind). 2011-02-21 12:44:19 +01:00
Rico Schüller 9cc0cd39a1 d3dcompiler/tests: Add GetResourceBindingDesc() test. 2011-02-18 14:54:51 +01:00
Rico Schüller d4798d0580 d3dcompiler/tests: Add reflection ps desc test. 2011-02-17 17:26:18 +01:00
Rico Schüller c7ed17ac66 d3dcompiler/tests: Add reflection vs desc test. 2011-02-17 17:26:12 +01:00
Rico Schüller d790be79d7 d3dcompiler/tests: Add reflection test. 2011-02-16 14:26:26 +01:00
Rico Schüller 14d8b51bac d3dcompiler: Add argument check in D3DReflect(). 2011-02-16 14:26:14 +01:00
Rico Schüller cacff4b3a0 d3dcompiler: Implement ID3DShaderReflection::GetResourceBindingDescByName(). 2011-02-14 12:26:08 +01:00
Rico Schüller 162233eb63 d3dcompiler: Implement ID3DShaderReflection::GetResourceBindingDesc(). 2011-02-14 12:26:04 +01:00
Rico Schüller 5ad824a178 d3dcompiler: Parse bound resources. 2011-02-14 12:26:00 +01:00
Rico Schüller 19fea20963 d3dcompiler: Parse OSG5 in the reflection interface. 2011-02-08 09:04:27 -06:00
Matteo Bruni dbc8c9c299 d3dcompiler: Include the string terminator in the output blob. 2011-02-07 13:03:39 -06:00
Michael Stefaniuc 629e853894 d3dcompiler_43/tests: COM cleanup for the ID3DInclude iface. 2011-01-26 15:00:13 +01:00
Travis Athougies ee8b276731 d3dcompiler_43/tests: Added error tests to HLSL test suite. 2011-01-10 10:39:51 +01:00
Travis Athougies 3add55840d d3dcompiler_43/tests: Fixed nonconformant C string literals in HLSL test suite. 2011-01-10 10:39:44 +01:00
Rico Schüller ba9d311f0d d3dcompiler: Implement ID3D11ReflectionInterface::GetDesc(). 2010-12-28 16:35:40 +01:00
Rico Schüller 127d07a3cc d3dcompiler: Add initial SHDR and SHEX parsing. 2010-12-28 16:35:40 +01:00
Rico Schüller a2a7000eeb d3dcompiler: Add initial RDEF parsing. 2010-12-28 16:35:40 +01:00
Rico Schüller 97988d63d8 d3dcompiler: Implement ID3D11ShaderReflection::GetPatchConstantParameterDesc(). 2010-12-22 13:00:13 +01:00
Rico Schüller bf1065ea6d d3dcompiler: Implement ID3D11ShaderReflection::GetOutputParameterDesc(). 2010-12-22 13:00:13 +01:00
Rico Schüller 767e5705a2 d3dcompiler: Implement ID3D11ShaderReflection::GetInputParameterDesc(). 2010-12-22 13:00:12 +01:00
Rico Schüller bfcd413553 d3dcompiler: Parse PCSG in the reflection interface. 2010-12-22 13:00:12 +01:00
Rico Schüller ae98cb4659 d3dcompiler: Parse OSGN in the reflection interface. 2010-12-22 13:00:12 +01:00
Rico Schüller e8ba248920 d3dcompiler: Properly initialize Stream member of D3D11_SIGNATURE_PARAMETER_DESC. 2010-12-22 13:00:11 +01:00
Rico Schüller f8e4771be4 d3dcompiler: Parse ISGN in the reflection interface. 2010-12-21 15:49:19 +01:00
Rico Schüller 5ad0c856b6 d3dcompiler: Implement ID3D11ShaderReflection::GetConversionInstructionCount(). 2010-12-21 15:49:07 +01:00
Rico Schüller ff038cbcbe d3dcompiler: Implement ID3D11ShaderReflection::GetMovInstructionCount(). 2010-12-21 15:49:04 +01:00
Rico Schüller 984ed6e9ac d3dcompiler: Parse reflection STAT tag. 2010-12-21 15:49:00 +01:00
Rico Schüller 8f08d38520 d3dcompiler: Use an iface instead of a vtbl pointer in d3dcompiler_shader_reflection. 2010-12-21 15:48:40 +01:00
Rico Schüller 806961ec28 d3dcompiler: Use an iface instead of a vtbl pointer in d3dcompiler_blob. 2010-12-21 15:48:33 +01:00
Rico Schüller cc6699f09d d3dcompiler: Handle TAG_OSG5 in D3DGetBlobPart(). 2010-12-13 12:43:31 +01:00
Rico Schüller 5b2286a5bd d3dcompiler: Add initial reflection parsing. 2010-12-09 19:27:11 +01:00
Travis Athougies dbb2d28795 d3dcompiler_43/tests: Added trigonometric function tests to HLSL test suite. 2010-11-18 12:52:38 +01:00
Rico Schüller a7cf4d16fa d3dcompiler: Add stub ID3D11ShaderReflection interface. 2010-11-02 13:49:30 +01:00
Rico Schüller 02264a7628 d3dcompiler: Add D3DReflect() stub. 2010-11-02 13:41:11 +01:00
Henri Verbeet 362da026b0 d3dcompiler_43/tests: Calculate the probe count. 2010-11-01 13:34:44 +01:00
Henri Verbeet 04632c060d d3dcompiler_43/tests: Make some variables unsigned. 2010-11-01 13:34:43 +01:00
Henri Verbeet d3dd18646d d3dcompiler_43/tests: Make probe info const. 2010-11-01 13:34:43 +01:00
Travis Athougies 356420b340 d3dcompiler_43/tests: Added float vector tests to HLSL test suite. 2010-10-29 15:23:34 +02:00
Travis Athougies 79f715c3ec d3dcompiler_43/tests: Added tests for conditional expressions to HLSL test suite. 2010-10-29 15:23:31 +02:00
Travis Athougies 9f7ceec91f d3dcompiler_43/tests: Added order of operations test to HLSL test suite. 2010-10-29 15:23:28 +02:00
Travis Athougies 7c56eb8872 d3dcompiler_43/tests: Added HLSL test suite. 2010-10-28 18:18:11 +02:00
Henri Verbeet 1f437a9349 d3dcompiler: Mark some internal symbols hidden. 2010-10-18 19:08:38 +02:00
Henri Verbeet a141ea4933 d3dcompiler: Merge asmutils.c into utils.c. 2010-10-18 19:08:38 +02:00
Henri Verbeet 72d5b9ddab d3dcompiler: Move some bytecode output functions to bytecodewriter.c. 2010-10-18 19:08:37 +02:00
Henri Verbeet 3db5163fd0 d3dcompiler: Make some variables static. 2010-10-18 19:08:37 +02:00
Henri Verbeet ac8f8c02a6 d3dcompiler: Remove some stray tabs. 2010-10-15 16:20:06 +02:00