zengqh / slimdx

Automatically exported from code.google.com/p/slimdx
0 stars 0 forks source link

SlimDX.DXGI.DXGIException, DXGI_ERROR_UNSUPPORTED on FrameStatistics #284

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
First of all i'm french so don't look at language fault 

i'm using the following release : 2.0.3.37 (AssemblyInfo.cpp)

How to throw it ?
build and run in debug mode the project "MiniTri" in Direct3D10
and I just add those 2 lines :
DXGI.FrameStatistics frameStatistics = SwapChain.FrameStatistics;
                RenderForm.Text =
frameStatistics.PresentRefreshCount.ToString();

in the sub : 
static void Application_Idle(object sender, EventArgs e)

just after the line :
SwapChain.Present(0, DXGI.PresentFlags.None);

then an exception occurs
after looking the code in slim Dx 
the problem come from this line :
RECORD_DXGI( InternalPointer->GetFrameStatistics( &stats ) );
(file SwapChain.cpp line 112)

so i try with 
InternalPointer->GetFrameStatistics( &stats );
and it "works" (all values are always 0 but no exceptions)
so I trace "RECORD_DXGI"
and it seems that :

return Record<T>( hr, hr < 0 );

always have "hr" parameter negative and the function called il like that :
Result Result::Record( int hr, bool failed )
so "failed" is always set to true i can't tell more about it cause i have a
message that said me something that i'll try to translate :
"No source code avalaible at this place"
and offer me the choice to switch to ASM code display

I think that's all i'll can do for this problem

I also don't understand why FrameStatistic always return "0" value for each
fields if it's link to the error ... ok why not
but it doesn't seem like that
not yet implemented in Dx10 ? other reason ?

Original issue reported on code.google.com by TeB...@gmail.com on 18 Jun 2008 at 12:53

GoogleCodeExporter commented 9 years ago
DXGI_ERROR_UNSUPPORTED means your card cannot perform the requested action 
because it
lacks hardware suppport for the action (potentially in the current state of the
application). The fact that you are getting an exception from 
GetFrameStatistics is
correct if the HRESULT is DXGI_ERROR_UNSUPPORTED, as that is an error. 

This is not a bug. Closing.

Original comment by josh.petrie on 18 Jun 2008 at 3:11