nvidia/cuda/gs-texture: Add accessors for internals

This commit is contained in:
Michael Fabian 'Xaymar' Dirks 2021-04-26 00:16:28 +02:00
parent 5cd1d13d5f
commit 4dac477500
2 changed files with 14 additions and 1 deletions

View file

@ -131,3 +131,13 @@ void nvidia::cuda::gstexture::unmap()
_pointer = nullptr;
_stream.reset();
}
std::shared_ptr<gs::texture> nvidia::cuda::gstexture::get_texture()
{
return _texture;
}
::nvidia::cuda::graphics_resource_t nvidia::cuda::gstexture::get()
{
return _resource;
}

View file

@ -35,10 +35,13 @@ namespace nvidia::cuda {
std::shared_ptr<nvidia::cuda::stream> _stream;
public:
gstexture(std::shared_ptr<gs::texture> texture);
~gstexture();
gstexture(std::shared_ptr<gs::texture> texture);
array_t map(std::shared_ptr<nvidia::cuda::stream> stream);
void unmap();
std::shared_ptr<gs::texture> get_texture();
::nvidia::cuda::graphics_resource_t get();
};
} // namespace nvidia::cuda