OSDN Git Service

intel/gen10: Add missed gen10 stuff
[android-x86/external-libdrm.git] / intel / intel_decode.c
index 345d457..3a81500 100644 (file)
@@ -38,6 +38,7 @@
 #include "intel_chipset.h"
 #include "intel_bufmgr.h"
 
+
 /* Struct for tracking drm_intel_decode state. */
 struct drm_intel_decode {
        /** stdio file where the output should land.  Defaults to stdout. */
@@ -3597,7 +3598,7 @@ decode_3d_965(struct drm_intel_decode *ctx)
                instr_out(ctx, 0, "3DSTATE_DEPTH_BUFFER\n");
                if (IS_GEN5(devid) || IS_GEN6(devid))
                        instr_out(ctx, 1,
-                                 "%s, %s, pitch = %d bytes, %stiled, HiZ %d, Seperate Stencil %d\n",
+                                 "%s, %s, pitch = %d bytes, %stiled, HiZ %d, Separate Stencil %d\n",
                                  get_965_surfacetype(data[1] >> 29),
                                  get_965_depthformat((data[1] >> 18) & 0x7),
                                  (data[1] & 0x0001ffff) + 1,
@@ -3826,7 +3827,9 @@ drm_intel_decode_context_alloc(uint32_t devid)
        ctx->devid = devid;
        ctx->out = stdout;
 
-       if (IS_GEN9(devid))
+       if (IS_GEN10(devid))
+               ctx->gen = 10;
+       else if (IS_GEN9(devid))
                ctx->gen = 9;
        else if (IS_GEN8(devid))
                ctx->gen = 8;
@@ -3898,7 +3901,7 @@ drm_intel_decode(struct drm_intel_decode *ctx)
        int ret;
        unsigned int index = 0;
        uint32_t devid;
-       int size = ctx->base_count * 4;
+       int size;
        void *temp;
 
        if (!ctx)
@@ -3908,6 +3911,7 @@ drm_intel_decode(struct drm_intel_decode *ctx)
         * the batchbuffer.  This lets us avoid a bunch of length
         * checking in statically sized packets.
         */
+       size = ctx->base_count * 4;
        temp = malloc(size + 4096);
        memcpy(temp, ctx->base_data, size);
        memset((char *)temp + size, 0xd0, 4096);