Misplaced Pages

Cg (programming language)

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

Cg (short for C for Graphics ) and High-Level Shader Language (HLSL) are two names given to a high-level shading language developed by Nvidia and Microsoft for programming shaders . Cg/HLSL is based on the C programming language and although they share the same core syntax, some features of C were modified and new data types were added to make Cg/HLSL more suitable for programming graphics processing units .

#65934

84-810: Two main branches of the Cg/HLSL language exist: the Nvidia Cg compiler (cgc) which outputs DirectX or OpenGL and the Microsoft HLSL which outputs DirectX shaders in bytecode format. Nvidia's cgc was deprecated in 2012, with no additional development or support available. HLSL shaders can enable many special effects in both 2D and 3D computer graphics . The Cg/HLSL language originally only included support for vertex shaders and pixel shaders , but other types of shaders were introduced gradually as well: Due to technical advances in graphics hardware, some areas of 3D graphics programming have become quite complex. To simplify

168-414: A device driver . Hardware manufacturers have to write these drivers for a particular DirectX version's device driver interface (or DDI), and test each individual piece of hardware to make them DirectX compatible. Some hardware devices have only DirectX compatible drivers (in other words, one must install DirectX in order to use that hardware). Early versions of DirectX included an up-to-date library of all of

252-584: A "battle" began between supporters of the cross-platform OpenGL and the Windows-only Direct3D. Incidentally, OpenGL was supported at Microsoft by the DirectX team. If a developer chose to use the OpenGL 3D graphics API in computer games , the other APIs of DirectX besides Direct3D were often combined with OpenGL because OpenGL does not include all of DirectX's functionality (such as sound or joystick support). In

336-426: A LLVM-based HLSL compiler, in the form of a frontend for glslang , their GLSL-to-SPIR_V compiler. Support for SPIR-V means that the shaders can be cross-platform, no longer limiting them to a DirectX stack. This task was previously performed by source-level converters like HLSL2GLSL , but the resulting code is often bloated. The PlayStation Shader Language (PSSL) is based on Cg/HLSL. The ReshadeFX shading language

420-502: A base standard. Major scheduled features including GPGPU support ( DirectCompute ), and Direct3D 11 with tessellation support and improved multi-threading support to assist video game developers in developing games that better utilize multi-core processors. Parts of the new API such as multi-threaded resource handling can be supported on Direct3D 9/10/10.1-class hardware. Hardware tessellation and Shader Model 5.0 require Direct3D 11 supporting hardware. Microsoft has since released

504-514: A concrete language can be represented by combining these basic types in LLVM. For example, a class in C++ can be represented by a mix of structures, functions and arrays of function pointers . The LLVM JIT compiler can optimize unneeded static branches out of a program at runtime, and thus is useful for partial evaluation in cases where a program has many options, most of which can easily be determined unneeded in

588-403: A console-specific version, DirectX was used as a basis for Microsoft's Xbox , Xbox 360 and Xbox One console API. The API was developed jointly between Microsoft and Nvidia , which developed the custom graphics hardware used by the original Xbox. The Xbox API was similar to DirectX version 8.1, but is non-updateable like other console technologies. The Xbox was code named DirectXbox, but this

672-639: A cross-platform, window system independent software interface to graphics hardware by Silicon Graphics, Inc. to bring 3D graphics programming into the mainstream of application programming. Besides it could also be used for 2D graphics and imaging and was controlled by the Architectural Review Board (ARB) which included Microsoft. Direct3D was intended to be a Microsoft controlled alternative to OpenGL, focused initially on game use. As 3D gaming grew game developers were discovering that OpenGL could be used effectively for game development. At that point

756-455: A description of how to implement the immediate start of the installation procedure of a software title after inserting its CD-ROM, a feature called AutoPlay, was also part of the SDK. The "Direct" part of the library was so named as these routines bypassed existing core Windows 95 routines and accessed the computer hardware only via a hardware abstraction layer (HAL). Though the team had named it

840-473: A gaming platform in Windows. Alex St. John, the evangelist for DirectX, staged an elaborate event at the 1996 Computer Game Developers Conference which game developer Jay Barnson described as a Roman theme, including real lions , togas, and something resembling an indoor carnival. It was at this event that Microsoft first introduced Direct3D , and demonstrated multiplayer MechWarrior 2 being played over

