Esempio n. 1
0
/*===========================================================================*/
extern "C" void SwapBuffersHAL( PMESAD3DSHARED pShared )
{
  PMESAD3DHAL	pHAL = (PMESAD3DHAL)pShared;

#ifdef D3D_DEBUG
  HRESULT		rc;      

  DPF(( DBG_FUNC, "SwapBuffersHAL();" ));
  DPF(( DBG_ALL_PROFILE, "=================SWAP===================" ));

  /* Make sure we have enough info. */
  if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )
    return;

  /* Make sure we have enough info. */
  if ( pHAL->lpDDSPrimary != NULL )
  {
    rc = pHAL->lpD3DDevice->EndScene();   
    if ( FAILED(rc) )
    {
	 RIP( pHAL, "EndScene ->", ErrorStringD3D(rc) );
    }
 
    if ( pShared->bFlipable )
    {
	 DPF(( DBG_CNTX_PROFILE, "Swap->FLIP" ));
	 rc = pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT );
    }
    else
    {
	 DPF(( DBG_CNTX_PROFILE, "Swap->Blt" ));
	 rc = pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL );
    }
    if ( FAILED(rc) )
    {
	 RIP( pHAL, "Blt (RENDER/PRIMARY) ->", ErrorStringD3D(rc) );
    }

    rc = pHAL->lpD3DDevice->BeginScene(); 
    if ( FAILED(rc) )
    {
	 RIP( pHAL, "BeginScene ->", ErrorStringD3D(rc) );
    }
  }
#else
  pHAL->lpD3DDevice->EndScene();   

  if ( pShared->bFlipable )
    pHAL->lpDDSPrimary->Flip( NULL, DDFLIP_WAIT );
  else
    pHAL->lpDDSPrimary->Blt( &pShared->rectW, pHAL->lpDDSRender, NULL, DDBLT_WAIT, NULL );

  pHAL->lpD3DDevice->BeginScene(); 

