wuying225 / softart

Automatically exported from code.google.com/p/softart
Other
0 stars 0 forks source link

Add texture fetching and sampling support to SIMD. #149

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Description:
  As title.

Original issue reported on code.google.com by wuye9036 on 14 Dec 2011 at 6:50

GoogleCodeExporter commented 9 years ago

Original comment by wuye9036 on 15 Dec 2011 at 3:15

GoogleCodeExporter commented 9 years ago

Original comment by wuye9036 on 13 Feb 2012 at 9:53

GoogleCodeExporter commented 9 years ago
Now the design are:

1. SamplerState is a built-in type, the real structure is:
struct sampler { void* ss; void* tex };
'ss' is pointer of host sampler state.
'tex' is pointer of bind texture.

2. Declaration of SamplerState is a syntax node used to define sampler in 
shader code.
sampler_state mySampler
{
   MinFilter = LINEAR;
   MagFilter = POINT;
};

3. tex2Dlod( sampler, coord, lod ) is a really function that will be injected 
into LLVM module. Other functions are implemented based on it.

4. All samplers are passed by function argument as same as constant. So 
samplers are special values like system value.

Original comment by wuye9036 on 13 Feb 2012 at 4:01

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 7ef86df82969.

SASL:
  Add builtin type 'sampler'.
  Add tex.sps for test.

Original comment by wuye9036 on 15 Feb 2012 at 3:13

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 96d67beae83b.

SASL:
  Add external_compatible attribute to function.
  If function is external_compatible, all parameters are reference, return value is the first paramater of function.

Original comment by wuye9036 on 15 Feb 2012 at 3:13

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 765f93653dd3.

SASL:
  Add external flag to function_t.

Original comment by wuye9036 on 17 Feb 2012 at 12:26

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 24c3ccc34fa9.

SASL:
  Add is_sampler to enums_utility.
  Add function injection to JIT engine.
  Add tex2D support to SASL and tested.
  Fixed a bug of ty_cache when fetch sampler type.
  Fixed bugs in first_arg_is_return_address and function_t::abi.

Original comment by wuye9036 on 17 Feb 2012 at 12:26

GoogleCodeExporter commented 9 years ago
Now texture sampling is not support execution mask. We need to support it.

Original comment by wuye9036 on 17 Feb 2012 at 12:44

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 67c270ab3460.

SALVIA & SASL:
  Add sampler_api.h and sampler_api.cpp to salviar.
  Add calc_lod to sampler.
  Rename shader_code::update to update_native_function.
  Add declaration set_sampler to shader_unit.
  Rename some parameters of member functions of sampler.
  Change sampler's type from {ptr, ptr} to ptr.

Original comment by wuye9036 on 3 Mar 2012 at 3:16

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 53c2fa51e8bd.

SALVIA:
  Fixed some tex2D* API signatures.
  Add partial_execution tag to mark execution tag is passed by parameter while function is called.
  Add packed_mask to pack <i1 x 16> to unsigned short.

Original comment by wuye9036 on 3 Mar 2012 at 3:16

GoogleCodeExporter commented 9 years ago
This issue was updated by revision e5551c316a9d.

SALVIA:
  Add register_function to shader_code.
  Add empty implementations of tex2D*_pkg.
  Fixed a bug of sampler passby and fixed bug in test.
  Seperated tex2D* functions to intrinsic signatures and external signatures.

Original comment by wuye9036 on 3 Mar 2012 at 3:16

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 0b914ac800e8.

SALVIA:
  Add set_ps_sampler to renderer.
  Now pixel_shader_unit::update could co-work with C++ vertex shader without semantic.
  Add test pixel shader code to TextureAndBlending.
  Add break-points to unimplemented tex2D* functions.

Original comment by wuye9036 on 3 Mar 2012 at 4:28

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 71442f26e3a3.

SASL:
  Now function_t support packed execution mask as second special parameter/argument.
  emit_call support convert value to address by creating temporary variable.
  Fixed a over-limited ABI in create_virtual_args.
  Now shader_code support register function by unmangled function name.
  Add "dependencies" feature to intrinsic for cross-dependency between intrinsics.

Original comment by wuye9036 on 4 Mar 2012 at 2:46

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 25851fa7e989.

SALVIA:
  Fixed a compiler error on x64.
  Fixed some enum utility functions to support sampler.
  Fixed a bug about old pixel shader code while pixel shader unit is enabled.

Original comment by wuye9036 on 4 Mar 2012 at 2:46

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 7dc5e74b5e18.

SALVIA:
  Add sample functions for shader.
  Add "pos" as parameter to eat the first attribute of vs_output which is position.
  Now tex2D works !

Original comment by wuye9036 on 4 Mar 2012 at 3:20

GoogleCodeExporter commented 9 years ago
This issue was updated by revision 09dd11d36b82.

SALVIA:
  Fixed compiling issues on x64.

Original comment by wuye9036 on 4 Mar 2012 at 3:21

GoogleCodeExporter commented 9 years ago
This issue was updated by revision ff4f7f5f0ab3.

SASL:
  Add checking code before pixel shader initializing or updating.
  Reset ty_cache when cgllvm_service initializing.
  Fixed bugs that cached value is too old.
  Fixed some crash/assert bugs on ntx64,msvc10.

Original comment by wuye9036 on 5 Mar 2012 at 11:59

GoogleCodeExporter commented 9 years ago

Original comment by wuye9036 on 5 Mar 2012 at 12:18