924-419: A gaming platform, but the three committed towards this project's development. Their rebellious nature led Brad Silverberg , the senior vice president of Microsoft's office products, to name the trio the "Beastie Boys". Most of the work by the three was done among other assigned projects starting near the end of 1994. Within four months and with input from several hardware manufacturers, the team had developed

SECTION 10

#1732855990066

1008-409: A more accessible way for developers to produce shaders. DirectX 9.0c was an update to the original, and has been continuously changed over the years affecting its compatibility with older operating systems. As of January 2007, Windows 2000 and Windows XP became the minimum required operating systems. This means support was officially dropped for Windows 98 and Windows Me. As of August 2024, DirectX 9.0c

1092-586: A previous version's DDI. The application programmer had to query the available hardware capabilities using a complex system of "cap bits" each tied to a particular hardware feature. Direct3D 7 and earlier would work on any version of the DDI, Direct3D 8 requires a minimum DDI level of 6 and Direct3D 9 requires a minimum DDI level of 7. However, the Direct3D 10 runtime in Windows Vista cannot run on older hardware drivers due to

1176-471: A proper 3D hardware driver loaded. In 2011, programs compiled by GCC outperformed those from LLVM by 10%, on average. In 2013, phoronix reported that LLVM had caught up with GCC, compiling binaries of approximately equal performance. LLVM has become an umbrella project containing multiple components. LLVM was originally written to be a replacement for the extant code generator in the GCC stack, and many of

1260-556: A set of functions for common tasks in GPU programming. Some of the functions have equivalents in C, like the mathematical functions abs and sin, while others are specialized in GPU programming tasks, like the texture mapping functions tex1D and tex2D. Cg programs are merely vertex and pixel shaders, and they need supporting programs that handle the rest of the rendering process. Cg can be used with two graphics APIs : OpenGL or DirectX . Each has its own set of Cg functions to communicate with

1344-495: A shader can use. Even if a program is correct, it might be too complex to work on a profile. As the number of profile and shader types cropped up, Microsoft has switched to use the term "Shader Model" to group a set of profiles found in a generation of GPUs. Cg supports some of the newer profiles up to Shader Model 5.0 as well as translation to glsl or hlsl. "32 + 64" for Executed Instructions means "32 texture instructions and 64 arithmetic instructions." As in C, Cg/HLSL features

1428-719: A similar way to their C equivalents. Cg supports a wide range of operators, including the common arithmetic operators from C, the equivalent arithmetic operators for vector and matrix data types, and the common logical operators . Cg shares the basic control structures with C, like if/else, while, and for. It also has a similar way of defining functions. Cg implements many C preprocessor directives and its macro expansion system. It implements #include . Cg programs are built for different shader profiles that stand for GPUs with different capabilities. These profiles decide, among others, how many instructions can be in each shader, how many registers are available, and what kind of resources

1512-624: A single assembly, thus simplifying dependencies on it for software developers, development on this version has subsequently been discontinued, and it is no longer supported. The Managed DirectX 2.0 library expired on October 5, 2006. During the GDC 2006, Microsoft presented the XNA Framework , a new managed version of DirectX (similar but not identical to Managed DirectX) that is intended to assist development of games by making it easier to integrate DirectX, HLSL and other tools in one package. It also supports

1596-462: A specific environment. This feature is used in the OpenGL pipeline of Mac OS X Leopard (v10.5) to provide support for missing hardware features. Graphics code within the OpenGL stack can be left in intermediate representation and then compiled when run on the target machine. On systems with high-end graphics processing units (GPUs), the resulting code remains quite thin, passing the instructions on to

1680-405: A system simultaneously; multi-GPU support was previously dependent on vendor implementations such as AMD CrossFireX or NVIDIA SLI . DirectX 12 is supported on all Fermi and later Nvidia GPUs, on AMD's GCN -based chips and on Intel's Haswell and later processors' graphics units. At SIGGRAPH 2014, Intel released a demo showing a computer generated asteroid field , in which DirectX 12

1764-569: A target platform. LLVM can accept the IR from the GNU Compiler Collection (GCC) toolchain , allowing it to be used with a wide array of extant compiler front-ends written for that project. LLVM can also be built with gcc after version 7.5. LLVM can also generate relocatable machine code at compile-time or link-time or even binary machine code at runtime. LLVM supports a language-independent instruction set and type system . Each instruction

SECTION 20

#1732855990066

