Merge branch 'master' into vk_vfetch
This commit is contained in:
@@ -534,16 +534,19 @@ bool PipelineCache::SetDynamicState(VkCommandBuffer command_buffer,
|
||||
if (scissor_state_dirty) {
|
||||
int32_t ws_x = regs.pa_sc_window_scissor_tl & 0x7FFF;
|
||||
int32_t ws_y = (regs.pa_sc_window_scissor_tl >> 16) & 0x7FFF;
|
||||
uint32_t ws_w = (regs.pa_sc_window_scissor_br & 0x7FFF) - ws_x;
|
||||
uint32_t ws_h = ((regs.pa_sc_window_scissor_br >> 16) & 0x7FFF) - ws_y;
|
||||
int32_t ws_w = (regs.pa_sc_window_scissor_br & 0x7FFF) - ws_x;
|
||||
int32_t ws_h = ((regs.pa_sc_window_scissor_br >> 16) & 0x7FFF) - ws_y;
|
||||
ws_x += window_offset_x;
|
||||
ws_y += window_offset_y;
|
||||
|
||||
int32_t adj_x = ws_x - std::max(ws_x, 0);
|
||||
int32_t adj_y = ws_y - std::max(ws_y, 0);
|
||||
|
||||
VkRect2D scissor_rect;
|
||||
scissor_rect.offset.x = ws_x;
|
||||
scissor_rect.offset.y = ws_y;
|
||||
scissor_rect.extent.width = ws_w;
|
||||
scissor_rect.extent.height = ws_h;
|
||||
scissor_rect.offset.x = ws_x - adj_x;
|
||||
scissor_rect.offset.y = ws_y - adj_y;
|
||||
scissor_rect.extent.width = std::max(ws_w + adj_x, 0);
|
||||
scissor_rect.extent.height = std::max(ws_h + adj_y, 0);
|
||||
vkCmdSetScissor(command_buffer, 0, 1, &scissor_rect);
|
||||
}
|
||||
|
||||
@@ -1209,16 +1212,12 @@ PipelineCache::UpdateStatus PipelineCache::UpdateInputAssemblyState(
|
||||
// glProvokingVertex(GL_FIRST_VERTEX_CONVENTION);
|
||||
// }
|
||||
|
||||
// Primitive restart index is handled in the buffer cache.
|
||||
if (regs.pa_su_sc_mode_cntl & (1 << 21)) {
|
||||
state_info.primitiveRestartEnable = VK_TRUE;
|
||||
} else {
|
||||
state_info.primitiveRestartEnable = VK_FALSE;
|
||||
}
|
||||
// TODO(benvanik): no way to specify in Vulkan?
|
||||
assert_true(regs.multi_prim_ib_reset_index == 0xFFFF ||
|
||||
regs.multi_prim_ib_reset_index == 0xFFFFFF ||
|
||||
regs.multi_prim_ib_reset_index == 0xFFFFFFFF);
|
||||
// glPrimitiveRestartIndex(regs.multi_prim_ib_reset_index);
|
||||
|
||||
return UpdateStatus::kMismatch;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user