Merge pull request #85 from chrisps/canary_experimental

Kernel improvements, "fix" crash on sandy bridge/ivy bridge
This commit is contained in:
Radosław Gliński
2022-10-21 14:18:03 +02:00
committed by GitHub
12 changed files with 88 additions and 58 deletions

View File

@@ -4355,7 +4355,7 @@ bool D3D12CommandProcessor::UpdateBindings(
uint32_t float_constant_index;
while (xe::bit_scan_forward(float_constant_map_entry,
&float_constant_index)) {
float_constant_map_entry &= ~(1ull << float_constant_index);
float_constant_map_entry = xe::clear_lowest_bit(float_constant_map_entry);
std::memcpy(float_constants,
&regs[XE_GPU_REG_SHADER_CONSTANT_000_X + (i << 8) +
(float_constant_index << 2)]
@@ -4386,7 +4386,7 @@ bool D3D12CommandProcessor::UpdateBindings(
uint32_t float_constant_index;
while (xe::bit_scan_forward(float_constant_map_entry,
&float_constant_index)) {
float_constant_map_entry &= ~(1ull << float_constant_index);
float_constant_map_entry = xe::clear_lowest_bit(float_constant_map_entry);
std::memcpy(float_constants,
&regs[XE_GPU_REG_SHADER_CONSTANT_256_X + (i << 8) +
(float_constant_index << 2)]
@@ -4877,7 +4877,7 @@ bool D3D12CommandProcessor::UpdateBindings_BindfulPath(
bool& retflag) {
retflag = true;
auto& provider = this->GetD3D12Provider();
size_t texture_count_pixel = textures_pixel->size();
size_t texture_count_pixel = textures_pixel ? textures_pixel->size() : 0;
size_t texture_count_vertex = textures_vertex.size();
//
// Bindful descriptors path.

View File

@@ -680,9 +680,6 @@ class D3D12CommandProcessor final : public CommandProcessor {
ID3D12Resource* readback_buffer_ = nullptr;
uint32_t readback_buffer_size_ = 0;
std::atomic<bool> pix_capture_requested_ = false;
bool pix_capturing_;
// The current fixed-function drawing state.
D3D12_VIEWPORT ff_viewport_;
D3D12_RECT ff_scissor_;
@@ -776,6 +773,9 @@ class D3D12CommandProcessor final : public CommandProcessor {
// scratch memexport data
MemExportRange memexport_ranges_[512];
uint32_t memexport_range_count_ = 0;
std::atomic<bool> pix_capture_requested_ = false;
bool pix_capturing_;
};
} // namespace d3d12

View File

@@ -150,8 +150,8 @@ SharedMemory::WatchHandle SharedMemory::WatchMemoryRange(
watch_page_first << page_size_log2_ >> kWatchBucketSizeLog2;
uint32_t bucket_last =
watch_page_last << page_size_log2_ >> kWatchBucketSizeLog2;
auto global_lock = global_critical_region_.Acquire();
//chrispy: Not required the global lock is always held by the caller
// auto global_lock = global_critical_region_.Acquire();
// Allocate the range.
WatchRange* range = watch_range_first_free_;