Closed GoogleCodeExporter closed 9 years ago
If it is compiled as an LLVM module, mvpMatrix is the global.
Before execution, it should be set an value.
But it isn't reentrant program. If execution is parallel, defects occurs.
We describe a design to resolve it.
Original comment by wuye9036
on 9 Mar 2011 at 11:10
=Section II: Solution=
In fact, we re-construct the vs_main as following:
void vs_main( InputStruct* in_data, OutputStruct* out_data );
All constant, variable and semantic-related value was stored in InputStruct.
So the input struct is:
struct InputStruct{
float4* pos; // From VSI.pos
float4* tex; // From tex that parameter of vs_main
};
And the output struct is treated as same.
Now, it is an reentrant route.
Original comment by wuye9036
on 9 Mar 2011 at 11:14
Now all things are devided 4 parts:
1. Statistic the semantic, global variable and function entry in semantic
analysis;
2. Exclude the functions that has non-semantic non-uniform parameter;
3. Generate entry functions.
4. Generate functions invoked by entry directly or indirectly. If any parameter
in InputStruct is used, append InputStruct pointer as its argument.
Original comment by wuye9036
on 9 Mar 2011 at 11:18
Revision r464
(Auto-update failed)
Original comment by wuye9036
on 9 Mar 2011 at 12:18
Revision r465
(Auto-update failed)
Original comment by wuye9036
on 9 Mar 2011 at 12:42
This issue was updated by revision r466.
=== SASL ===
Added new auto test case: semantic_fn.
Original comment by wuye9036
on 9 Mar 2011 at 12:46
This issue was updated by revision r467.
=== SASL ===
Add semantic to storage_si.
semantic.ss could be passed parser and semantic analysis.
Original comment by wuye9036
on 10 Mar 2011 at 12:50
This issue was updated by revision r468.
SASL:
Add semantic support to semantic analyser.
Original comment by wuye9036
on 14 Mar 2011 at 4:24
This issue was updated by revision r469.
SASL:
Add semantic support to parameter.
Original comment by wuye9036
on 14 Mar 2011 at 12:03
This issue was updated by revision r470.
SASL:
Add entrant judge to function_type.
Parser and semantic analyzer now supports build-in vector and matrix.
Original comment by wuye9036
on 14 Mar 2011 at 1:14
This issue was updated by revision r471.
SASL:
Change the type of return of semantic_fn entry function.
Original comment by wuye9036
on 15 Mar 2011 at 2:57
Shader input and output are splitted to 3 part:
Stream-input, register-input, register-output.
For e.g.,
SV_Position is an stream input, and SV_Texcoord also is;
SV_Position is also an register-output;
SV_Color is an register-output.
For stream input, we pack the pointers, for register-input/output, we send the
value structure.
Example,
struct StreamInput{
float4* position;
float4* texcoord;
};
struct RegisterInput{
float4x4 wvpMatrix;
};
struct RasterInfo{
float4 position;
float4 texcoord;
};
void compiled_vs( StreamInput* sInput, RegisterInput* rInput, RasterInfo*
output ){
output->position = *(sInput->position) * rInput->wvpMatrix;
output->texcoord = *(sInput->texcoord);
}
Original comment by wuye9036
on 15 Mar 2011 at 10:43
This issue was updated by revision r472.
SASL:
Add storage_info to global_si.
Rename external to global.
Update issue 56
SASL:
Try to add vector and matrix llvm type support.
Original comment by wuye9036
on 15 Mar 2011 at 1:33
This issue was updated by revision r473.
SASL:
Extract method create_buildin_type.
Original comment by wuye9036
on 16 Mar 2011 at 6:18
This issue was updated by revision r474.
SASL:
calculate_storage code completed.
Fixed error of global.
SALVIA:
Add languages enum for multi-languages support in future.
Original comment by wuye9036
on 16 Mar 2011 at 12:20
This issue was updated by revision r475.
SASL:
Rename global_si to module_si.
Add entry function type support.
Rename register_* to buffer_*.
Remove indexed_semantic.
Change semantic_fn.ss
Original comment by wuye9036
on 18 Mar 2011 at 5:56
This issue was updated by revision r476.
SASL:
Reorganize files.
Original comment by wuye9036
on 18 Mar 2011 at 8:23
This issue was updated by revision r477.
SASL:
Separate codegen_context from AST.
Add ABI analyzer.
Original comment by wuye9036
on 21 Mar 2011 at 3:17
This issue was updated by revision r480.
SASL:
Improves ABI analyzer and ABI information.
Remove storage_info from module_si.
Original comment by wuye9036
on 21 Mar 2011 at 10:19
Original comment by wuye9036
on 21 Mar 2011 at 10:32
Original comment by wuye9036
on 21 Mar 2011 at 10:40
Original comment by wuye9036
on 23 Mar 2011 at 12:50
This issue was updated by revision r485.
SASL:
Add auto_entry to abi_analyser.
Renames and changes signature of semantic and code generation functions.
Original comment by wuye9036
on 23 Mar 2011 at 12:56
Original comment by wuye9036
on 23 Mar 2011 at 12:57
Original comment by wuye9036
on 23 Mar 2011 at 1:04
Original comment by wuye9036
on 24 Mar 2011 at 11:49
Original comment by wuye9036
on 25 Mar 2011 at 1:28
Original comment by wuye9036
on 29 Mar 2011 at 9:06
This issue was updated by revision r510.
SASL:
input_storage and output_storage of abi_info now are const-qualified.
Add entry parameter types support.
Original comment by wuye9036
on 6 Apr 2011 at 2:50
This issue was updated by revision d71ea32e3b5d.
=== SASL ===
Added new auto test case: semantic_fn.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision 57c257bb0b5e.
=== SASL ===
Add semantic to storage_si.
semantic.ss could be passed parser and semantic analysis.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision e6d9cd5c9e35.
SASL:
Add semantic support to semantic analyser.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision 6f58d0773743.
SASL:
Add semantic support to parameter.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision a34c14798e14.
SASL:
Add entrant judge to function_type.
Parser and semantic analyzer now supports build-in vector and matrix.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision 654126d4618d.
SASL:
Change the type of return of semantic_fn entry function.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision 0a6e83456f98.
SASL:
Add storage_info to global_si.
Rename external to global.
Update issue 56
SASL:
Try to add vector and matrix llvm type support.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision dfbb75fbf73e.
SASL:
Extract method create_buildin_type.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision 94f386e3019d.
SASL:
calculate_storage code completed.
Fixed error of global.
SALVIA:
Add languages enum for multi-languages support in future.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision 1e5da4bbf0f7.
SASL:
Rename global_si to module_si.
Add entry function type support.
Rename register_* to buffer_*.
Remove indexed_semantic.
Change semantic_fn.ss
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision cfdefecbc33f.
SASL:
Reorganize files.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision 6721e691c006.
SASL:
Separate codegen_context from AST.
Add ABI analyzer.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision fb4e11b71ea5.
SASL:
Improves ABI analyzer and ABI information.
Remove storage_info from module_si.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision b2424ed879a4.
SASL:
Add auto_entry to abi_analyser.
Renames and changes signature of semantic and code generation functions.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
This issue was updated by revision 2252d3fe3976.
SASL:
input_storage and output_storage of abi_info now are const-qualified.
Add entry parameter types support.
Original comment by wuye9036
on 21 Apr 2011 at 6:00
Original comment by wuye9036
on 24 May 2011 at 11:13
Original comment by wuye9036
on 7 Mar 2012 at 2:52
Original issue reported on code.google.com by
wuye9036
on 9 Mar 2011 at 11:07