Compare commits

..

No commits in common. "33751db0458943e0c6a7110c7ef0d7fb46b47c74" and "f205c26075a035326774f31e2bc1c2dd71ad72cb" have entirely different histories.

8 changed files with 321 additions and 95 deletions

3
.gitmodules vendored
View File

@ -1,3 +1,6 @@
[submodule "Vulkan-Headers"] [submodule "Vulkan-Headers"]
path = Vulkan-Headers path = Vulkan-Headers
url = https://github.com/KhronosGroup/Vulkan-Headers.git url = https://github.com/KhronosGroup/Vulkan-Headers.git
[submodule "SPIRV-Cross"]
path = SPIRV-Cross
url = https://github.com/KhronosGroup/SPIRV-Cross

View File

@ -8,7 +8,7 @@ option(BUILD_SHARED_LIBS "Build shared library" ON)
# Version # Version
SET(LIB_MAJOR_VERSION "1") SET(LIB_MAJOR_VERSION "1")
SET(LIB_MINOR_VERSION "4") SET(LIB_MINOR_VERSION "3")
SET(LIB_REVISION "0") SET(LIB_REVISION "0")
SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_REVISION}") SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_REVISION}")
@ -79,6 +79,7 @@ target_include_directories(Refresh PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Headers/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Vulkan-Headers/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/SPIRV-Cross>
) )
# MinGW builds should statically link libgcc # MinGW builds should statically link libgcc
@ -92,6 +93,23 @@ set_target_properties(Refresh PROPERTIES OUTPUT_NAME "Refresh"
SOVERSION ${LIB_MAJOR_VERSION} SOVERSION ${LIB_MAJOR_VERSION}
) )
# Internal Dependencies
if (BUILD_D3D11)
set(SPIRV_CROSS_ENABLE_TESTS OFF CACHE "" INTERNAL FORCE)
set(SPIRV_CROSS_CLI OFF CACHE "" INTERNAL FORCE)
set(SPIRV_CROSS_SHARED ON CACHE "" INTERNAL FORCE)
set(SPIRV_CROSS_STATIC OFF CACHE "" INTERNAL FORCE)
set(SPIRV_CROSS_ENABLE_C_API ON CACHE "" INTERNAL FORCE)
set(SPIRV_CROSS_ENABLE_HLSL ON CACHE "" INTERNAL FORCE)
set(SPIRV_CROSS_ENABLE_GLSL ON CACHE "" INTERNAL FORCE)
set(SPIRV_CROSS_ENABLE_REFLECT ON CACHE "" INTERNAL FORCE)
set(SPIRV_CROSS_ENABLE_MSL OFF CACHE "" INTERNAL FORCE)
set(SPIRV_CROSS_ENABLE_CPP OFF CACHE "" INTERNAL FORCE)
add_subdirectory(SPIRV-Cross EXCLUDE_FROM_ALL)
target_link_libraries(Refresh PUBLIC spirv-cross-c-shared)
endif()
# SDL2 Dependency # SDL2 Dependency
if (DEFINED SDL2_INCLUDE_DIRS AND DEFINED SDL2_LIBRARIES) if (DEFINED SDL2_INCLUDE_DIRS AND DEFINED SDL2_LIBRARIES)
message(STATUS "using pre-defined SDL2 variables SDL2_INCLUDE_DIRS and SDL2_LIBRARIES") message(STATUS "using pre-defined SDL2 variables SDL2_INCLUDE_DIRS and SDL2_LIBRARIES")

1
SPIRV-Cross Submodule

@ -0,0 +1 @@
Subproject commit d5c3bd8b5e7db9e2d7fe809944b47b8f88e1c732

View File