1848-496: A team to work on the LLVM system for various uses within Apple's development systems. LLVM has been an integral part of Apple's Xcode development tools for macOS and iOS since Xcode 4 in 2011. In 2006, Lattner started working on a new project named Clang . The combination of Clang frontend and LLVM backend is named Clang/LLVM or simply Clang. The name LLVM was originally an initialism for Low Level Virtual Machine . However,

1932-913: Is PNaCl . The LLVM project also introduces another type of intermediate representation named MLIR which helps build reusable and extensible compiler infrastructure by employing a plugin architecture named Dialect. It enables the use of higher-level information on the program structure in the process of optimization including polyhedral compilation . At version 16, LLVM supports many instruction sets , including IA-32 , x86-64 , ARM , Qualcomm Hexagon , LoongArch , M68K , MIPS , NVIDIA Parallel Thread Execution (PTX, also named NVPTX in LLVM documentation), PowerPC , AMD TeraScale , most recent AMD GPUs (also named AMDGPU in LLVM documentation), SPARC , z/Architecture (also named SystemZ in LLVM documentation), and XCore . Some features are not available on some platforms. Most features are present for IA-32, x86-64, z/Architecture, ARM, and PowerPC. RISC-V

2016-407: Is LLVM's framework for translating machine instructions between textual forms and machine code. Formerly, LLVM relied on the system assembler, or one provided by a toolchain, to translate assembly into machine code. LLVM MC's integrated assembler supports most LLVM targets, including IA-32, x86-64, ARM, and ARM64. For some targets, including the various MIPS instruction sets, integrated assembly support

2100-478: Is a set of compiler and toolchain technologies that can be used to develop a frontend for any programming language and a backend for any instruction set architecture . LLVM is designed around a language-independent intermediate representation (IR) that serves as a portable , high-level assembly language that can be optimized with a variety of transformations over multiple passes. The name LLVM originally stood for Low Level Virtual Machine, though

2184-525: Is aimed at replacing the C/Objective-C compiler in the GCC system with a system that is more easily integrated with integrated development environments (IDEs) and has wider support for multithreading . Support for OpenMP directives has been included in Clang since release 3.8. The Utrecht Haskell compiler can generate code for LLVM. While the generator was in early stages of development, in many cases it

2268-591: Is also based on Cg/HLSL. Shaders written in ReshadeFX are compiled to OpenGL, DX, or Vulkan and injected into games to act as post-processing filters. DirectX Microsoft DirectX is a collection of application programming interfaces (APIs) for handling tasks related to multimedia , especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with "Direct", such as Direct3D , DirectDraw , DirectMusic , DirectPlay , DirectSound , and so forth. The name DirectX

2352-547: Is an incremental update of Direct3D 10.0 which shipped with, and required, Windows Vista Service Pack 1 , which was released in February 2008. This release mainly sets a few more image quality standards for graphics vendors, while giving developers more control over image quality. It also adds support for cube map arrays, separate blend modes per-MRT, coverage mask export from a pixel shader, ability to run pixel shader per sample, access to multi-sampled depth buffers and requires that

2436-594: Is in static single assignment form (SSA), meaning that each variable (called a typed register) is assigned once and then frozen. This helps simplify the analysis of dependencies among variables. LLVM allows code to be compiled statically, as it is under the traditional GCC system, or left for late-compiling from the IR to machine code via just-in-time compilation (JIT), similar to Java . The type system consists of basic types such as integer or floating-point numbers and five derived types : pointers , arrays , vectors , structures , and functions . A type construct in

2520-432: Is mostly obsolete. LLVM currently supports compiling of Ada , C , C++ , D , Delphi , Fortran , Haskell , Julia , Objective-C , Rust , and Swift using various frontends . Widespread interest in LLVM has led to several efforts to develop new frontends for many languages. The one that has received the most attention is Clang, a newer compiler supporting C, C++, and Objective-C. Primarily supported by Apple, Clang

2604-442: Is only available with Windows Vista (launched in late 2006) and later. Previous versions of Windows such as Windows XP are not able to run DirectX 10-exclusive applications. Rather, programs that are run on a Windows XP system with DirectX 10 hardware simply resort to the DirectX 9.0c code path, the latest available for Windows XP computers. Changes for DirectX 10 were extensive. Many former parts of DirectX API were deprecated in

Cg (programming language) - Misplaced Pages Continue

