diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-08-26 15:45:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-08-26 15:45:28 -0400 |
| commit | 2c4307a9c1a5d1ec92599bb6afe065636ff81df3 (patch) | |
| tree | dda2f66dedfefa5b730a65250edff4a6eec66358 /prelude | |
| parent | 6a0ca6c6a23b8a29320b86be6aec50263f5d7d97 (diff) | |
WIP: CPU sample working with Texture2D (#1033)
* WIP: Memory binding.
* WIP for binding.
* Fix handling of writing to constant buffer.
* Fix bug in handling indices.
Diffstat (limited to 'prelude')
| -rw-r--r-- | prelude/slang-cpp-types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/prelude/slang-cpp-types.h b/prelude/slang-cpp-types.h index 20e28a16f..db8dcdb70 100644 --- a/prelude/slang-cpp-types.h +++ b/prelude/slang-cpp-types.h @@ -212,6 +212,7 @@ struct ITexture2D { virtual void Load(const int3& v, void* out) = 0; virtual void Sample(SamplerState samplerState, const float2& loc, void* out) = 0; + virtual void SampleLevel(SamplerState samplerState, const float2& loc, float level, void* out) = 0; }; template <typename T> @@ -219,6 +220,7 @@ struct Texture2D { T Load(const int3& v) const { T out; texture->Load(v, &out); return out; } T Sample(SamplerState samplerState, const float2& v) const { T out; texture->Sample(samplerState, v, &out); return out; } + T SampleLevel(SamplerState samplerState, const float2& v, float level) { T out; texture->SampleLevel(samplerState, v, level, &out); return out; } ITexture2D* texture; }; |