@ -55,7 +55,7 @@ extern "C" {
/* Version API */ /* Version API */
#define REFRESH_MAJOR_VERSION 1 #define REFRESH_MAJOR_VERSION 1
#define REFRESH_MINOR_VERSION 4 #define REFRESH_MINOR_VERSION 3
#define REFRESH_PATCH_VERSION 0 #define REFRESH_PATCH_VERSION 0
#define REFRESH_COMPILED_VERSION ( \ #define REFRESH_COMPILED_VERSION ( \
@ -184,8 +184,7 @@ typedef uint32_t Refresh_BufferUsageFlags;
typedef enum Refresh_VertexElementFormat typedef enum Refresh_VertexElementFormat
{ {
REFRESH_VERTEXELEMENTFORMAT_UINT, REFRESH_VERTEXELEMENTFORMAT_SINGLE,
REFRESH_VERTEXELEMENTFORMAT_FLOAT,
REFRESH_VERTEXELEMENTFORMAT_VECTOR2, REFRESH_VERTEXELEMENTFORMAT_VECTOR2,
REFRESH_VERTEXELEMENTFORMAT_VECTOR3, REFRESH_VERTEXELEMENTFORMAT_VECTOR3,
REFRESH_VERTEXELEMENTFORMAT_VECTOR4, REFRESH_VERTEXELEMENTFORMAT_VECTOR4,
@ -487,6 +486,7 @@ typedef struct Refresh_RasterizerState
float depthBiasConstantFactor; float depthBiasConstantFactor;
float depthBiasClamp; float depthBiasClamp;
float depthBiasSlopeFactor; float depthBiasSlopeFactor;
float lineWidth;
} Refresh_RasterizerState; } Refresh_RasterizerState;
typedef struct Refresh_MultisampleState typedef struct Refresh_MultisampleState

View File

@ -39,6 +39,8 @@
#include <SDL.h> #include <SDL.h>
#include <SDL_syswm.h> #include <SDL_syswm.h>
#include <spirv_cross_c.h>
/* Defines */ /* Defines */
#define D3D11_DLL "d3d11.dll" #define D3D11_DLL "d3d11.dll"
@ -127,8 +129,7 @@ static DXGI_FORMAT RefreshToD3D11_SurfaceFormat[] =
static DXGI_FORMAT RefreshToD3D11_VertexFormat[] = static DXGI_FORMAT RefreshToD3D11_VertexFormat[] =
{ {
DXGI_FORMAT_R32_UINT, /* UINT */ DXGI_FORMAT_R32_FLOAT, /* SINGLE */
DXGI_FORMAT_R32_FLOAT, /* FLOAT */
DXGI_FORMAT_R32G32_FLOAT, /* VECTOR2 */ DXGI_FORMAT_R32G32_FLOAT, /* VECTOR2 */
DXGI_FORMAT_R32G32B32_FLOAT, /* VECTOR3 */ DXGI_FORMAT_R32G32B32_FLOAT, /* VECTOR3 */
DXGI_FORMAT_R32G32B32A32_FLOAT, /* VECTOR4 */ DXGI_FORMAT_R32G32B32A32_FLOAT, /* VECTOR4 */
@ -327,10 +328,11 @@ typedef struct D3D11CommandBufferPool
typedef struct D3D11ShaderModule typedef struct D3D11ShaderModule
{ {
ID3D11DeviceChild *shader; /* ID3D11VertexShader, ID3D11PixelShader, ID3D11ComputeShader */ spvc_context context;
ID3D10Blob *blob; size_t numEntryPoints;
char *shaderSource; const spvc_entry_point *entryPoints;
size_t shaderSourceLength; ID3D11DeviceChild **shaders; /* ID3D11VertexShader, ID3D11PixelShader, ID3D11ComputeShader */
ID3D10Blob **blobs;
} D3D11ShaderModule; } D3D11ShaderModule;
typedef struct D3D11GraphicsPipeline typedef struct D3D11GraphicsPipeline
@ -897,8 +899,7 @@ static uint32_t D3D11_INTERNAL_FindIndexOfVertexBinding(
static ID3D11InputLayout* D3D11_INTERNAL_FetchInputLayout( static ID3D11InputLayout* D3D11_INTERNAL_FetchInputLayout(
D3D11Renderer *renderer, D3D11Renderer *renderer,
Refresh_VertexInputState inputState, Refresh_VertexInputState inputState,
void *shaderBytes, ID3D10Blob *shaderBlob
size_t shaderByteLength
) { ) {
ID3D11InputLayout *result = NULL; ID3D11InputLayout *result = NULL;
D3D11_INPUT_ELEMENT_DESC *elementDescs; D3D11_INPUT_ELEMENT_DESC *elementDescs;
@ -941,8 +942,8 @@ static ID3D11InputLayout* D3D11_INTERNAL_FetchInputLayout(
renderer->device, renderer->device,
elementDescs, elementDescs,
inputState.vertexAttributeCount, inputState.vertexAttributeCount,
shaderBytes, (void*) ID3D10Blob_GetBufferPointer(shaderBlob),
shaderByteLength, ID3D10Blob_GetBufferSize(shaderBlob),
&result &result
); );
if (FAILED(res)) if (FAILED(res))
@ -976,9 +977,8 @@ static Refresh_GraphicsPipeline* D3D11_CreateGraphicsPipeline(
D3D11GraphicsPipeline *pipeline = (D3D11GraphicsPipeline*) SDL_malloc(sizeof(D3D11GraphicsPipeline)); D3D11GraphicsPipeline *pipeline = (D3D11GraphicsPipeline*) SDL_malloc(sizeof(D3D11GraphicsPipeline));
D3D11ShaderModule* vertShaderModule = (D3D11ShaderModule*) pipelineCreateInfo->vertexShaderInfo.shaderModule; D3D11ShaderModule* vertShaderModule = (D3D11ShaderModule*) pipelineCreateInfo->vertexShaderInfo.shaderModule;
D3D11ShaderModule* fragShaderModule = (D3D11ShaderModule*) pipelineCreateInfo->fragmentShaderInfo.shaderModule; D3D11ShaderModule* fragShaderModule = (D3D11ShaderModule*) pipelineCreateInfo->fragmentShaderInfo.shaderModule;
ID3D10Blob *errorBlob; int32_t vertexShaderIndex, fragmentShaderIndex;
int32_t i; int32_t i;
HRESULT res;
/* Color attachments */ /* Color attachments */
pipeline->numColorAttachments = pipelineCreateInfo->attachmentInfo.colorAttachmentCount; pipeline->numColorAttachments = pipelineCreateInfo->attachmentInfo.colorAttachmentCount;
@ -1024,79 +1024,54 @@ static Refresh_GraphicsPipeline* D3D11_CreateGraphicsPipeline(
pipelineCreateInfo->rasterizerState pipelineCreateInfo->rasterizerState
); );
/* Vertex Shader */ /* Vertex Shader + Input Layout */
if (vertShaderModule->shader == NULL) vertexShaderIndex = -1;
for (i = 0; i < vertShaderModule->numEntryPoints; i += 1)
{ {
res = renderer->D3DCompileFunc( if ( vertShaderModule->entryPoints[i].execution_model == SpvExecutionModelVertex &&
vertShaderModule->shaderSource, SDL_strcmp(vertShaderModule->entryPoints[i].name, pipelineCreateInfo->vertexShaderInfo.entryPointName) == 0 )
vertShaderModule->shaderSourceLength, {
NULL, vertexShaderIndex = i;
NULL, break;
NULL, }
"main", }
"vs_5_0", if (vertexShaderIndex == -1)
0, {
0, Refresh_LogError(
&vertShaderModule->blob, "Graphics pipeline creation failed! No entry point '%s' exists for the vertex shader!",
&errorBlob pipelineCreateInfo->vertexShaderInfo.entryPointName
); );
if (FAILED(res))
{
Refresh_LogError("Vertex Shader Compile Error: %s", ID3D10Blob_GetBufferPointer(errorBlob));
return NULL; return NULL;
} }
res = ID3D11Device_CreateVertexShader(
renderer->device,
ID3D10Blob_GetBufferPointer(vertShaderModule->blob),
ID3D10Blob_GetBufferSize(vertShaderModule->blob),
NULL,
(ID3D11VertexShader**) &vertShaderModule->shader
);
ERROR_CHECK_RETURN("Could not create vertex shader", NULL);
}
pipeline->vertexShader = (ID3D11VertexShader*)vertShaderModule->shader;
/* Input Layout */
pipeline->inputLayout = D3D11_INTERNAL_FetchInputLayout( pipeline->inputLayout = D3D11_INTERNAL_FetchInputLayout(
renderer, renderer,
pipelineCreateInfo->vertexInputState, pipelineCreateInfo->vertexInputState,
ID3D10Blob_GetBufferPointer(vertShaderModule->blob), vertShaderModule->blobs[vertexShaderIndex]
ID3D10Blob_GetBufferSize(vertShaderModule->blob)
); );
pipeline->vertexShader = (ID3D11VertexShader*) vertShaderModule->shaders[vertexShaderIndex];
/* Fragment Shader */ /* Fragment Shader */
if (fragShaderModule->shader == NULL) fragmentShaderIndex = -1;
for (i = 0; i < fragShaderModule->numEntryPoints; i += 1)
{ {
res = renderer->D3DCompileFunc( if ( fragShaderModule->entryPoints[i].execution_model == SpvExecutionModelFragment &&
fragShaderModule->shaderSource, SDL_strcmp(fragShaderModule->entryPoints[i].name, pipelineCreateInfo->fragmentShaderInfo.entryPointName) == 0 )
fragShaderModule->shaderSourceLength, {
NULL, fragmentShaderIndex = i;
NULL, break;
NULL, }
"main", }
"ps_5_0", if (fragmentShaderIndex == -1)
0, {
0, Refresh_LogError(
&fragShaderModule->blob, "Graphics pipeline creation failed! No entry point '%s' exists for the fragment shader!",
&errorBlob pipelineCreateInfo->vertexShaderInfo.entryPointName
); );
if (FAILED(res))
{
Refresh_LogError("Fragment Shader Compile Error: %s", ID3D10Blob_GetBufferPointer(errorBlob));
return NULL; return NULL;
} }
res = ID3D11Device_CreatePixelShader( pipeline->fragmentShader = (ID3D11PixelShader*) fragShaderModule->shaders[fragmentShaderIndex];
renderer->device,
ID3D10Blob_GetBufferPointer(fragShaderModule->blob),
ID3D10Blob_GetBufferSize(fragShaderModule->blob),
NULL,
(ID3D11PixelShader**) &fragShaderModule->shader
);
ERROR_CHECK_RETURN("Could not create pixel shader", NULL);
}
pipeline->fragmentShader = (ID3D11PixelShader*) fragShaderModule->shader;
/* FIXME: Need to create uniform buffers for the shaders */ /* FIXME: Need to create uniform buffers for the shaders */
@ -1115,14 +1090,199 @@ static Refresh_ShaderModule* D3D11_CreateShaderModule(
Refresh_ShaderModuleCreateInfo *shaderModuleCreateInfo Refresh_ShaderModuleCreateInfo *shaderModuleCreateInfo
) { ) {
D3D11Renderer *renderer = (D3D11Renderer*) driverData; D3D11Renderer *renderer = (D3D11Renderer*) driverData;
spvc_context context;
spvc_result result;
spvc_parsed_ir parsedIR;
spvc_compiler compiler;
const spvc_entry_point *entryPoints;
size_t numEntryPoints;
spvc_compiler_options compilerOptions;
char *hlslSource;
const char *shaderModel;
ID3DBlob **blobs;
ID3DBlob *errorBlob = NULL;
ID3D11DeviceChild **shaders;
D3D11ShaderModule *shaderModule;
uint32_t i;
HRESULT res;
D3D11ShaderModule *shaderModule = (D3D11ShaderModule*) SDL_malloc(sizeof(D3D11ShaderModule)); /* Create the context */
shaderModule->shader = NULL; /* created when binding to a pipeline */ result = spvc_context_create(&context);
shaderModule->blob = NULL; /* created when binding to a pipeline */ if (result != SPVC_SUCCESS)
shaderModule->shaderSourceLength = shaderModuleCreateInfo->codeSize; {
shaderModule->shaderSource = (char*) SDL_malloc(shaderModule->shaderSourceLength); Refresh_LogError("Could not create SPIRV Cross context! Error: %X", result);
SDL_memcpy(shaderModule->shaderSource, shaderModuleCreateInfo->byteCode, shaderModuleCreateInfo->codeSize); return NULL;
}
/* Parse the SPIRV input */
result = spvc_context_parse_spirv(
context,
shaderModuleCreateInfo->byteCode,
shaderModuleCreateInfo->codeSize / sizeof(uint32_t), /* word count, not byte length */
&parsedIR
);
if (result != SPVC_SUCCESS)
{
Refresh_LogError("Could not parse SPIRV! Error: %X", result);
spvc_context_destroy(context); /* free all context-related memory */
return NULL;
}
/* Create the cross compiler */
result = spvc_context_create_compiler(
context,
SPVC_BACKEND_HLSL,
parsedIR,
SPVC_CAPTURE_MODE_TAKE_OWNERSHIP,
&compiler
);
if (result != SPVC_SUCCESS)
{
Refresh_LogError("Could not create SPIRV to HLSL cross compiler! Error: %X", result);
spvc_context_destroy(context); /* free all context-related memory */
return NULL;
}
/* Get entry points from the source bytecode */
result = spvc_compiler_get_entry_points(compiler, &entryPoints, &numEntryPoints);
if (result != SPVC_SUCCESS)
{
Refresh_LogError("Could not get SPIRV entry points! Error: %X", result);
spvc_context_destroy(context); /* free all context-related memory */
return NULL;
}
/* Set HLSL cross-compile options (target SM5.0) */
spvc_compiler_create_compiler_options(compiler, &compilerOptions);
spvc_compiler_options_set_uint(
compilerOptions,
SPVC_COMPILER_OPTION_HLSL_SHADER_MODEL,
50 /* shader model 5.0 */
);
spvc_compiler_options_set_bool(
compilerOptions,
SPVC_COMPILER_OPTION_FLIP_VERTEX_Y,
SPVC_TRUE
);
spvc_compiler_install_compiler_options(compiler, compilerOptions);
/* Cross compile to HLSL */
result = spvc_compiler_compile(compiler, &hlslSource);
if (result != SPVC_SUCCESS)
{
Refresh_LogError("Could not cross-compile SPIRV to HLSL! Error: %X", result);
spvc_context_destroy(context); /* free all context-related memory */
return NULL;
}
/* Allocate memory for the D3D11 shader list */
shaders = (ID3D11DeviceChild**) SDL_malloc(numEntryPoints * sizeof(ID3D11DeviceChild*));
blobs = (ID3D10Blob**) SDL_malloc(numEntryPoints * sizeof(ID3D10Blob*));
/* Compile each HLSL entry point into a D3D shader */
for (i = 0; i < numEntryPoints; i += 1)
{
/* Determine the exact shader model to use */
switch (entryPoints[i].execution_model)
{
case SpvExecutionModelVertex:
shaderModel = "vs_5_0";
break;
case SpvExecutionModelFragment:
shaderModel = "ps_5_0";
break;
case SpvExecutionModelGLCompute:
shaderModel = "cs_5_0";
break;
default:
Refresh_LogError(
"Attempting to compile a shader with an unknown execution model: %X",
entryPoints[i].execution_model
);
spvc_context_destroy(context); /* free all context-related memory */
SDL_free(shaders);
return NULL;
}
/* Compile the shader blob */
res = renderer->D3DCompileFunc(
hlslSource,
SDL_strlen(hlslSource),
NULL,
NULL,
NULL,
entryPoints[i].name,
shaderModel,
0,
0,
&blobs[i],
&errorBlob
);
if (FAILED(res))
{
Refresh_LogError(
"D3DCompile failed on HLSL shader with entry point '%s'! Error: %X\nCompiler error message: %s",
entryPoints[i].name,
res,
errorBlob ? (const char*) ID3D10Blob_GetBufferPointer(errorBlob) : "<none>"
);
spvc_context_destroy(context); /* free all context-related memory */
SDL_free(shaders);
return NULL;
}
/* Create the shader from the blob */
switch (entryPoints[i].execution_model)
{
case SpvExecutionModelVertex:
res = ID3D11Device_CreateVertexShader(
renderer->device,
ID3D10Blob_GetBufferPointer(blobs[i]),
ID3D10Blob_GetBufferSize(blobs[i]),
NULL,
(ID3D11VertexShader**) &shaders[i]
);
break;
case SpvExecutionModelFragment:
res = ID3D11Device_CreatePixelShader(
renderer->device,
ID3D10Blob_GetBufferPointer(blobs[i]),
ID3D10Blob_GetBufferSize(blobs[i]),
NULL,
(ID3D11PixelShader**) &shaders[i]
);
break;
case SpvExecutionModelGLCompute:
res = ID3D11Device_CreateComputeShader(
renderer->device,
ID3D10Blob_GetBufferPointer(blobs[i]),
ID3D10Blob_GetBufferSize(blobs[i]),
NULL,
(ID3D11ComputeShader**) &shaders[i]
);
break;
}
if (FAILED(res))
{
Refresh_LogError("D3D11 shader creation failed! Error code: %X", res);
spvc_context_destroy(context); /* free all context-related memory */
SDL_free(shaders);
return NULL;
}
}
/* Create the final shader module object to return */
shaderModule = (D3D11ShaderModule*) SDL_malloc(sizeof(D3D11ShaderModule));
shaderModule->context = context;
shaderModule->entryPoints = entryPoints;
shaderModule->numEntryPoints = numEntryPoints;
shaderModule->shaders = shaders;
shaderModule->blobs = blobs;
return (Refresh_ShaderModule*) shaderModule; return (Refresh_ShaderModule*) shaderModule;
} }
@ -1354,10 +1514,21 @@ static void D3D11_QueueDestroyShaderModule(
Refresh_ShaderModule* shaderModule Refresh_ShaderModule* shaderModule
) { ) {
D3D11ShaderModule *d3dShaderModule = (D3D11ShaderModule*) shaderModule; D3D11ShaderModule *d3dShaderModule = (D3D11ShaderModule*) shaderModule;
ID3D11DeviceChild_Release(d3dShaderModule->shader); uint32_t i;
ID3D10Blob_Release(d3dShaderModule->blob);
SDL_free(d3dShaderModule->shaderSource); /* Release the D3D11 shader objects and free the arrays */
SDL_free(d3dShaderModule); for (i = 0; i < d3dShaderModule->numEntryPoints; i += 1)
{
ID3D11DeviceChild_Release(d3dShaderModule->shaders[i]);
ID3D10Blob_Release(d3dShaderModule->blobs[i]);
}
SDL_free(d3dShaderModule->shaders);
SDL_free(d3dShaderModule->blobs);
/* Destroy the SPIRV-Cross context.
* This should destroy the entryPoints list as well.
*/
spvc_context_destroy(d3dShaderModule->context);
} }
static void D3D11_QueueDestroyComputePipeline( static void D3D11_QueueDestroyComputePipeline(

View File

@ -210,8 +210,7 @@ static VkFormat RefreshToVK_SurfaceFormat[] =
static VkFormat RefreshToVK_VertexFormat[] = static VkFormat RefreshToVK_VertexFormat[] =
{ {
VK_FORMAT_R32_UINT, /* UINT */ VK_FORMAT_R32_SFLOAT, /* SINGLE */
VK_FORMAT_R32_SFLOAT, /* FLOAT */
VK_FORMAT_R32G32_SFLOAT, /* VECTOR2 */ VK_FORMAT_R32G32_SFLOAT, /* VECTOR2 */
VK_FORMAT_R32G32B32_SFLOAT, /* VECTOR3 */ VK_FORMAT_R32G32B32_SFLOAT, /* VECTOR3 */
VK_FORMAT_R32G32B32A32_SFLOAT, /* VECTOR4 */ VK_FORMAT_R32G32B32A32_SFLOAT, /* VECTOR4 */
@ -5849,7 +5848,8 @@ static Refresh_GraphicsPipeline* VULKAN_CreateGraphicsPipeline(
pipelineCreateInfo->rasterizerState.depthBiasClamp; pipelineCreateInfo->rasterizerState.depthBiasClamp;
rasterizationStateCreateInfo.depthBiasSlopeFactor = rasterizationStateCreateInfo.depthBiasSlopeFactor =
pipelineCreateInfo->rasterizerState.depthBiasSlopeFactor; pipelineCreateInfo->rasterizerState.depthBiasSlopeFactor;
rasterizationStateCreateInfo.lineWidth = 1.0f; rasterizationStateCreateInfo.lineWidth =
pipelineCreateInfo->rasterizerState.lineWidth;
/* Multisample */ /* Multisample */

View File

@ -61,9 +61,8 @@
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>REFRESH_DRIVER_D3D11;REFRESH_DRIVER_VULKAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>REFRESH_DRIVER_D3D11;REFRESH_DRIVER_VULKAN;SPIRV_CROSS_C_API_GLSL;SPIRV_CROSS_C_API_HLSL;SPIRV_CROSS_C_API_REFLECT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\SPIRV-Cross;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>DebugFull</GenerateDebugInformation> <GenerateDebugInformation>DebugFull</GenerateDebugInformation>
@ -74,11 +73,10 @@
<ClCompile> <ClCompile>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization> <Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>REFRESH_DRIVER_D3D11;REFRESH_DRIVER_VULKAN;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>REFRESH_DRIVER_D3D11;REFRESH_DRIVER_VULKAN;SPIRV_CROSS_C_API_GLSL;SPIRV_CROSS_C_API_HLSL;SPIRV_CROSS_C_API_REFLECT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking> <FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions> <IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\SPIRV-Cross;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</AdditionalIncludeDirectories>
</ClCompile> </ClCompile>
<Link> <Link>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
@ -87,6 +85,14 @@
</Link> </Link>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\SPIRV-Cross\spirv_cfg.cpp" />
<ClCompile Include="..\SPIRV-Cross\spirv_cross.cpp" />
<ClCompile Include="..\SPIRV-Cross\spirv_cross_c.cpp" />
<ClCompile Include="..\SPIRV-Cross\spirv_cross_parsed_ir.cpp" />
<ClCompile Include="..\SPIRV-Cross\spirv_glsl.cpp" />
<ClCompile Include="..\SPIRV-Cross\spirv_hlsl.cpp" />
<ClCompile Include="..\SPIRV-Cross\spirv_parser.cpp" />
<ClCompile Include="..\SPIRV-Cross\spirv_reflect.cpp" />
<ClCompile Include="..\src\Refresh.c" /> <ClCompile Include="..\src\Refresh.c" />
<ClCompile Include="..\src\Refresh_Driver_D3D11.c" /> <ClCompile Include="..\src\Refresh_Driver_D3D11.c" />
<ClCompile Include="..\src\Refresh_Driver_Vulkan.c" /> <ClCompile Include="..\src\Refresh_Driver_Vulkan.c" />

View File

@ -13,6 +13,30 @@
<ClCompile Include="..\src\Refresh_Driver_D3D11.c"> <ClCompile Include="..\src\Refresh_Driver_D3D11.c">
<Filter>Source Files</Filter> <Filter>Source Files</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\SPIRV-Cross\spirv_cfg.cpp">
<Filter>Source Files\spirv-cross</Filter>
</ClCompile>
<ClCompile Include="..\SPIRV-Cross\spirv_cross.cpp">
<Filter>Source Files\spirv-cross</Filter>
</ClCompile>
<ClCompile Include="..\SPIRV-Cross\spirv_cross_c.cpp">
<Filter>Source Files\spirv-cross</Filter>
</ClCompile>
<ClCompile Include="..\SPIRV-Cross\spirv_cross_parsed_ir.cpp">
<Filter>Source Files\spirv-cross</Filter>
</ClCompile>
<ClCompile Include="..\SPIRV-Cross\spirv_glsl.cpp">
<Filter>Source Files\spirv-cross</Filter>
</ClCompile>
<ClCompile Include="..\SPIRV-Cross\spirv_hlsl.cpp">
<Filter>Source Files\spirv-cross</Filter>
</ClCompile>
<ClCompile Include="..\SPIRV-Cross\spirv_parser.cpp">
<Filter>Source Files\spirv-cross</Filter>
</ClCompile>
<ClCompile Include="..\SPIRV-Cross\spirv_reflect.cpp">
<Filter>Source Files\spirv-cross</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="..\include\Refresh.h"> <ClInclude Include="..\include\Refresh.h">
@ -38,5 +62,8 @@
<Filter Include="Source Files"> <Filter Include="Source Files">
<UniqueIdentifier>{B2BA146C-CAA1-30BE-B7A9-F8D02673EA0C}</UniqueIdentifier> <UniqueIdentifier>{B2BA146C-CAA1-30BE-B7A9-F8D02673EA0C}</UniqueIdentifier>
</Filter> </Filter>
<Filter Include="Source Files\spirv-cross">
<UniqueIdentifier>{4764626f-fd8b-4a1c-8c20-fd92a1f3cb4b}</UniqueIdentifier>
</Filter>
</ItemGroup> </ItemGroup>
</Project> </Project>