2688-568: Is still regularly updated. Windows XP SP2 and newer include DirectX 9.0c, but may require a newer DirectX runtime redistributable installation for DirectX 9.0c applications compiled with the February 2005 DirectX 9.0 SDK or newer. DirectX 9 had a significant impact on game development. Many games from the mid-2000s to early 2010s were developed using DirectX 9 and it became a standard target for developers. Even today, some games still use DirectX 9 as an option for older or less powerful hardware. A major update to DirectX API, DirectX 10 ships with and

2772-814: Is supported as of version 7. In the past, LLVM also supported other backends, fully or partially, including C backend, Cell SPU , mblaze (MicroBlaze) , AMD R600, DEC/Compaq Alpha ( Alpha AXP ) and Nios2 , but that hardware is mostly obsolete, and LLVM developers decided the support and maintenance costs were no longer justified. LLVM also supports WebAssembly as a target, enabling compiled programs to execute in WebAssembly-enabled environments such as Google Chrome / Chromium , Firefox , Microsoft Edge , Apple Safari or WAVM . LLVM-compliant WebAssembly compilers typically support mostly unmodified source code written in C, C++, D, Rust, Nim, Kotlin and several other languages. The LLVM machine code (MC) subproject

2856-445: Is the most widely publicized component of DirectX, it is common to see the names "DirectX" and "Direct3D" used interchangeably. The DirectX software development kit (SDK) consists of runtime libraries in redistributable binary form, along with accompanying documentation and headers for use in coding. Originally, the runtimes were only installed by games or explicitly by the user. Windows 95 did not launch with DirectX, but DirectX

2940-545: Is usable but still in the beta stage. The lld subproject is an attempt to develop a built-in, platform-independent linker for LLVM. lld aims to remove dependence on a third-party linker. As of May 2017 , lld supports ELF , PE/COFF , Mach-O , and WebAssembly in descending order of completeness. lld is faster than both flavors of GNU ld . Unlike the GNU linkers, lld has built-in support for link-time optimization (LTO). This allows for faster code generation as it bypasses

3024-609: The Cross-platform Audio Creation Tool (XACT), while the DirectX pattern has been continued for Windows APIs such as Direct2D and DirectWrite . Direct3D (the 3D graphics API within DirectX) is widely used in the development of video games for Microsoft Windows and the Xbox line of consoles. Direct3D is also used by other software applications for visualization and graphics tasks such as CAD/CAM engineering. As Direct3D

3108-589: The Microsoft Platform SDK instead. DirectX has been confirmed to be present in Microsoft's Windows Phone 8 . Real-time raytracing was announced as DXR in 2018. Support for compiling HLSL to SPIR-V was also added in the DirectX Shader Compiler the same year. DirectX is composed of multiple APIs: Microsoft has deprecated the following components: DirectX functionality is provided in

3192-553: The Rust compiler, a Java bytecode frontend, a Common Intermediate Language (CIL) frontend, the MacRuby implementation of Ruby 1.9, various frontends for Standard ML , and a new graph coloring register allocator. The core of LLVM is the intermediate representation (IR), a low-level programming language similar to assembly. IR is a strongly typed reduced instruction set computer (RISC) instruction set which abstracts away most details of

3276-479: The University of Illinois at Urbana–Champaign , under the direction of Vikram Adve and Chris Lattner . LLVM was originally developed as a research infrastructure to investigate dynamic compilation techniques for static and dynamic programming languages. LLVM was released under the University of Illinois/NCSA Open Source License , a permissive free software licence . In 2005, Apple Inc. hired Lattner and formed

3360-763: The "Game SDK" ( software development kit ), the name "DirectX" came from one journalist that had mocked the naming scheme of the various libraries. The team opted to continue to use that naming scheme and call the project DirectX. The first version of DirectX was released in September 1995 as the Windows Game SDK. Its DirectDraw component was the Win32 replacement for the DCI and WinG APIs for Windows 3.1 . DirectX allowed all versions of Microsoft Windows, starting with Windows 95, to incorporate high-performance multimedia. Eisler wrote about

3444-568: The AMD outperformed the more powerful Nvidia under DirectX 12. The performance discrepancies may be due to poor Nvidia driver optimizations for DirectX 12, or even hardware limitations of the card which was optimized for DirectX 11 serial execution; however, the exact cause remains unclear. The performance improvements of DirectX 12 on the Xbox are not as substantial as on the PC. In March 2018, DirectX Raytracing (DXR)

