Is programing "to the metal" on XBOX 360 forbidden?

Discussion in 'Console Technology' started by Persistantthug, Jun 18, 2012.

  1. Persistantthug

    Newcomer

    Joined:
    Jun 26, 2010
    Messages:
    179
    Is it true that when making an XBOX 360 game, DIRECT X must be used/employed and programing without Microsoft's API is forbidden?



    I saw a posting where someone may have implied this months ago when my computer was down (my mobile browser will not allow me to post here for some reason), but I've been wanting to clarify this and perhaps get a little more information on this.

    Thank you.
     
  2. babybumb

    Regular

    Joined:
    Dec 9, 2011
    Messages:
    583
    Yes but its much closer to the metal than Windows Direct X
     
  3. ERP

    ERP
    Moderator Veteran

    Joined:
    Feb 11, 2002
    Messages:
    3,669
    Location:
    Redmond, WA
    You have to understand what DirectX really does on a console.
    The GPU has a ring buffer (actually this isn't strictly true on all hardware, but it's close enough) When you execute a DirectX command most of the time it just copies the command into the ring buffer.
    The place where it gets "fiddly" is that there isn't a 1:1 correspondence between State and Hardware registers and shader constants aren't quite as neat as they appear in the API.
    The 360 version of "DirectX", exposes pretty much all of the additional functionality of the chip, including calling precompiled display lists.
    You'd get virtually nothing going straight to the hardware, you'd pretty much have to write the same wrapper and manage the circular buffer yourself.
    The only thing it has in common with DirectX on a PC is the API looks similar.

    On a PC it's different partly because of ring transitions, partly the old pre DX11 driver model and partly because PC Drivers try and optimize/fix bad useage patterns by the application when Draw Prim is called.
     
  4. antwan

    Banned

    Joined:
    May 26, 2012
    Messages:
    200
    I thought exclusive games (when given similar budgets and skilled developers) couldn't be compared because the 360 must use DirectX which would limit performance: for example forza 5 versus GT 5? At least that is what a good friend (who is a developer) told me. He says the 360 should be able to have even better graphics, but it can't because of the direct X overhead.
    So is he wrong?
     
  5. Dominik D

    Regular

    Joined:
    Mar 23, 2007
    Messages:
    780
    Location:
    Wroclaw, Poland
    You use some form of API regardless of the console. Whether it's DirectX, libGCM or whatever else. On consoles these APIs are super thin and penalties are close to none (and you learn where they are not minuscule). There's no "coding to the metal" anymore, it's pretty much a myth. You'd have to build some reasonable layer on top of the "metal" anyways so instead of reinventing the wheel (and making many, many mistakes) you use the API provided. The only thing common between DirectX on Xbox 360 and PC is the look and feel of the API, but the core principals are different. There's no DXGI driver below because you don't need any abstraction for various hardware. There's no dynamic linking to the DLL - it's a static lib AFAIK and since you use WPO unneeded parts are stripped and stuff gets inlined nicely where possible. With PGO you get even more improvements. Your friend probably saw an API and assumed it's the same stack Windows has. It isn't.
     
  6. McHuj

    Veteran Regular Subscriber

    Joined:
    Jul 1, 2005
    Messages:
    1,069
    Location:
    Austin, Tx
    What about on the CPU side? Dot they let you code anything ASM? Or is the compiler considered good enough? I come from the DSP world where not writing ASM seems very foreign, lol.
     
  7. sebbbi

    Veteran

    Joined:
    Nov 14, 2007
    Messages:
    2,183
    Location:
    Helsinki, Finland
    Close to the metal programming is not forbidden. It's widely used.

    For example you can program your shaders directly in GPU microcode, you can directly write to ring buffer, you can give GPU pure pointers to fetch data (instead of using DirectX managed objects), etc. Coding in assembler/intrinsics is of course allowed. How else could you write vectorized code (VMX128)? You also need asm/intrinsics for manual cache control. So basically you can't live without asm/intrinsics. VMX and manual cache control are both very much required for performance critical parts of the code.
     
  8. antwan

    Banned

    Joined:
    May 26, 2012
    Messages:
    200
    Wow! (I looked at your posts and learned you are part of a (great I must add) developer) So it turns out "close to the metal programming is forbidden" was just a hoax .. that's strange. I will confront my friend with this knowledge
     
  9. user542745831

    Veteran

    Joined:
    Jul 11, 2008
    Messages:
    1,149
    Just came across this:



    :???:
     
  10. antwan

    Banned

    Joined:
    May 26, 2012
    Messages:
    200
    This is the one case where the argument "it's just clever art" actually is true, but the developers now mention "untapped power"?

    A real case of untapped power is comparing ZOE1 to ZOE2. Or Halo3 to Halo: Reach.
    In the case of Reach to 4; it's art.
     
  11. XpiderMX

    Veteran

    Joined:
    Mar 14, 2012
    Messages:
    1,768
    I don't think so... have you seen new gameplay? it doesn't looks like "it is only art".
     
  12. antwan

    Banned

    Joined:
    May 26, 2012
    Messages:
    200
    I have only seen the beta footage where they removed the motion blur, the HDR, the lighting from the energy weapons, explosions, while adding some shadows on characters and the player weapon, improving the horizontal resolution by 9-10% and switching AA method. But aside from that, yes, the improvements in the overall graphics are due to art.
     
  13. XpiderMX

    Veteran

    Joined:
    Mar 14, 2012
    Messages:
    1,768
    EDIT: I got it, you are the guy from this thread: http://forum.beyond3d.com/showthread.php?t=62394
     
    #13 XpiderMX, Oct 6, 2012
    Last edited by a moderator: Oct 6, 2012
  14. antwan

    Banned

    Joined:
    May 26, 2012
    Messages:
    200
    The AA comparison is a worst case scenario versus a downscaled image.
    A 2D godrays effect was already present in a Halo title 11 years ago.
    The particle effects super are nice, but you see the missing lighting from the blue shit; though there are some yellow spots on the ground, I thought they were missing completely so thanks for bringing it to my attention.
    The really dark screenshots shows the lack of HDR quite nicely.
    The last shot is produced using an offline renderer. The lighting-'tech' in that shot does not have to be present in the final game, but it sure would look nice in the really dark screenshot :)


    please remember, nobody is claiming that H4 is NOT the best looking 360 title ever, so take it easy ;)
     
  15. willardjuice

    willardjuice super willyjuice
    Moderator Veteran Alpha Subscriber

    Joined:
    May 14, 2005
    Messages:
    1,310
    Location:
    NY
    Please remember halo 4 has nothing to do with this thread.
     
  16. Laa-Yosh

    Laa-Yosh I can has custom title?
    Legend Subscriber

    Joined:
    Feb 12, 2002
    Messages:
    9,466
    Location:
    Budapest, Hungary
    Antwan has something against Halo, this is like the third or fourth thread where he's rambling about it. One had to be closed, I wonder what'll happen next.
     
  17. BRiT

    BRiT (╯°□°)╯
    Moderator Legend Subscriber

    Joined:
    Feb 7, 2002
    Messages:
    7,657
    Location:
    Cleveland
    I'm predicting a temp-ban for antwan .... Just sayin'.
     
  18. Billy Idol

    Legend Veteran

    Joined:
    Mar 17, 2009
    Messages:
    5,613
    Location:
    Europe
    Lol, seems that you guys hate Antwan...

    On topic: I always wonder what exclusive devs can bring out of the box! But I guess that Sebbi and his team already hit some metal with their games :)
     
  19. XpiderMX

    Veteran

    Joined:
    Mar 14, 2012
    Messages:
    1,768
    Well, Corrine Yu said that she is programming a lot of things on assembler, including some physics, I guess it is "programming to the metal" xD
     
  20. Karamazov

    Veteran Regular

    Joined:
    Sep 20, 2005
    Messages:
    1,252
    Location:
    France
    Now that may not be untapped power, but power used differently from a game to another.
     

Share This Page

  • About Beyond3D

    Beyond3D has been around for over a decade and prides itself on being the best place on the web for in-depth, technically-driven discussion and analysis of 3D graphics hardware. If you love pixels and transistors, you've come to the right place!

    Beyond3D is proudly published by GPU Tools Ltd.
Loading...