mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 20:52:10 +01:00
[d3d11] Add ID3DUserDefinedAnnotation stub
We can implement this properly in the future using VK_EXT_debug_utils.
This commit is contained in:
parent
dcd6c2c0f3
commit
dce2f844c0
55
src/d3d11/d3d11_annotation.cpp
Normal file
55
src/d3d11/d3d11_annotation.cpp
Normal file
@ -0,0 +1,55 @@
|
||||
#include "d3d11_annotation.h"
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
D3D11UserDefinedAnnotation::D3D11UserDefinedAnnotation(ID3D11DeviceContext* ctx)
|
||||
: m_container(ctx) { }
|
||||
|
||||
|
||||
D3D11UserDefinedAnnotation::~D3D11UserDefinedAnnotation() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
ULONG STDMETHODCALLTYPE D3D11UserDefinedAnnotation::AddRef() {
|
||||
return m_container->AddRef();
|
||||
}
|
||||
|
||||
|
||||
ULONG STDMETHODCALLTYPE D3D11UserDefinedAnnotation::Release() {
|
||||
return m_container->Release();
|
||||
}
|
||||
|
||||
|
||||
HRESULT STDMETHODCALLTYPE D3D11UserDefinedAnnotation::QueryInterface(
|
||||
REFIID riid,
|
||||
void** ppvObject) {
|
||||
return m_container->QueryInterface(riid, ppvObject);
|
||||
}
|
||||
|
||||
|
||||
INT STDMETHODCALLTYPE D3D11UserDefinedAnnotation::BeginEvent(
|
||||
LPCWSTR Name) {
|
||||
// Currently not implemented
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
INT STDMETHODCALLTYPE D3D11UserDefinedAnnotation::EndEvent() {
|
||||
// Currently not implemented
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
void STDMETHODCALLTYPE D3D11UserDefinedAnnotation::SetMarker(
|
||||
LPCWSTR Name) {
|
||||
// Currently not implemented
|
||||
}
|
||||
|
||||
|
||||
BOOL STDMETHODCALLTYPE D3D11UserDefinedAnnotation::GetStatus() {
|
||||
// Currently not implemented
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
}
|
38
src/d3d11/d3d11_annotation.h
Normal file
38
src/d3d11/d3d11_annotation.h
Normal file
@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include "d3d11_include.h"
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
class D3D11UserDefinedAnnotation : ID3DUserDefinedAnnotation {
|
||||
|
||||
public:
|
||||
|
||||
D3D11UserDefinedAnnotation(ID3D11DeviceContext* ctx);
|
||||
~D3D11UserDefinedAnnotation();
|
||||
|
||||
ULONG STDMETHODCALLTYPE AddRef();
|
||||
|
||||
ULONG STDMETHODCALLTYPE Release();
|
||||
|
||||
HRESULT STDMETHODCALLTYPE QueryInterface(
|
||||
REFIID riid,
|
||||
void** ppvObject);
|
||||
|
||||
INT STDMETHODCALLTYPE BeginEvent(
|
||||
LPCWSTR Name);
|
||||
|
||||
INT STDMETHODCALLTYPE EndEvent();
|
||||
|
||||
void STDMETHODCALLTYPE SetMarker(
|
||||
LPCWSTR Name);
|
||||
|
||||
BOOL STDMETHODCALLTYPE GetStatus();
|
||||
|
||||
private:
|
||||
|
||||
ID3D11DeviceContext* m_container;
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -12,9 +12,10 @@ namespace dxvk {
|
||||
D3D11DeviceContext::D3D11DeviceContext(
|
||||
D3D11Device* pParent,
|
||||
const Rc<DxvkDevice>& Device)
|
||||
: m_parent (pParent),
|
||||
m_device (Device),
|
||||
m_csChunk (new DxvkCsChunk()) {
|
||||
: m_parent (pParent),
|
||||
m_annotation(this),
|
||||
m_device (Device),
|
||||
m_csChunk (new DxvkCsChunk()) {
|
||||
// Create default state objects. We won't ever return them
|
||||
// to the application, but we'll use them to apply state.
|
||||
Com<ID3D11BlendState> defaultBlendState;
|
||||
@ -50,8 +51,10 @@ namespace dxvk {
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
if (riid == __uuidof(ID3DUserDefinedAnnotation))
|
||||
return E_NOINTERFACE;
|
||||
if (riid == __uuidof(ID3DUserDefinedAnnotation)) {
|
||||
*ppvObject = ref(&m_annotation);
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
Logger::warn("D3D11DeviceContext::QueryInterface: Unknown interface query");
|
||||
Logger::warn(str::format(riid));
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include "../dxvk/dxvk_cs.h"
|
||||
#include "../dxvk/dxvk_device.h"
|
||||
|
||||
#include "d3d11_annotation.h"
|
||||
#include "d3d11_context_state.h"
|
||||
#include "d3d11_device_child.h"
|
||||
|
||||
@ -637,7 +638,8 @@ namespace dxvk {
|
||||
|
||||
protected:
|
||||
|
||||
D3D11Device* const m_parent;
|
||||
D3D11Device* const m_parent;
|
||||
D3D11UserDefinedAnnotation m_annotation;
|
||||
|
||||
Rc<DxvkDevice> m_device;
|
||||
Rc<DxvkCsChunk> m_csChunk;
|
||||
|
@ -1,4 +1,5 @@
|
||||
d3d11_src = [
|
||||
'd3d11_annotation.cpp',
|
||||
'd3d11_blend.cpp',
|
||||
'd3d11_buffer.cpp',
|
||||
'd3d11_class_linkage.cpp',
|
||||
|
Loading…
x
Reference in New Issue
Block a user