Cg (programming language) - Misplaced Pages Continue

3528-481: The Cg program, like setting the current Cg shader, passing parameters, and such tasks. In addition to being able to compile Cg source to assembly code, the Cg runtime also has the ability to compile shaders during execution of the supporting program. This allows the runtime to compile the shader using the latest optimizations available for hardware that the program is currently executing on. However, this technique requires that

3612-421: The Direct3D 11 Technical Preview. Direct3D 11 is a strict superset of Direct3D 10.1 — all hardware and API features of version 10.1 are retained, and new features are added only when necessary for exposing new functionality. This helps to keep backwards compatibility with previous versions of DirectX. Four updates for DirectX 11 were released: DirectX 12 was announced by Microsoft at GDC on March 20, 2014, and

3696-512: The DirectX compatible drivers currently available. This practice was stopped however, in favor of the web-based Windows Update driver-update system, which allowed users to download only the drivers relevant to their hardware, rather than the entire library. Prior to DirectX 10, DirectX runtime was designed to be backward compatible with older drivers, meaning that newer versions of the APIs were designed to interoperate with older drivers written against

3780-510: The GCC frontends have been modified to work with it, resulting in the now-defunct LLVM-GCC suite. The modifications generally involve a GIMPLE -to-LLVM IR step so that LLVM optimizers and codegen can be used instead of GCC's GIMPLE system. Apple was a significant user of LLVM-GCC through Xcode 4.x (2013). This use of the GCC frontend was considered mostly a temporary measure, but with the advent of Clang and advantages of LLVM and Clang's modern and modular codebase (as well as compilation speed),

3864-542: The GPU was needed, so Cg was created to overcome these problems and make shader development easier. Some of the benefits of using Cg over assembly are: Cg has six basic data types. Some of them are the same as in C, while others are especially added for GPU programming. These types are: Cg also features vector and matrix data types that are based on the basic data types, such as float3 and float4x4. Such data types are quite common when dealing with 3D graphics programming. Cg also has struct and array data types , which work in

3948-524: The GPU with minimal changes. On systems with low-end GPUs, LLVM will compile optional procedures that run on the local central processing unit (CPU) that emulate instructions that the GPU cannot run internally. LLVM improved performance on low-end machines using Intel GMA chipsets. A similar system was developed under the Gallium3D LLVMpipe, and incorporated into the GNOME shell to allow it to run without

4032-662: The Internet. The DirectX team faced the challenging task of testing each DirectX release against an array of computer hardware and software . A variety of different graphics cards, audio cards, motherboards, CPUs, input devices, games, and other multimedia applications were tested with each beta and final release. The DirectX team also built and distributed tests that allowed the hardware industry to confirm that new hardware designs and driver releases would be compatible with DirectX. Prior to DirectX Microsoft had added OpenGL to their Windows NT platform. OpenGL had been designed as

4116-622: The LLVM implementation of the C++ Standard Library (with full support of C++11 and C++14 ), etc. LLVM is administered by the LLVM Foundation. Compiler engineer Tanya Lattner became its president in 2014 and was in post as of March 2024 . "For designing and implementing LLVM" , the Association for Computing Machinery presented Vikram Adve, Chris Lattner, and Evan Cheng with the 2012 ACM Software System Award . The project

4200-406: The LLVM project evolved into an umbrella project that has little relationship to what most current developers think of as a virtual machine . This made the initialism "confusing" and "inappropriate", and since 2011 LLVM is "officially no longer an acronym", but a brand that applies to the LLVM umbrella project. The project encompasses the LLVM intermediate representation (IR), the LLVM debugger ,

4284-471: The WinG interface which came bundled with the game, it crashed so frequently on many desktop systems that parents had flooded Disney 's call-in help lines. St. John recognized the resistances for game development under Windows would be a limitation, and recruited two additional engineers, Craig Eisler and Eric Engstrom , to develop a better solution to get more programmers to develop games for Windows. The project

SECTION 50

#1732855990066

4368-472: The Windows environment did not provide the necessary features which were available under MS-DOS using BIOS routines or direct hardware access. There were also strong fears of compatibility; a notable case of this was from Disney's Animated Storybook: The Lion King which was based on the WinG programming interface. Due to numerous incompatible graphics drivers from new Compaq computers that were not tested with

