| 1910 | } |
| 1911 | |
| 1912 | void VulkanPipelineStateViewer::setState() |
| 1913 | { |
| 1914 | if(!m_Ctx.IsCaptureLoaded()) |
| 1915 | { |
| 1916 | clearState(); |
| 1917 | return; |
| 1918 | } |
| 1919 | |
| 1920 | // cache latest state of these checkboxes |
| 1921 | m_ShowUnused = ui->showUnused->isChecked(); |
| 1922 | m_ShowEmpty = ui->showEmpty->isChecked(); |
| 1923 | |
| 1924 | m_CombinedImageSamplers.clear(); |
| 1925 | |
| 1926 | const VKPipe::State &state = *m_Ctx.CurVulkanPipelineState(); |
| 1927 | const ActionDescription *action = m_Ctx.CurAction(); |
| 1928 | |
| 1929 | bool showUnused = ui->showUnused->isChecked(); |
| 1930 | bool showEmpty = ui->showEmpty->isChecked(); |
| 1931 | |
| 1932 | const QPixmap &tick = Pixmaps::tick(this); |
| 1933 | const QPixmap &cross = Pixmaps::cross(this); |
| 1934 | |
| 1935 | bool usedBindings[128] = {}; |
| 1936 | |
| 1937 | // highlight the appropriate stages in the flowchart |
| 1938 | if(action == NULL) |
| 1939 | { |
| 1940 | QList<bool> allOn; |
| 1941 | for(int i = 0; i < ui->pipeFlow->stageNames().count(); i++) |
| 1942 | allOn.append(true); |
| 1943 | ui->pipeFlow->setStagesEnabled(allOn); |
| 1944 | } |
| 1945 | else if(action->flags & ActionFlags::Dispatch) |
| 1946 | { |
| 1947 | QList<bool> computeOnly; |
| 1948 | for(int i = 0; i < ui->pipeFlow->stageNames().count(); i++) |
| 1949 | computeOnly.append(false); |
| 1950 | computeOnly.back() = true; |
| 1951 | ui->pipeFlow->setStagesEnabled(computeOnly); |
| 1952 | } |
| 1953 | else if(action->flags & ActionFlags::MeshDispatch) |
| 1954 | { |
| 1955 | setNewMeshPipeFlow(); |
| 1956 | ui->pipeFlow->setStagesEnabled( |
| 1957 | {state.taskShader.resourceId != ResourceId(), true, true, true, true, false}); |
| 1958 | } |
| 1959 | else |
| 1960 | { |
| 1961 | bool xfbActive = !state.transformFeedback.buffers.isEmpty(); |
| 1962 | |
| 1963 | bool raster = true; |
| 1964 | |
| 1965 | if(state.rasterizer.rasterizerDiscardEnable) |
| 1966 | { |
| 1967 | raster = false; |
| 1968 | } |
| 1969 |
nothing calls this directly
no test coverage detected