I'm trying to render some clouds using compute shader. Somehow it doesn't load the resource, no debugging indicates any errors as well. here's my weather texture loading mechanism.
void SkyClouds::CreateWeatherTexture()
{
ComPtr<ID3D12Resource> texture = nullptr;
ResourceUploadBatch resourceUpload(md3dDevice.Get());
resourceUpload.Begin(D3D12_COMMAND_LIST_TYPE_COMPUTE);
ThrowIfFailed(CreateWICTextureFromFile(md3dDevice.Get(), resourceUpload, L"Resources\\Clouds\\WeatherTexture.png", texture.GetAddressOf(), true));
resourceUpload.Transition(texture.Get(), D3D12_RESOURCE_STATE_COPY_DEST, D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE);
auto uploadResourcesFinished = resourceUpload.End(mCommandQueue.Get());
uploadResourcesFinished.wait();
D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc = {};
srvDesc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
srvDesc.Format = texture->GetDesc().Format;
srvDesc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
srvDesc.Texture2D.MipLevels = 1;
CD3DX12_CPU_DESCRIPTOR_HANDLE srvHandle(mSrvWeatherHeap->GetCPUDescriptorHandleForHeapStart());
md3dDevice->CreateShaderResourceView(texture.Get(), &srvDesc, srvHandle);
}
Can anyone spot the problem even chatgpt says it seems to be correct? all commandlist, commandqueue are in compute pipeline