4452-424: The execution of managed code on the Xbox 360. The XNA Game Studio Express RTM was made available on December 11, 2006, as a free download for Windows XP. Unlike the DirectX runtime, Managed DirectX , XNA Framework or the Xbox 360 APIs (XInput, XACT etc.) have not shipped as part of Windows. Developers are expected to redistribute the runtime components along with their games or applications. LLVM LLVM

4536-449: The first published DirectX game. Microsoft promoted the game heavily with Bill Gates appearing in ads for the title. DirectX 2.0 became a built-in component of Windows with the releases of Windows 95 OSR2 and Windows NT 4.0 in mid-1996. Since Windows 95 itself was still new and few games had been released for it, Microsoft engaged in heavy promotion of DirectX to developers who were generally distrustful of Microsoft's ability to build

4620-416: The first set of application programming interfaces (APIs) which they presented at the 1995 Game Developers Conference . The SDK included libraries implementing DirectDraw for bit-mapped graphics, DirectSound for audio, and DirectPlay for communication between players over a network. Furthermore, an extended joystick API already present in Windows 95 was documented for the first time as DirectInput, while

4704-508: The form of COM -style objects and interfaces. Additionally, while not DirectX components themselves, managed objects have been built on top of some parts of DirectX, such as Managed Direct3D and the XNA graphics library on top of Direct3D 9. Microsoft distributes debugging tool for DirectX called "PIX". Introduced by Microsoft in 2002, DirectX 9 was a significant release in the DirectX family. It brought many important features and enhancements to

4788-455: The form of Nvidia's Cg toolkit. Microsoft has released two compilers for HLSL. The original compiler was the closed-source FXC (Effect Compiler), supported until 2015. It was deprecated in favor of the open-source LLVM -based DXC (DirectXShaderCompiler) with support for newer HLSL features. Both compilers generate bytecode: while the older FXC used DXBC, DXC now uses DXIL. DXC can also emit SPIR-V bytecode. The Khronos Group has also written

4872-462: The frenzy to build DirectX 1 through 5 in his blog. To get more developers on board DirectX, Microsoft approached id Software 's John Carmack and offered to port Doom and Doom 2 from MS-DOS to DirectX, free of charge, with id retaining all publishing rights to the game. Carmack agreed, and Microsoft's Gabe Newell led the porting project. The first game was released as Doom 95 in August 1996,

4956-626: The graphics capabilities of Windows. At the time of its release, it supported Windows 98 , Windows Me , Windows 2000 , and Windows XP . As of August 2024 it remains supported by all subsequent versions of Windows for backward compatibility. One of the key features introduced in DirectX 9 was Shader Model 2.0, which included Pixel Shader 2.0 and Vertex Shader 2.0. These allowed for more complex and realistic graphics rendering. It also brought much needed performance improvements through better hardware acceleration capabilities, and better utilization of GPU resources. It also introduced HLSL , which provided

5040-468: The human-readable IR format: The many different conventions used and features provided by different targets mean that LLVM cannot truly produce a target-independent IR and retarget it without breaking some established rules. Examples of target dependence beyond what is explicitly mentioned in the documentation can be found in a 2011 proposal for "wordcode", a fully target-independent variant of LLVM IR intended for online distribution. A more practical example

5124-712: The latest DirectX SDK and are preserved for compatibility only: DirectInput was deprecated in favor of XInput , DirectSound was deprecated in favor of the Cross-platform Audio Creation Tool system (XACT) and additionally lost support for hardware accelerated audio, since the Vista audio stack renders sound in software on the CPU. The DirectPlay DPLAY.DLL was also removed and was replaced with dplayx.dll; games that rely on this DLL must duplicate it and rename it to dplay.dll. In order to achieve backwards compatibility, DirectX in Windows Vista contains several versions of Direct3D: Direct3D 10.1

SECTION 60

#1732855990066

5208-415: The main goal of Direct3D 12 is to achieve "console-level efficiency on phone, tablet and PC". The release of Direct3D 12 comes alongside other initiatives for low-overhead graphics APIs including AMD's Mantle for AMD graphics cards, Apple's Metal for iOS and macOS and Khronos Group 's cross-platform Vulkan . Multiadapter support will feature in DirectX 12 allowing developers to utilize multiple GPUs on

5292-483: The new features in Ultimate includes DirectX Raytracing 1.1 , Variable Rate Shading, which gives programmers control over the level of detail of shading depending on design choices, Mesh Shaders , and Sampler Feedback. The version number as reported by Microsoft's DxDiag tool (version 4.09.0000.0900 and higher) use the x.xx.xxxx.xxxx format for version numbers. However, the DirectX and Windows XP MSDN page claims that

