metal: remove an obsolete section of a constant buffer.
authorAlex Szpakowski <slime73@gmail.com>
Thu, 01 Nov 2018 19:49:01 -0300
changeset 12384b1f5162fd621
parent 12383 f6430feceeda
child 12385 45038f8422c9
metal: remove an obsolete section of a constant buffer.
src/render/metal/SDL_render_metal.m
     1.1 --- a/src/render/metal/SDL_render_metal.m	Thu Nov 01 20:04:24 2018 +0300
     1.2 +++ b/src/render/metal/SDL_render_metal.m	Thu Nov 01 19:49:01 2018 -0300
     1.3 @@ -61,8 +61,7 @@
     1.4  static const size_t CONSTANTS_OFFSET_DECODE_JPEG = ALIGN_CONSTANTS(CONSTANTS_OFFSET_HALF_PIXEL_TRANSFORM + sizeof(float) * 16);
     1.5  static const size_t CONSTANTS_OFFSET_DECODE_BT601 = ALIGN_CONSTANTS(CONSTANTS_OFFSET_DECODE_JPEG + sizeof(float) * 4 * 4);
     1.6  static const size_t CONSTANTS_OFFSET_DECODE_BT709 = ALIGN_CONSTANTS(CONSTANTS_OFFSET_DECODE_BT601 + sizeof(float) * 4 * 4);
     1.7 -static const size_t CONSTANTS_OFFSET_CLEAR_VERTS = ALIGN_CONSTANTS(CONSTANTS_OFFSET_DECODE_BT709 + sizeof(float) * 4 * 4);
     1.8 -static const size_t CONSTANTS_LENGTH = CONSTANTS_OFFSET_CLEAR_VERTS + sizeof(float) * 6;
     1.9 +static const size_t CONSTANTS_LENGTH = CONSTANTS_OFFSET_DECODE_BT709 + sizeof(float) * 6;
    1.10  
    1.11  typedef enum SDL_MetalVertexFunction
    1.12  {
    1.13 @@ -1412,8 +1411,6 @@
    1.14          1.0000,  1.7720,  0.0000, 0.0,        /* Bcoeff */
    1.15      };
    1.16  
    1.17 -    float clearverts[6] = {0.0f, 0.0f,  0.0f, 2.0f,  2.0f, 0.0f};
    1.18 -
    1.19      id<MTLBuffer> mtlbufconstantstaging = [data.mtldevice newBufferWithLength:CONSTANTS_LENGTH options:MTLResourceStorageModeShared];
    1.20      #if !__has_feature(objc_arc)
    1.21      [mtlbufconstantstaging autorelease];
    1.22 @@ -1430,7 +1427,6 @@
    1.23      SDL_memcpy(constantdata + CONSTANTS_OFFSET_DECODE_JPEG, decodetransformJPEG, sizeof(decodetransformJPEG));
    1.24      SDL_memcpy(constantdata + CONSTANTS_OFFSET_DECODE_BT601, decodetransformBT601, sizeof(decodetransformBT601));
    1.25      SDL_memcpy(constantdata + CONSTANTS_OFFSET_DECODE_BT709, decodetransformBT709, sizeof(decodetransformBT709));
    1.26 -    SDL_memcpy(constantdata + CONSTANTS_OFFSET_CLEAR_VERTS, clearverts, sizeof(clearverts));
    1.27  
    1.28      id<MTLCommandBuffer> cmdbuffer = [data.mtlcmdqueue commandBuffer];
    1.29      id<MTLBlitCommandEncoder> blitcmd = [cmdbuffer blitCommandEncoder];