Program Listing for File D3D12Debug.cpp

Return to documentation for file (Source\Azura\RenderSystem\Src\D3D12\D3D12Debug.cpp)

#include "D3D12/D3D12Debug.h"

#include "Utils/Macros.h"

namespace Azura {
namespace D3D12 {

const char* D3D12ResourceStateToString(enum D3D12_RESOURCE_STATES state) {
  switch (state) {
    CASE_STR(D3D12_RESOURCE_STATE_COMMON);
    CASE_STR(D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER);
    CASE_STR(D3D12_RESOURCE_STATE_INDEX_BUFFER);
    CASE_STR(D3D12_RESOURCE_STATE_RENDER_TARGET);
    CASE_STR(D3D12_RESOURCE_STATE_UNORDERED_ACCESS);
    CASE_STR(D3D12_RESOURCE_STATE_DEPTH_WRITE);
    CASE_STR(D3D12_RESOURCE_STATE_DEPTH_READ);
    CASE_STR(D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE);
    CASE_STR(D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE);
    CASE_STR(D3D12_RESOURCE_STATE_STREAM_OUT);
    CASE_STR(D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT);
    CASE_STR(D3D12_RESOURCE_STATE_COPY_DEST);
    CASE_STR(D3D12_RESOURCE_STATE_COPY_SOURCE);
    CASE_STR(D3D12_RESOURCE_STATE_RESOLVE_DEST);
    CASE_STR(D3D12_RESOURCE_STATE_RESOLVE_SOURCE);
    CASE_STR(D3D12_RESOURCE_STATE_GENERIC_READ);
    CASE_STR(D3D12_RESOURCE_STATE_VIDEO_DECODE_READ);
    CASE_STR(D3D12_RESOURCE_STATE_VIDEO_DECODE_WRITE);
    CASE_STR(D3D12_RESOURCE_STATE_VIDEO_PROCESS_READ);
    CASE_STR(D3D12_RESOURCE_STATE_VIDEO_PROCESS_WRITE);

    default:
      return "UNKNOWN_STATE";
  }
}
} // namespace D3D12
} // namespace Azura