5376-469: The process, new features were added to graphics cards, including the ability to modify their rendering pipelines using vertex and pixel shaders. In the beginning, vertex and pixel shaders were programmed at a very low level with only the assembly language of the graphics processing unit. Although using the assembly language gave the programmer complete control over code and flexibility, it was fairly hard to use. A portable, higher level language for programming

5460-924: The project has expanded and the name is no longer officially an initialism . LLVM is written in C++ and is designed for compile-time , link-time , runtime , and "idle-time" optimization. Originally implemented for C and C++, the language-agnostic design of LLVM has since spawned a wide variety of frontends: languages with compilers that use LLVM (or which do not directly use LLVM but can generate compiled programs as LLVM IR) include ActionScript , Ada , C# for .NET , Common Lisp , PicoLisp , Crystal , CUDA , D , Delphi , Dylan , Forth , Fortran , FreeBASIC , Free Pascal , Halide , Haskell , Idris , Java bytecode , Julia , Kotlin , LabVIEW 's G language, Lua , Objective-C , OpenCL , PostgreSQL 's SQL and PLpgSQL, Ruby , Rust , Scala , Standard ML , Swift , Xojo , and Zig . The LLVM project started in 2000 at

5544-585: The registry always has been in the x.xx.xx.xxxx format. Therefore, when the above table lists a version as '4.09.00.0904' Microsoft's DxDiag tool may have it as '4.09.0000.0904'. Various releases of Windows have included and supported various versions of DirectX, allowing newer versions of the operating system to continue running applications designed for earlier versions of DirectX until those versions can be gradually phased out in favor of newer APIs, drivers, and hardware. APIs such as Direct3D and DirectSound need to interact with hardware, and they do this through

5628-473: The runtime directly uses Direct3D 9 DDI provided in all WDDM drivers. Feature level 11_1 has been introduced with Direct3D 11.1 . In 2002, Microsoft released a version of DirectX compatible with the Microsoft .NET Framework , thus allowing programmers to take advantage of DirectX functionality from within .NET applications using compatible languages such as managed C++ or the use of the C# programming language. This API

5712-508: The significantly updated DDI, which requires a unified feature set and abandons the use of "cap bits". Direct3D 10.1 introduces " feature levels " 10_0 and 10_1, which allow use of only the hardware features defined in the specified version of Direct3D API. Direct3D 11 adds level 11_0 and "10 Level 9" - a subset of the Direct3D 10 API designed to run on Direct3D 9 hardware, which has three feature levels (9_1, 9_2 and 9_3) grouped by common capabilities of "low", "med" and "high-end" video cards;

5796-479: The source code for the shader be available in plain text to the compiler, allowing the user of the program to access the source-code for the shader. Some developers view this as a major drawback of this technique. To avoid exposing the source code of the shader, and still maintain some of the hardware specific optimizations, the concept of profiles was developed. Shaders can be compiled to suit different graphics hardware platforms (according to profiles). When executing

5880-492: The supporting program, the best/most optimized shader is loaded according to its profile. For instance there might be a profile for a graphics card that supports complex pixel shaders, and another profile for one that supports only minimal pixel shaders. By creating a pixel shader for each of these profiles a supporting program enlarges the number of supported hardware platforms without sacrificing picture quality on powerful systems.' The Cg dialect has only ever had one compiler, in

5964-440: The target. For example, the calling convention is abstracted through call and ret instructions with explicit arguments. Also, instead of a fixed set of registers, IR uses an infinite set of temporaries of the form %0, %1, etc. LLVM supports three equivalent forms of IR: a human-readable assembly format, an in-memory format suitable for frontends, and a dense bitcode format for serializing. A simple "Hello, world!" program in

6048-609: The use of a linker plugin, but on the other hand prohibits interoperability with other flavors of LTO. The LLVM project includes an implementation of the C++ Standard Library named libc++, dual-licensed under the MIT License and the UIUC license . Since v9.0.0, it was relicensed to the Apache License 2.0 with LLVM Exceptions. This implements a suite of cache-locality optimizations as well as auto-parallelism and vectorization using

