Permalink
Browse files

Minor cleanup. Add a debug assert in shader ID calculation

  • Loading branch information...
hrydgard committed Dec 1, 2017
1 parent e29f904 commit be115822f71177dc8db6b6e27471a30896e4fdc3
Showing with 5 additions and 4 deletions.
  1. +3 −0 GPU/Common/ShaderId.cpp
  2. +0 −3 GPU/Vulkan/FramebufferVulkan.cpp
  3. +2 −1 GPU/Vulkan/GPU_Vulkan.cpp
@@ -143,6 +143,9 @@ void ComputeVertexShaderID(ShaderID *id_out, u32 vertType, bool useHWTransform)
id.SetBit(VS_BIT_FLATSHADE, doFlatShading);
// These two bits cannot be combined, otherwise havoc occurs. We get reports that indicate this happened somehow... "ERROR: 0:14: 'u_proj' : undeclared identifier"
_dbg_assert_msg_(G3D, !id.Bit(VS_BIT_USE_HW_TRANSFORM) || !id.Bit(VS_BIT_IS_THROUGH), "Can't have both THROUGH and USE_HW_TRANSFORM together!");
*id_out = id;
}
@@ -583,8 +583,6 @@ void FramebufferManagerVulkan::EndFrame() {
}
void FramebufferManagerVulkan::DeviceLost() {
vulkan2D_->DeviceLost();
DestroyAllFBOs();
DestroyDeviceObjects();
}
@@ -593,7 +591,6 @@ void FramebufferManagerVulkan::DeviceRestore(VulkanContext *vulkan, Draw::DrawCo
vulkan_ = vulkan;
draw_ = draw;
vulkan2D_->DeviceRestore(vulkan_);
InitDeviceObjects();
}
@@ -609,8 +609,8 @@ void GPU_Vulkan::DestroyDeviceObjects() {
void GPU_Vulkan::DeviceLost() {
DestroyDeviceObjects();
framebufferManagerVulkan_->DeviceLost();
vulkan2D_.DeviceLost();
drawEngine_.DeviceLost();
pipelineManager_->DeviceLost();
textureCacheVulkan_->DeviceLost();
@@ -628,6 +628,7 @@ void GPU_Vulkan::DeviceRestore() {
UpdateCmdInfo();
framebufferManagerVulkan_->DeviceRestore(vulkan_, draw_);
vulkan2D_.DeviceRestore(vulkan_);
drawEngine_.DeviceRestore(vulkan_, draw_);
pipelineManager_->DeviceRestore(vulkan_);
textureCacheVulkan_->DeviceRestore(vulkan_, draw_);

0 comments on commit be11582

Please sign in to comment.