1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-13 07:08:50 +01:00

[dxvk] Add shader stage parameter to binding methods

This commit is contained in:
Philip Rebohle 2022-06-02 19:36:58 +02:00
parent 3751edbe0c
commit 10eabb34da
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 44 additions and 0 deletions

View File

@ -147,6 +147,14 @@ namespace dxvk {
}
void DxvkContext::bindResourceBuffer(
VkShaderStageFlags stages,
uint32_t slot,
const DxvkBufferSlice& buffer) {
bindResourceBuffer(slot, buffer);
}
void DxvkContext::bindResourceBuffer(
uint32_t slot,
const DxvkBufferSlice& buffer) {
@ -171,6 +179,15 @@ namespace dxvk {
}
void DxvkContext::bindResourceView(
VkShaderStageFlags stages,
uint32_t slot,
const Rc<DxvkImageView>& imageView,
const Rc<DxvkBufferView>& bufferView) {
bindResourceView(slot, imageView, bufferView);
}
void DxvkContext::bindResourceView(
uint32_t slot,
const Rc<DxvkImageView>& imageView,
@ -188,6 +205,14 @@ namespace dxvk {
}
void DxvkContext::bindResourceSampler(
VkShaderStageFlags stages,
uint32_t slot,
const Rc<DxvkSampler>& sampler) {
bindResourceSampler(slot, sampler);
}
void DxvkContext::bindResourceSampler(
uint32_t slot,
const Rc<DxvkSampler>& sampler) {

View File

@ -109,9 +109,15 @@ namespace dxvk {
* \brief Binds buffer as a shader resource
*
* Can be used for uniform and storage buffers.
* \param [in] stages Shader stages that access the binding
* \param [in] slot Resource binding slot
* \param [in] buffer Buffer to bind
*/
void bindResourceBuffer(
VkShaderStageFlags stages,
uint32_t slot,
const DxvkBufferSlice& buffer);
void bindResourceBuffer(
uint32_t slot,
const DxvkBufferSlice& buffer);
@ -122,10 +128,17 @@ namespace dxvk {
* Can be used for sampled images with a dedicated
* sampler and for storage images, as well as for
* uniform texel buffers and storage texel buffers.
* \param [in] stages Shader stages that access the binding
* \param [in] slot Resource binding slot
* \param [in] imageView Image view to bind
* \param [in] bufferView Buffer view to bind
*/
void bindResourceView(
VkShaderStageFlags stages,
uint32_t slot,
const Rc<DxvkImageView>& imageView,
const Rc<DxvkBufferView>& bufferView);
void bindResourceView(
uint32_t slot,
const Rc<DxvkImageView>& imageView,
@ -136,9 +149,15 @@ namespace dxvk {
*
* Binds a sampler that can be used together with
* an image in order to read from a texture.
* \param [in] stages Shader stages that access the binding
* \param [in] slot Resource binding slot
* \param [in] sampler Sampler view to bind
*/
void bindResourceSampler(
VkShaderStageFlags stages,
uint32_t slot,
const Rc<DxvkSampler>& sampler);
void bindResourceSampler(
uint32_t slot,
const Rc<DxvkSampler>& sampler);