#endif
}
Esempio n. 2
0
BOOL DrvSetPalette (DHPDEV dhpdev,
                    PALOBJ *ppalo,
                    FLONG  fl,
                    ULONG  iStart,
                    ULONG  cColors)
{
    BYTE ajClutSpace[MAX_CLUT_SIZE];
    PVIDEO_CLUT pScreenClut = (PVIDEO_CLUT) ajClutSpace;
    PPALETTEENTRY pape;
    ULONG ulTemp = 256;

    UNREFERENCED_PARAMETER (fl);

    DISPBLTDBG ((1, "TGA.DLL!DrvSetPalette - Entry\n"));
    DISPBLTDBG ((2, "TGA.DLL!DrvSetPalette - ppalo [%x], fl [%x], iStart [%d], cColors [%d]\n", ppalo, fl, iStart, cColors));

    // Fill in pScreenClut header info

    pScreenClut->NumEntries = (USHORT)cColors;
    pScreenClut->FirstEntry = (USHORT)iStart;

    pape = (PPALETTEENTRY) (pScreenClut->LookupTable);

    if (cColors != PALOBJ_cGetColors (ppalo, iStart, cColors, (PULONG) pape))
    {
        RIP ("DISP DrvSetPalette failed PALOBJ_cGetColors\n");
        return FALSE;
    }

    // Set the high reserved byte in each palette entry to 0.

    while (cColors--)
        pape[cColors].peFlags = 0;

    // Set palette registers

    if (EngDeviceIoControl (((PPDEV)(dhpdev))->hDriver,
                           IOCTL_VIDEO_SET_COLOR_REGISTERS,
                           pScreenClut,
                           MAX_CLUT_SIZE,
                           NULL,
                           0,
                          &cColors))
    {
        RIP ("DISP DrvSetPalette failed EngDeviceIoControl\n");
        return FALSE;
    }

    DISPBLTDBG ((1, "TGA.DLL!DrvSetPalette - Exit\n"));

    return TRUE;
}
Esempio n. 3
0
/*===========================================================================*/
extern "C" void DrawPrimitiveHAL( PMESAD3DSHARED pShared, D3DPRIMITIVETYPE dptPrimitiveType, D3DTLVERTEX *pVertices, DWORD dwCount )
{
  PMESAD3DHAL	pHAL = (PMESAD3DHAL)pShared;

#ifdef D3D_DEBUG
  HRESULT		rc;      

  DPF(( DBG_FUNC, "DrawPrimitveHAL();" ));

  /* Make sure we have enough info. */
  if ( (pHAL == NULL) || (pHAL->lpD3DDevice == NULL) )
    return;

  DPF(( DBG_PRIM_INFO, "DP( %d )", dwCount ));

  rc = pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType,
								 D3DFVF_TLVERTEX,
								 (LPVOID)pVertices,
								 dwCount, 
								 (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );
  if ( FAILED(rc) )
  {
    RIP( pHAL, "DrawPrimitive ->", ErrorStringD3D(rc) );
  }
#else
  pHAL->lpD3DDevice->DrawPrimitive( dptPrimitiveType,
							 D3DFVF_TLVERTEX,
							 (LPVOID)pVertices,
							 dwCount, 
							 (D3DDP_DONOTCLIP | D3DDP_DONOTLIGHT) );
#endif
}
Esempio n. 4
0
static void load_state_from_tss32(CPUState *cpu, struct x86_tss_segment32 *tss)
{
    X86CPU *x86_cpu = X86_CPU(cpu);
    CPUX86State *env = &x86_cpu->env;

    wvmcs(cpu->hvf_fd, VMCS_GUEST_CR3, tss->cr3);

    RIP(env) = tss->eip;
    EFLAGS(env) = tss->eflags | 2;

    /* General purpose registers */
    RAX(env) = tss->eax;
    RCX(env) = tss->ecx;
    RDX(env) = tss->edx;
    RBX(env) = tss->ebx;
    RSP(env) = tss->esp;
    RBP(env) = tss->ebp;
    RSI(env) = tss->esi;
    RDI(env) = tss->edi;

    vmx_write_segment_selector(cpu, (x68_segment_selector){{tss->ldt}}, R_LDTR);
    vmx_write_segment_selector(cpu, (x68_segment_selector){{tss->es}}, R_ES);
    vmx_write_segment_selector(cpu, (x68_segment_selector){{tss->cs}}, R_CS);
    vmx_write_segment_selector(cpu, (x68_segment_selector){{tss->ss}}, R_SS);
    vmx_write_segment_selector(cpu, (x68_segment_selector){{tss->ds}}, R_DS);
    vmx_write_segment_selector(cpu, (x68_segment_selector){{tss->fs}}, R_FS);
    vmx_write_segment_selector(cpu, (x68_segment_selector){{tss->gs}}, R_GS);
}
Esempio n. 5
0
VOID vOutFifoPseudoD(
PDEV*   ppdev,
VOID*   p,
ULONG   v)
{
    ULONG ulMiscState;

    ASSERTDD(!(ppdev->flCaps & CAPS_MM_IO),
        "No pseudo 32-bit writes when using memory-mapped I/O");
    ASSERTDD(ppdev->iBitmapFormat == BMF_32BPP,
        "We're trying to do 32bpp output while not in 32bpp mode");

    IO_GP_WAIT(ppdev);                  // Wait so we don't interfere with any
                                        //   pending commands waiting on the
                                        //   FIFO
    IO_READ_SEL(ppdev, 6);              // We'll be reading index 0xE
    IO_GP_WAIT(ppdev);                  // Wait until that's processed
    IO_RD_REG_DT(ppdev, ulMiscState);   // Read ulMiscState

    ASSERTDD((ulMiscState & 0x10) == 0,
            "Register select flag is out of sync");

    gcFifo -= 2;
    if (gcFifo < 0)
    {
        gcFifo = 0;
        RIP("Incorrect FIFO wait count");
    }

    OUT_PSEUDO_DWORD(p, v);
}
Esempio n. 6
0
File: DES.cpp Progetto: NerRo8/DES
void DES::Description() {
	IP();
	for (int i = 0; i < 16; i++) {
		string test = "";
		test = R;
		L = xor(L, F(15 - i));
		R = L;
		L = test;
	}
	bmsg = R + L;
	RIP();

	cout<<bmsg<<endl;
	ofstream file;
	file.open("Description.txt");
	file << bmsg << endl;
	for (int i = 0; i < 64; i += 8) {
		string val = "";
		for (int j = i; j < i + 8; j++) {
			val += bmsg[j];
		}
		bitset<CHAR_BIT>sim(val);
		cout << char(sim.to_ulong());
		file << char(sim.to_ulong());
	}
	file.close();
};
Esempio n. 7
0
/*++

Routine Name:

    CXDXpsFilter::InitialiseXDIO

Routine Description:

    This routine initialises the XPS producer and consumer interfaces used by
    all XPS document filters

Arguments:

    None

Return Value:

    HRESULT
    S_OK - On success
    E_*  - On error

--*/
HRESULT
CXDXpsFilter::InitialiseXDIO(
    VOID
    )
{
    VERBOSE("Retrieving Xps producer and consumer.\n");

    HRESULT hr = S_OK;

    //
    // Ensure the produver and consumer are released
    //
    m_pXDReader = NULL;
    m_pXDWriter = NULL;

    if (SUCCEEDED(hr = CHECK_POINTER(m_pInterFltrComm, E_PENDING)))
    {
        //
        // Get the producer and consumer from the filter communicator
        //
        if (SUCCEEDED(hr = m_pInterFltrComm->RequestReader(reinterpret_cast<VOID**>(&m_pXDReader))))
        {
            hr = m_pInterFltrComm->RequestWriter(reinterpret_cast<VOID**>(&m_pXDWriter));
        }

        //
        // If anything went wrong, ensure the produver and consumer are released
        //
        if (FAILED(hr))
        {
            m_pXDReader = NULL;
            m_pXDWriter = NULL;
        }
    }

    //
    // Check interface is as expected. If not then it is likely that
    // the wrong GUID has been defined in the filter configuration file
    //
    if (SUCCEEDED(hr))
    {
        CComPtr<IXpsDocumentProvider> pReaderCheck(NULL);
        CComPtr<IXpsDocumentConsumer> pWriterCheck(NULL);

        if (FAILED(m_pXDReader.QueryInterface(&pReaderCheck)) ||
            FAILED(m_pXDWriter.QueryInterface(&pWriterCheck)))
        {
            RIP("Invalid reader and writer defined - check GUIDs in the filter configuration file\n");

            //
            // Request the pipeline manager shutsdown the filter
            //
            hr = E_FAIL;
            RequestShutdown(hr);
        }
    }

    ERR_ON_HR(hr);
    return hr;
}
Esempio n. 8
0
VOID vAcquireCrtc(PDEV* ppdev)
{
    EngAcquireSemaphore(ppdev->csCrtc);

    if (gbCrtcCriticalSection)
        RIP("Had already acquired Critical Section");
    gbCrtcCriticalSection = TRUE;
}
Esempio n. 9
0
VOID vInvalidStrip(
PDEV*       ppdev,          // unused
STRIP*      pStrip,         // unused
LINESTATE*  pLineState)     // unused
{

    RIP("vInvalidStrip called");
    return;
}
Esempio n. 10
0
BOOL bInit256ColorPalette (PPDEV ppdev)
{
    BYTE ajClutSpace[MAX_CLUT_SIZE];
    PVIDEO_CLUT pScreenClut = (PVIDEO_CLUT) ajClutSpace;
    ULONG  ulReturnedDataLength;

    DISPBLTDBG ((1, "TGA.DLL!bInit256ColorPalette - Entry\n"));

    // Fill in pScreenClut header info

    pScreenClut->NumEntries = 256;
    pScreenClut->FirstEntry = 0;

    // make sure that we have a palette

    if (ppdev->pPal == NULL)
    {
        RIP ("DISP bInit256ColorPalette -- pPal == NULL\n");
        return FALSE;
    }

    // Copy Colors in.

    RtlCopyMemory (pScreenClut->LookupTable, ppdev->pPal, sizeof(ULONG) * 256);

    // Set palette registers

    if (EngDeviceIoControl (ppdev->hDriver,
                           IOCTL_VIDEO_SET_COLOR_REGISTERS,
                           pScreenClut,
                           MAX_CLUT_SIZE,
                           NULL,
                           0,
                          &ulReturnedDataLength))
    {
        RIP ("DISP bInit256ColorPalette failed EngDeviceIoControl\n");
        return FALSE;
    }

    DISPBLTDBG ((1, "TGA.DLL!bInit256ColorPalette - Exit\n"));

    return TRUE;
}
Esempio n. 11
0
USHORT wInpW(BYTE* pjIoBase, ULONG p)
{
    if (((p == CRTC_INDEX) || (p == CRTC_DATA)) &&
        (!gbCrtcCriticalSection))
    {
        RIP("Must have acquired CRTC critical section to access CRTC register");
    }

    CP_EIEIO();
    return(READ_PORT_USHORT(pjIoBase + (p)));
}
Esempio n. 12
0
VOID vOutpW(BYTE* pjIoBase, ULONG p, ULONG v)
{
    if (((p == CRTC_INDEX) || (p == CRTC_DATA)) &&
        (!gbCrtcCriticalSection))
    {
        RIP("Must have acquired CRTC critical section to access CRTC register");
    }

    CP_EIEIO();
    WRITE_PORT_USHORT(pjIoBase + (p), (v));
    CP_EIEIO();
}
Esempio n. 13
0
void*
PakLoadFile(
    PCSTR filename
    )
{
    if (g_pakFile == nullptr)
    {
        RIP(L"Pak file not initialized.\n");
    }

    pak_entry_t* entry = g_entries;
    int count = g_numEntries;
    while (count-- > 0)
    {
        if (_stricmp(entry->filename, filename) == 0)
        {
            break;
        }
        ++entry;
    }
    if (count < 0)
    {
        RIP(L"Filename %s not found in pak.\n", filename);
    }

    if (SetFilePointer(g_pakFile, entry->offset, nullptr, FILE_BEGIN) == 0)
    {
        RIP(L"Failed to seek to file %s in pak file. %d\n", filename, GetLastError());
    }

    unsigned char* data = new unsigned char[entry->length];
    DWORD bytesRead = 0;
    if (!ReadFile(g_pakFile, data, entry->length, &bytesRead, nullptr))
    {
        RIP(L"Error reading file %s from pak file. %d\n", filename, GetLastError());
    }

    return data;
}
Esempio n. 14
0
VOID vWriteFifoD(
VOID*   p,
ULONG   v)
{
    gcFifo--;
    if (gcFifo < 0)
    {
        gcFifo = 0;
        RIP("Incorrect FIFO wait count");
    }

    WRITE_REGISTER_ULONG(p, v);
}
Esempio n. 15
0
VOID vWriteFifoW(
VOID*   p,
ULONG   v)
{
    gcFifo--;
    if (gcFifo < 0)
    {
        gcFifo = 0;
        RIP("Incorrect FIFO wait count");
    }

    WRITE_REGISTER_USHORT(p, (USHORT) v);
}
Esempio n. 16
0
VOID vOutFifoW(
VOID*   p,
ULONG   v)
{
    gcFifo--;
    if (gcFifo < 0)
    {
        gcFifo = 0;
        RIP("Incorrect FIFO wait count");
    }

    WRITE_PORT_USHORT(p, v);
}
Esempio n. 17
0
File: DES.cpp Progetto: NerRo8/DES
void DES::Encription() {
	IP();
	for (int i = 0; i < 16; i++) {
		string test = "";
		test = R;
		L = xor(L, F(i));
		R = L;
		L = test;
	}
	bmsg = R + L;
	RIP();
	cout << bmsg << endl;
	DecBIT();
};
Esempio n. 18
0
uint32_t
PakFileSize(
    PCSTR filename
    )
{
    if (g_pakFile == nullptr)
    {
        RIP(L"Pak file not initialized.\n");
    }

    pak_entry_t* entry = g_entries;
    int count = g_numEntries;
    while (count-- > 0)
    {
        if (_stricmp(entry->filename, filename) == 0)
        {
            return entry->length;
        }
        ++entry;
    }
    RIP(L"Filename %s not found in pak.\n", filename);
    return 0;
}
Esempio n. 19
0
void
PakInit(
    PCWSTR filename
    )
{
    if (g_pakFile != INVALID_HANDLE_VALUE)
    {
        RIP(L"Pak file already initialized.\n");
    }

    g_pakFile = CreateFile(filename, GENERIC_READ, 0, nullptr,
        OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
    if (g_pakFile == INVALID_HANDLE_VALUE)
    {
        RIP(L"Error opening pak file: %s. %d\n", filename, GetLastError());
    }

    pak_fileheader_t header = {};
    DWORD bytesRead = 0;
    if (!ReadFile(g_pakFile, &header, sizeof(header), &bytesRead, nullptr))
    {
        RIP(L"Error reading header from pak file %s. %d\n", filename, GetLastError());
    }

    g_numEntries = header.dirLength / sizeof(pak_entry_t);
    g_entries = new pak_entry_t[g_numEntries];

    if (SetFilePointer(g_pakFile, header.dirOffset, nullptr, FILE_BEGIN) == 0)
    {
        RIP(L"Failed to seek to directory in pak file %s. %d\n", filename, GetLastError());
    }

    if (!ReadFile(g_pakFile, g_entries, header.dirLength, &bytesRead, nullptr))
    {
        RIP(L"Error reading directory from pak file %s. %d\n", filename, GetLastError());
    }
}
Esempio n. 20
0
VOID vIoGpWait(
PDEV*   ppdev)
{
    LONG    i;

    gcFifo = (ppdev->flCaps & CAPS_16_ENTRY_FIFO) ? 16 : 8;

    for (i = LARGE_LOOP_COUNT; i != 0; i--)
    {
        if (!(IO_GP_STAT(ppdev) & HARDWARE_BUSY))
            return;         // It isn't busy
    }

    RIP("vIoGpWait timeout -- The hardware is in a funky state.");
}
Esempio n. 21
0
/*****************************************************************************
 * bFindRadialEllipseIntersection - Calculate the intersection of a radial
 *                                   and an Ellipse.
 *
 *  Play the ArcTo into a path then query the path for the first and
 *  last points on the Arc.
 *****************************************************************************/
BOOL bFindRadialEllipseIntersection(PLOCALDC pLocalDC,
                                    INT x1, INT y1, INT x2, INT y2,
                                    INT x3, INT y3, INT x4, INT y4,
                                    LPPOINT pptStart, LPPOINT pptEnd)
{
BOOL    b;
POINT   ptCP;

	b = FALSE;			// assume failure

// Save the current position in the helper DC.

	if (!GetCurrentPositionEx(pLocalDC->hdcHelper, &ptCP))
	    return(FALSE);

// Do an ArcTo with the same start radial line.

        if (!ArcTo(pLocalDC->hdcHelper, x1, y1, x2, y2, x3, y3, x3, y3))
	    goto exit_bFindRadialEllipseIntersection;

// Get the start point of the arc.  It is the current position.

	if (!GetCurrentPositionEx(pLocalDC->hdcHelper, pptStart))
	    goto exit_bFindRadialEllipseIntersection;

// Continue with the ArcTo with the same end radial line this time.

        if (!ArcTo(pLocalDC->hdcHelper, x1, y1, x2, y2, x4, y4, x4, y4))
	    goto exit_bFindRadialEllipseIntersection;

// Get the end point of the arc.  It is the current position.

	if (!GetCurrentPositionEx(pLocalDC->hdcHelper, pptEnd))
	    goto exit_bFindRadialEllipseIntersection;

// Everything is golden.

	b = TRUE;

exit_bFindRadialEllipseIntersection:

// Restore the current position in the helper DC.

	if (!MoveToEx(pLocalDC->hdcHelper, ptCP.x, ptCP.y, (LPPOINT) NULL))
	    RIP("MF3216: bFindRadialEllipseIntersection, MoveToEx failed");

	return(b);
}
Esempio n. 22
0
VOID vCheckDataComplete(
PDEV*   ppdev)
{
    LONG i;

    // We loop because it may take a while for the hardware to finish
    // digesting all the data we transferred:

    for (i = LARGE_LOOP_COUNT; i > 0; i--)
    {
        if (!(IO_GP_STAT(ppdev) & HARDWARE_BUSY))
            return;
    }

    RIP("Data transfer not complete.");
}
Esempio n. 23
0
VOID vReleaseCrtc(PDEV* ppdev)
{
    // 80x/805i/928 and 928PCI chips have a bug where if I/O registers
    // are left unlocked after accessing them, writes to memory with
    // similar addresses can cause writes to I/O registers.  The problem
    // registers are 0x40, 0x58, 0x59 and 0x5c.  We will simply always
    // leave the index set to an innocuous register (namely, the text
    // mode cursor start scan line):

    OUTP(ppdev->pjIoBase, CRTC_INDEX, 0xa);

    if (!gbCrtcCriticalSection)
        RIP("Hadn't yet acquired Critical Section");
    gbCrtcCriticalSection = FALSE;
    EngReleaseSemaphore(ppdev->csCrtc);
}
Esempio n. 24
0
VOID vNwGpWait(
PDEV*   ppdev,
BYTE*   pjMmBase)
{
    LONG    i;

    gcFifo = 16;

    for (i = LARGE_LOOP_COUNT; i != 0; i--)
    {
        if (!NW_GP_BUSY(ppdev, pjMmBase))
            return;         // It isn't busy
    }

    RIP("vNwGpWait timeout -- The hardware is in a funky state.");
}
Esempio n. 25
0
VOID vIoAllEmpty(
PDEV*   ppdev)
{
    LONG    i;

    ASSERTDD(ppdev->flCaps & CAPS_16_ENTRY_FIFO,
             "Can't call ALL_EMPTY on chips with 8-deep FIFOs");

    gcFifo = 16;

    for (i = LARGE_LOOP_COUNT; i != 0; i--)
    {
        if (IO_GP_STAT(ppdev) & GP_ALL_EMPTY)   // Not implemented on 911/924s
            return;
    }

    RIP("ALL_EMPTY timeout -- The hardware is in a funky state.");
}
Esempio n. 26
0
VOID vIoFifoWait(
PDEV*   ppdev,
LONG    level)
{
    LONG    i;

    ASSERTDD((level > 0) && (level <= 8), "Illegal wait level");

    gcFifo = level;

    for (i = LARGE_LOOP_COUNT; i != 0; i--)
    {
        if (!(IO_FIFO_BUSY(ppdev, level)))
            return;
    }

    RIP("vIoFifoWait timeout -- The hardware is in a funky state.");
}
Esempio n. 27
0
VOID NTAPI vDisableSURF(PPDEV ppdev)
{
    DWORD returnedDataLength;
    VIDEO_MEMORY videoMemory;

    videoMemory.RequestedVirtualAddress = (PVOID) ppdev->pjScreen;

    if (EngDeviceIoControl(ppdev->hDriver,
                           IOCTL_VIDEO_UNMAP_VIDEO_MEMORY,
                           &videoMemory,
                           sizeof(VIDEO_MEMORY),
                           NULL,
                           0,
                           &returnedDataLength))
    {
        RIP("DISP vDisableSURF failed IOCTL_VIDEO_UNMAP\n");
    }
}
Esempio n. 28
0
/*===========================================================================*/
extern "C" void ClearHAL( PMESAD3DSHARED pShared, DWORD dwFlags, BOOL bAll, int x, int y, int cx, int cy, DWORD dwColor, float zv, DWORD dwStencil )
{
  PMESAD3DHAL	pHAL = (PMESAD3DHAL)pShared;
  D3DRECT		d3dRect;

#ifdef D3D_DEBUG
  HRESULT		rc;

  DPF(( DBG_FUNC, "CleaHAL();" ));

  /* Make sure we have enough info. */
  if ( (pHAL == NULL) || (pHAL->lpViewport == NULL) )
    return;
#endif

  if ( bAll )
  {
    /* I assume my viewport is valid. */
    d3dRect.lX1 = pShared->rectV.left;
    d3dRect.lY1 = pShared->rectV.top;
    d3dRect.lX2 = pShared->rectV.right;
    d3dRect.lY2 = pShared->rectV.bottom;
  }
  else
  {
    d3dRect.lX1 = pShared->rectV.left + x;
    d3dRect.lY1 = pShared->rectV.top  + y;
    d3dRect.lX2 = d3dRect.lX1 + cx;
    d3dRect.lY2 = d3dRect.lY1 + cy;
  }

#ifdef D3D_DEBUG
  rc = pHAL->lpViewport->Clear2( 1, &d3dRect, dwFlags, dwColor, zv, dwStencil );
  if ( FAILED(rc) )
  {
    RIP( pHAL, "Clear2 ->", ErrorStringD3D(rc) );
  }
#else
  pHAL->lpViewport->Clear2( 1, &d3dRect, dwFlags, dwColor, zv, dwStencil );
#endif
}
Esempio n. 29
0
VOID vMmFifoWait(
PDEV*   ppdev,
BYTE*   pjMmBase,
LONG    level)
{
    LONG    i;

    // We only enabled MM I/O on the 864/964 and newer, so we can wait
    // for up to 13 FIFO slots:

    ASSERTDD((level > 0) && (level <= 13), "Illegal wait level");

    gcFifo = level;

    for (i = LARGE_LOOP_COUNT; i != 0; i--)
    {
        if (!(MM_FIFO_BUSY(ppdev, pjMmBase, level)))
            return;
    }

    RIP("vMmFifoWait timeout -- The hardware is in a funky state.");
}
Esempio n. 30
0
BOOL DrvAssertMode(
DHPDEV dhpdev,
BOOL bEnable)
{
    PPDEV   ppdev = (PPDEV) dhpdev;
    ULONG   ulReturn;

    if (bEnable)
    {
        //
        // The screen must be reenabled, reinitialize the device to clean state.
        //

        return (bInitSURF(ppdev, FALSE));
    }
    else
    {
        //
        // We must give up the display.
        // Call the kernel driver to reset the device to a known state.
        //

        if (EngDeviceIoControl(ppdev->hDriver,
                               IOCTL_VIDEO_RESET_DEVICE,
                               NULL,
                               0,
                               NULL,
                               0,
                               &ulReturn))
        {
            RIP("DISP DrvAssertMode failed IOCTL");
            return FALSE;
        }
        else
        {
            return TRUE;
        }
    }
}