Hello,
I have an Windows Phone 8 app in which I use automated mipmap generation. I managed to integrate the adreno profiler ( include the D3D11_AP.h header and cpp files and D3D11_AP_WP8.dll ) into my project ,it succeeds to create the textures(with automated mipmap generation enabled and disabled) using the CreateTexture2D( http://msdn.microsoft.com/en-us/library/windows/desktop/ff476521(v=vs.85).aspx ) but when it gets to the UpdateSubresource( http://msdn.microsoft.com/en-us/library/windows/desktop/ff476486(v=vs.85).aspx ) method it crashes :
D3D11 ERROR: ID3D11Device::CreateTexture2D: D3D11_RESOURCE_MISC_GENERATE_MIPS requires that the D3D11_BIND_RENDER_TARGET & D3D11_BIND_SHADER_RESOURCE flag be set. [ STATE_CREATION ERROR #103: CREATETEXTURE2D_INVALIDMISCFLAGS]
D3D11 ERROR: ID3D11Device::CreateTexture2D: Returning E_INVALIDARG, meaning invalid parameters were passed. [ STATE_CREATION ERROR #104: CREATETEXTURE2D_INVALIDARG_RETURN]
This only happens when I include the adreno profiler, without it the app doesn't crash and it renders what it should. So this means either there is a problem with how I am using or how I integrated the profiler ( although I followed the steps in the documentation ) or the problem comes from the D3D11_AP_WP8.dll .
If I disable the automated mipmap generation on textures, there is no crash. I manage to connect to the app, but I need all the textures in order to profile.
Has anyone else encountered this? Is this a known issue? Does a workaround exist?
We'll need to investigate this issue further. There are a number of DX items with the Adreno Profiler that we are actively addressing.