6132-563: The video card supports Shader Model 4.1 or higher and 32-bit floating-point operations. Direct3D 10.1 still fully supports Direct3D 10 hardware, but in order to utilize all of the new features, updated hardware is required. Microsoft unveiled DirectX 11 at the Gamefest 08 event in Seattle. The Final Platform Update launched for Windows Vista on October 27, 2009, which was a week after the initial release of Windows 7 , which launched with Direct3D 11 as

6216-614: Was announced, capable of real-time ray-tracing on supported hardware, and the DXR API was added in the Windows 10 October 2018 update. In 2019 Microsoft announced the arrival of DirectX 12 to Windows 7 but only as a plug-in for certain game titles. Microsoft revealed DirectX 12 Ultimate in March 2020. DirectX 12 Ultimate will unify to a common library on both Windows 10 computers and the Xbox Series X and other ninth-generation Xbox consoles. Among

6300-642: Was claimed to be 50–70% more efficient than DirectX 11 in rendering speed and CPU power consumption. Ashes of the Singularity was the first publicly available game to utilize DirectX 12. Testing by Ars Technica in August 2015 revealed slight performance regressions in DirectX 12 over DirectX 11 mode for the Nvidia GeForce 980 Ti , whereas the AMD Radeon R9 290x achieved consistent performance improvements of up to 70% under DirectX 12, and in some scenarios

6384-587: Was codenamed the Manhattan Project, like the World War II project of the same name , and the idea was to displace the Japanese-developed video game consoles with personal computers running Microsoft's operating system. It had initially used the radiation symbol as its logo but Microsoft asked the team to change the logo. Management did not agree to the project as they were already writing off Windows as

6468-425: Was coined as a shorthand term for all of these APIs (the X standing in for the particular API names) and soon became the name of the collection. When Microsoft later set out to develop a gaming console , the X was used as the basis of the name Xbox to indicate that the console was based on DirectX technology. The X initial has been carried forward in the naming of APIs designed for the Xbox such as XInput and

6552-450: Was included with Windows 95 OEM Service Release 2. Windows 98 and Windows NT 4.0 both shipped with DirectX, as has every version of Windows released since. The SDK is available as a free download. While the runtimes are proprietary, closed-source software, source code is provided for most of the SDK samples. Starting with the release of Windows 8 Developer Preview, DirectX SDK has been integrated into Windows SDK. In late 1994, Microsoft

6636-429: Was known as " Managed DirectX " (or MDX for short), and claimed to operate at 98% of performance of the underlying native DirectX APIs. In December 2005, February 2006, April 2006, and August 2006, Microsoft released successive updates to this library, culminating in a beta version called Managed DirectX 2.0. While Managed DirectX 2.0 consolidated functionality that had previously been scattered over multiple assemblies into

6720-447: Was more efficient than the C code generator. The Glasgow Haskell Compiler (GHC) backend uses LLVM and achieves a 30% speed-up of compiled code relative to native code compiling via GHC or C code generation followed by compiling, missing only one of the many optimizing techniques implemented by the GHC. Many other components are in various stages of development, including, but not limited to,

6804-447: Was officially launched alongside Windows 10 on July 29, 2015. The primary feature highlight for the new release of DirectX was the introduction of advanced low-level programming APIs for Direct3D 12 which can reduce driver overhead. Developers are now able to implement their own command lists and buffers to the GPU, allowing for more efficient resource utilization through parallel computation . Lead developer Max McMullen stated that

6888-486: Was originally available under the UIUC license . After v9.0.0 released in 2019, LLVM relicensed to the Apache License 2.0 with LLVM Exceptions. As of November 2022 about 400 contributions had not been relicensed. LLVM can provide the middle layers of a complete compiler system, taking intermediate representation (IR) code from a compiler and emitting an optimized IR. This new IR can then be converted and linked into machine-dependent assembly language code for

6972-400: Was ready to release Windows 95 , its next operating system . An important factor in its value to consumers was the programs that would be able to run on it. Microsoft employee Alex St. John had been in discussions with various game developers asking how likely they would be to bring their MS-DOS games to Windows 95, and found the responses mostly negative, since programmers had found that

7056-403: Was shortened to Xbox for its commercial name. In 2002, Microsoft released DirectX 9 with support for the use of much longer shader programs than before with pixel and vertex shader version 2.0. Microsoft has continued to update the DirectX suite since then, introducing Shader Model 3.0 in DirectX 9.0c, released in August 2004. As of April 2005, DirectShow was removed from DirectX and moved to

#65934