bool valid() const
    {
        EGLWindow *window  = getEGLWindow();
        EGLDisplay display = window->getDisplay();
        if (!eglDisplayExtensionEnabled(display, "EGL_ANGLE_d3d_texture_client_buffer"))
        {
            std::cout << "Test skipped due to missing EGL_ANGLE_d3d_texture_client_buffer"
                      << std::endl;
            return false;
        }

        if (!mD3D11Device && !mD3D9Device)
        {
            std::cout << "Test skipped due to no D3D devices being available." << std::endl;
            return false;
        }

        if (IsWindows() && IsAMD() && IsOpenGL())
        {
            std::cout << "Test skipped on Windows AMD OpenGL." << std::endl;
            return false;
        }

        if (IsWindows() && IsIntel() && IsOpenGL())
        {
            std::cout << "Test skipped on Windows Intel OpenGL." << std::endl;
            return false;
        }
        return true;
    }
Esempio n. 2
0
main( void )
{
    char        rc;

    rc = IsWindows();
    if( rc == 0 || rc == 0x80 ) exit( 0 );
    exit( 1 );
}
Esempio n. 3
0
/*
 * setStupid1c - don't set timer tick interrupt in DOS boxes!!?!?!
 */
static void setStupid1c( void )
{
    if( IsWindows() || _osmajor >= 20 ) {
        noTimer = TRUE;
        return;
    }
    newIntVect( 0x1c, handleInt1c );

} /* setStupid1c */
Esempio n. 4
0
 // todo(jonahr): Eventually could add support for all conditions/operating
 // systems, but these are the ones in use for now
 void validateConfigBase(const GPUTestConfig &config)
 {
     EXPECT_EQ(IsWindows(), config.getConditions()[GPUTestConfig::kConditionWin]);
     EXPECT_EQ(IsOSX(), config.getConditions()[GPUTestConfig::kConditionMac]);
     EXPECT_EQ(IsLinux(), config.getConditions()[GPUTestConfig::kConditionLinux]);
     EXPECT_EQ(IsAndroid(), config.getConditions()[GPUTestConfig::kConditionAndroid]);
     EXPECT_EQ(IsNexus5X(), config.getConditions()[GPUTestConfig::kConditionNexus5X]);
     EXPECT_EQ(IsPixel2(), config.getConditions()[GPUTestConfig::kConditionPixel2]);
     EXPECT_EQ(IsIntel(), config.getConditions()[GPUTestConfig::kConditionIntel]);
     EXPECT_EQ(IsAMD(), config.getConditions()[GPUTestConfig::kConditionAMD]);
     EXPECT_EQ(IsNVIDIA(), config.getConditions()[GPUTestConfig::kConditionNVIDIA]);
     EXPECT_EQ(IsDebug(), config.getConditions()[GPUTestConfig::kConditionDebug]);
     EXPECT_EQ(IsRelease(), config.getConditions()[GPUTestConfig::kConditionRelease]);
 }
int CEstrangedSystemCaps::GetCaps( void )
{
	int systemCaps = ( CAPS_MATERIAL_POSTPROCESS | CAPS_SHADER_POSTPROCESS | CAPS_ESTRANGED_DEPTHPASS | CAPS_SHADOW_DEPTHPASS );

	// If we're in the middle of building cubemaps
	ConVarRef building_cubemaps("building_cubemaps");
	if ( building_cubemaps.GetBool() )
	{
		systemCaps &= ~CAPS_ESTRANGED_DEPTHPASS;
		systemCaps &= ~CAPS_SHADER_POSTPROCESS;
		systemCaps &= ~CAPS_MATERIAL_POSTPROCESS;
	}

	// Check for null-ness...
	if ( g_pMaterialSystemHardwareConfig )
	{
		// If we don't support shader model 3.0
		if ( !g_pMaterialSystemHardwareConfig->SupportsShaderModel_3_0() )
		{
			systemCaps &= ~CAPS_ESTRANGED_DEPTHPASS;
		}

		// If we support fetch4 (ATI)
		if ( g_pMaterialSystemHardwareConfig->SupportsFetch4() )
		{
			systemCaps &= ~CAPS_ESTRANGED_DEPTHPASS;
		}

		// If we use ATI depth formats
		int shadowFilterMode = g_pMaterialSystemHardwareConfig->GetShadowFilterMode();
		if ( shadowFilterMode != NVIDIA_PCF_POISSON && ( shadowFilterMode == ATI_NO_PCF_FETCH4 || shadowFilterMode == ATI_NOPCF ) )
		{
			systemCaps &= ~CAPS_ESTRANGED_DEPTHPASS;
		}

		// If we're not running with DirectX 9
		if ( g_pMaterialSystemHardwareConfig->GetDXSupportLevel() < 90 )
		{
			systemCaps &= ~CAPS_SHADER_POSTPROCESS;
			systemCaps &= ~CAPS_ESTRANGED_DEPTHPASS;
			systemCaps &= ~CAPS_SHADOW_DEPTHPASS;
		}

		// If we're not running with DirectX 8
		if ( g_pMaterialSystemHardwareConfig->GetDXSupportLevel() < 80 )
		{
			systemCaps &= ~CAPS_MATERIAL_POSTPROCESS;
		}
	}

	// If we're not Windows
	if ( !IsWindows() )
	{
		systemCaps &= ~CAPS_ESTRANGED_DEPTHPASS;
	}

	// ae - temporary bugfix: disable shader
	// post processing on mac
	if ( IsOSX() )
	{
		systemCaps &= ~CAPS_SHADER_POSTPROCESS;
	}

	// If we're in VR mode
	if ( UseVR() )
	{
		systemCaps &= ~CAPS_ESTRANGED_DEPTHPASS;
		systemCaps &= ~CAPS_SHADER_POSTPROCESS;
	}

	// Check null
	if ( materials )
	{
		// If we don't support shadow depth textures
		if ( !materials->SupportsShadowDepthTextures() )
		{
			systemCaps &= ~CAPS_SHADOW_DEPTHPASS;
		}
	}

	return systemCaps;
}