mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-03-14 06:34:10 +00:00
Fixed rendering of the main menu with Vulkan
This commit is contained in:
parent
c55467ef33
commit
4c85798e67
8 changed files with 51 additions and 29 deletions
|
@ -33,6 +33,11 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#include "Common_local.h"
|
||||
#include "../imgui/BFGimgui.h"
|
||||
|
||||
#if defined( USE_NVRHI )
|
||||
#include <sys/DeviceManager.h>
|
||||
extern DeviceManager* deviceManager;
|
||||
#endif
|
||||
|
||||
#define CON_TEXTSIZE 0x30000
|
||||
#define NUM_CON_TIMES 4
|
||||
#define CONSOLE_FIRSTREPEAT 200
|
||||
|
@ -346,7 +351,17 @@ float idConsoleLocal::DrawFPS( float y )
|
|||
ImGui::Begin( "Performance Stats" );
|
||||
|
||||
#if defined( USE_NVRHI )
|
||||
const char* API = "DX12";
|
||||
static const int gfxNumValues = 3;
|
||||
|
||||
static const char* gfxValues[gfxNumValues] =
|
||||
{
|
||||
"DX11",
|
||||
"DX12",
|
||||
"Vulkan",
|
||||
};
|
||||
|
||||
const char* API = gfxValues[ int( deviceManager->GetGraphicsAPI() ) ];
|
||||
|
||||
#elif defined( USE_VULKAN )
|
||||
const char* API = "Vulkan";
|
||||
#else
|
||||
|
|
|
@ -40,6 +40,7 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
#include "nvrhi/utils.h"
|
||||
#include <sys/DeviceManager.h>
|
||||
extern DeviceManager* deviceManager;
|
||||
|
||||
idCVar r_drawFlickerBox( "r_drawFlickerBox", "0", CVAR_RENDERER | CVAR_BOOL, "visual test for dropping frames" );
|
||||
idCVar stereoRender_warp( "stereoRender_warp", "0", CVAR_RENDERER | CVAR_ARCHIVE | CVAR_BOOL, "use the optical warping renderprog instead of stereoDeGhost" );
|
||||
|
@ -70,8 +71,6 @@ public:
|
|||
|
||||
static NvrhiContext context;
|
||||
|
||||
extern DeviceManager* deviceManager;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -30,9 +30,12 @@ If you have questions concerning this license or the applicable additional terms
|
|||
#include <global_inc.hlsl>
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
||||
float4 position : POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
struct VS_IN
|
||||
{
|
||||
float4 position : POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 color : COLOR0;
|
||||
float4 color2 : COLOR1;
|
||||
};
|
||||
|
|
|
@ -35,8 +35,10 @@ StructuredBuffer<float4> matrices : register(t11);
|
|||
|
||||
struct VS_IN
|
||||
{
|
||||
float4 position : POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 position : POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 color : COLOR0;
|
||||
float4 color2 : COLOR1;
|
||||
};
|
||||
|
|
|
@ -30,11 +30,11 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
|
||||
// *INDENT-OFF*
|
||||
Texture2D t_Y : register( t0 );
|
||||
Texture2D t_Cr : register( t1 );
|
||||
Texture2D t_Cb : register( t2 );
|
||||
Texture2D t_Y : register( t0 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_Cr : register( t1 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_Cb : register( t2 VK_DESCRIPTOR_SET( 1 ) );
|
||||
|
||||
SamplerState LinearSampler : register( s0 );
|
||||
SamplerState LinearSampler : register( s0 VK_DESCRIPTOR_SET( 2 ) );
|
||||
|
||||
|
||||
struct PS_IN {
|
||||
|
|
|
@ -30,12 +30,14 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
||||
float4 position : POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 color : COLOR0;
|
||||
struct VS_IN
|
||||
{
|
||||
float4 position : POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 color : COLOR0;
|
||||
float4 color2 : COLOR1;
|
||||
};
|
||||
|
||||
struct VS_OUT {
|
||||
|
|
|
@ -30,11 +30,11 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
|
||||
// *INDENT-OFF*
|
||||
Texture2D t_Y : register( t0 );
|
||||
Texture2D t_Cr : register( t1 );
|
||||
Texture2D t_Cb : register( t2 );
|
||||
Texture2D t_Y : register( t0 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_Cr : register( t1 VK_DESCRIPTOR_SET( 1 ) );
|
||||
Texture2D t_Cb : register( t2 VK_DESCRIPTOR_SET( 1 ) );
|
||||
|
||||
SamplerState LinearSampler : register( s0 );
|
||||
SamplerState LinearSampler : register( s0 VK_DESCRIPTOR_SET( 2 ) );
|
||||
|
||||
struct PS_IN {
|
||||
float4 position : SV_Position;
|
||||
|
|
|
@ -31,13 +31,14 @@ If you have questions concerning this license or the applicable additional terms
|
|||
|
||||
|
||||
// *INDENT-OFF*
|
||||
struct VS_IN {
|
||||
float4 position : POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 color : COLOR0;
|
||||
float4 color2 : COLOR1;
|
||||
struct VS_IN
|
||||
{
|
||||
float4 position : POSITION;
|
||||
float2 texcoord : TEXCOORD0;
|
||||
float4 normal : NORMAL;
|
||||
float4 tangent : TANGENT;
|
||||
float4 color : COLOR0;
|
||||
float4 color2 : COLOR1;
|
||||
};
|
||||
|
||||
struct VS_OUT {
|
||||
|
|
Loading…
Reference in a new issue