15bd8deadSopenharmony_ciName
25bd8deadSopenharmony_ci
35bd8deadSopenharmony_ci    AMD_framebuffer_sample_positions
45bd8deadSopenharmony_ci
55bd8deadSopenharmony_ciName Strings
65bd8deadSopenharmony_ci
75bd8deadSopenharmony_ci    GL_AMD_framebuffer_sample_positions
85bd8deadSopenharmony_ci
95bd8deadSopenharmony_ciContact
105bd8deadSopenharmony_ci
115bd8deadSopenharmony_ci    Mais Alnasser, AMD (mais.alnasser 'at' amd.com)
125bd8deadSopenharmony_ci
135bd8deadSopenharmony_ciContributors
145bd8deadSopenharmony_ci
155bd8deadSopenharmony_ci    Mais Alnasser, AMD
165bd8deadSopenharmony_ci    Graham Sellers, AMD
175bd8deadSopenharmony_ci
185bd8deadSopenharmony_ciStatus
195bd8deadSopenharmony_ci
205bd8deadSopenharmony_ci    Shipping
215bd8deadSopenharmony_ci
225bd8deadSopenharmony_ciVersion
235bd8deadSopenharmony_ci
245bd8deadSopenharmony_ci    Last Modified Date:         11/10/16
255bd8deadSopenharmony_ci    Revision:                   4
265bd8deadSopenharmony_ci
275bd8deadSopenharmony_ciNumber
285bd8deadSopenharmony_ci
295bd8deadSopenharmony_ci    OpenGL Extension #454
305bd8deadSopenharmony_ci
315bd8deadSopenharmony_ciDependencies
325bd8deadSopenharmony_ci
335bd8deadSopenharmony_ci    OpenGL 3.2 is required.
345bd8deadSopenharmony_ci
355bd8deadSopenharmony_ci    This specification interacts with EXT_direct_state_access.
365bd8deadSopenharmony_ci
375bd8deadSopenharmony_ci    This extension is written against the OpenGL 4.4 (Core) specification.
385bd8deadSopenharmony_ci
395bd8deadSopenharmony_ciOverview
405bd8deadSopenharmony_ci
415bd8deadSopenharmony_ci    In unextended GL, the sub-pixel loations of multisampled textures and
425bd8deadSopenharmony_ci    renderbuffers are generally determined in an implementation dependent
435bd8deadSopenharmony_ci    manner. Some algorithms -- in particular custom antialiasing functions --
445bd8deadSopenharmony_ci    depend on the knowledge of, or even require control over the positions of
455bd8deadSopenharmony_ci    samples within each pixel.
465bd8deadSopenharmony_ci
475bd8deadSopenharmony_ci    The AMD_sample_positions extension added some control over the positions
485bd8deadSopenharmony_ci    of samples within a single framebuffer. However, it forced all pixels
495bd8deadSopenharmony_ci    within a framebuffer to have the set of sample positions.
505bd8deadSopenharmony_ci
515bd8deadSopenharmony_ci    This extension provides a mechanism to explicitly set sample positions for
525bd8deadSopenharmony_ci    a framebuffer object with multi-sampled attachments in a repeating pattern,
535bd8deadSopenharmony_ci    allowing different pixels to use different sub-pixel locations for their
545bd8deadSopenharmony_ci    samples. The sample locations used by the FBO can be fixed for all pixels
555bd8deadSopenharmony_ci    in the FBO�s attachments or they can be fixed for a sampling pattern
565bd8deadSopenharmony_ci    comprised of multiple pixels, where the sampling pattern is repeated over
575bd8deadSopenharmony_ci    all pixels. The rate of repeat of this sampling pattern size itself is
585bd8deadSopenharmony_ci    fixed and is implementation-dependent.
595bd8deadSopenharmony_ci
605bd8deadSopenharmony_ciNew Tokens
615bd8deadSopenharmony_ci
625bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetFloatv:
635bd8deadSopenharmony_ci
645bd8deadSopenharmony_ci        SUBSAMPLE_DISTANCE_AMD                          0x883F
655bd8deadSopenharmony_ci
665bd8deadSopenharmony_ci    Accepted by the <pname> parameter of GetIntegerv:
675bd8deadSopenharmony_ci
685bd8deadSopenharmony_ci        PIXELS_PER_SAMPLE_PATTERN_X_AMD                 0x91AE
695bd8deadSopenharmony_ci        PIXELS_PER_SAMPLE_PATTERN_Y_AMD                 0x91AF
705bd8deadSopenharmony_ci
715bd8deadSopenharmony_ci    Accepted by the <pixelindex> parameter of FramebufferSamplePositionsfvAMD,
725bd8deadSopenharmony_ci    NamedFramebufferSamplePositionsfvAMD, GetFramebufferParameterfvAMD
735bd8deadSopenharmony_ci    and GetNamedFramebufferParameterfvAMD:
745bd8deadSopenharmony_ci
755bd8deadSopenharmony_ci        ALL_PIXELS_AMD                                  0xFFFFFFFF
765bd8deadSopenharmony_ci
775bd8deadSopenharmony_ci
785bd8deadSopenharmony_ciNew Procedures and Functions
795bd8deadSopenharmony_ci
805bd8deadSopenharmony_ci    void FramebufferSamplePositionsfvAMD(enum target, uint numsamples,
815bd8deadSopenharmony_ci        uint pixelindex, const float *values)
825bd8deadSopenharmony_ci
835bd8deadSopenharmony_ci    void NamedFramebufferSamplePositionsfvAMD(uint framebuffer,
845bd8deadSopenharmony_ci        uint numsamples, uint pixelindex, const float *values)
855bd8deadSopenharmony_ci
865bd8deadSopenharmony_ci    void GetFramebufferParameterfvAMD(enum target, enum pname,
875bd8deadSopenharmony_ci        uint numsamples, uint pixelindex, sizei size, float *values)
885bd8deadSopenharmony_ci
895bd8deadSopenharmony_ci    void GetNamedFramebufferParameterfvAMD(uint framebuffer,
905bd8deadSopenharmony_ci        enum pname, uint numsamples, uint pixelindex, sizei size,
915bd8deadSopenharmony_ci        float *values)
925bd8deadSopenharmony_ci
935bd8deadSopenharmony_ci
945bd8deadSopenharmony_ciAdditions to Chapter 9 of the OpenGL 4.4 (Core) Specification
955bd8deadSopenharmony_ci(Framebuffers and Framebuffer Objects)
965bd8deadSopenharmony_ci
975bd8deadSopenharmony_ci    Add section 9.2.9, Framebuffer Sample Positions, p. 287
985bd8deadSopenharmony_ci
995bd8deadSopenharmony_ci    Sample locations can be modified for all pixels in a multi-sampled
1005bd8deadSopenharmony_ci    framebuffer using the following command:
1015bd8deadSopenharmony_ci
1025bd8deadSopenharmony_ci        void FramebufferSamplePositionsfvAMD(enum target,
1035bd8deadSopenharmony_ci                                             uint numsamples,
1045bd8deadSopenharmony_ci                                             uint pixelindex,
1055bd8deadSopenharmony_ci                                             const float *values);
1065bd8deadSopenharmony_ci
1075bd8deadSopenharmony_ci    <target> must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER, or FRAMEBUFFER.
1085bd8deadSopenharmony_ci    <numsamples> is the number of samples to set and must be greater
1095bd8deadSopenharmony_ci    than 0 and less than or equal to the value of SAMPLES. The error
1105bd8deadSopenharmony_ci    INVALID_VALUE is generated if <numsamples> is outside this range.
1115bd8deadSopenharmony_ci    <pixelindex> is the index of the pixel to set the samples for and
1125bd8deadSopenharmony_ci    must be greater than or equal to 0 and less than the result of querying
1135bd8deadSopenharmony_ci    PIXELS_PER_SAMPLE_PATTERN_X_AMD multiplied by the result of
1145bd8deadSopenharmony_ci    querying PIXELS_PER_SAMPLE_PATTERN_Y_AMD. The pixels are ordered left to
1155bd8deadSopenharmony_ci    right, top to bottom, where the origin is the upper left corner.
1165bd8deadSopenharmony_ci    <pixelindex> may also specify ALL_PIXELS_AMD, which sets samples of all
1175bd8deadSopenharmony_ci    pixels to the same set of locations. The error INVALID_VALUE is generated
1185bd8deadSopenharmony_ci    if <pixelindex> is less than zero or is greater than or equal to the
1195bd8deadSopenharmony_ci    result of querying PIXELS_PER_SAMPLE_PATTERN_X_AMD multiplied by the
1205bd8deadSopenharmony_ci    result of querying PIXELS_PER_SAMPLE_PATTERN_Y_AMD and is not equal to
1215bd8deadSopenharmony_ci    ALL_PIXELS_AMD. The sample locations are set by passing floating point
1225bd8deadSopenharmony_ci    values of x and y in <values[2 * i]> and <values[2 * i + 1]> respectively,
1235bd8deadSopenharmony_ci    all in the range [0.0, 1.0), corresponding to the <x> and <y> locations in
1245bd8deadSopenharmony_ci    pixel space of that sample, respectively. (0.5, 0.5) thus corresponds to
1255bd8deadSopenharmony_ci    the pixel center. The range [0.0, 0.1) implies that sample locations cannot
1265bd8deadSopenharmony_ci    overlap at pixel boundaries.
1275bd8deadSopenharmony_ci
1285bd8deadSopenharmony_ci    FramebufferSamplePositionsfvAMD generates an INVALID_OPERATION error if the
1295bd8deadSopenharmony_ci    currently bound framebuffer is incomplete or is the default framebuffer.
1305bd8deadSopenharmony_ci
1315bd8deadSopenharmony_ci    If <values> is NULL, <numSamples> is ignored and all sample positions for
1325bd8deadSopenharmony_ci    <pixelindex> are returned to their default values. Passing ALL_PIXELS_AMD
1335bd8deadSopenharmony_ci    therefore resets the sample positions for all pixels in the sampling
1345bd8deadSopenharmony_ci    pattern.
1355bd8deadSopenharmony_ci
1365bd8deadSopenharmony_ci    The subpixel range [0,1) is discretized based on the implementation-
1375bd8deadSopenharmony_ci    dependent value of SUBSAMPLE_DISTANCE_AMD. GetFloatv can be used with
1385bd8deadSopenharmony_ci    SUBSAMPLE_DISTANCE_AMD as the pname parameter to query the subpixel
1395bd8deadSopenharmony_ci    precision, which is the same for both the vertical and horizontal
1405bd8deadSopenharmony_ci    directions. Given two sample positions (x0, y0) and (x1, y1), one can make
1415bd8deadSopenharmony_ci    sure they don't fall in the same subpixel if
1425bd8deadSopenharmony_ci
1435bd8deadSopenharmony_ci            abs(x0 - x1) >= ssd and abs(y0 - y1) >= ssd,
1445bd8deadSopenharmony_ci
1455bd8deadSopenharmony_ci    where ssd is the float value returned when querying SUBSAMPLE_DISTANCE_AMD.
1465bd8deadSopenharmony_ci
1475bd8deadSopenharmony_ci    The quantized sample positions can be retrieved via the new entry point:
1485bd8deadSopenharmony_ci
1495bd8deadSopenharmony_ci        void GetFramebufferParameterfvAMD(enum target,
1505bd8deadSopenharmony_ci                                          enum pname,
1515bd8deadSopenharmony_ci                                          uint numsamples,
1525bd8deadSopenharmony_ci                                          uint pixelindex,
1535bd8deadSopenharmony_ci                                          sizei size,
1545bd8deadSopenharmony_ci                                          float *values);
1555bd8deadSopenharmony_ci
1565bd8deadSopenharmony_ci    <target> must be DRAW_FRAMEBUFFER, READ_FRAMEBUFFER, or FRAMEBUFFER.
1575bd8deadSopenharmony_ci    FRAMEBUFFER is equivalent to DRAW_FRAMEBUFFER. <pname> must be
1585bd8deadSopenharmony_ci    SAMPLE_POSITIONS. <numsamples> is the number of samples to get and must
1595bd8deadSopenharmony_ci    be greater than 0 and less than or equal to the value of SAMPLES. The
1605bd8deadSopenharmony_ci    error INVALID_VALUE is generated if <numsamples> is outside this range.
1615bd8deadSopenharmony_ci    <pixelindex> is the index of the pixel to set the samples for and must be
1625bd8deadSopenharmony_ci    less than the result of querying PIXELS_PER_SAMPLE_PATTERN_X_AMD
1635bd8deadSopenharmony_ci    multiplied by the result of querying PIXELS_PER_SAMPLE_PATTERN_Y_AMD.
1645bd8deadSopenharmony_ci    Calling GetFramebufferParameterfvAMD with <pixelindex> within this
1655bd8deadSopenharmony_ci    range retrieves the set of sample positions for the pixel matching
1665bd8deadSopenharmony_ci    <pixelindex>. <pixelindex> can also be equal to ALL_PIXELS_AMD, which
1675bd8deadSopenharmony_ci    would cause the function to return an array of the requested <numsamples>
1685bd8deadSopenharmony_ci    per each pixel in the sampling pattern.
1695bd8deadSopenharmony_ci
1705bd8deadSopenharmony_ci    The error INVALID_VALUE is generated if <pixelindex> is less than 
1715bd8deadSopenharmony_ci    zero or is greater than or equal to the result of querying
1725bd8deadSopenharmony_ci    PIXELS_PER_SAMPLE_PATTERN_X_AMD multiplied by the result of querying
1735bd8deadSopenharmony_ci    PIXELS_PER_SAMPLE_PATTERN_Y_AMD and is not equal to ALL_SAMPLES. The
1745bd8deadSopenharmony_ci    samples returned are ordered per pixel, and the order of the pixels would
1755bd8deadSopenharmony_ci    be left to right, then top to bottom, where the sampling pattern origin is
1765bd8deadSopenharmony_ci    the upper left corner. <size> is the requested size of the retrieved sample
1775bd8deadSopenharmony_ci    locations in bytes. <values> will contain the returned <x> and <y>
1785bd8deadSopenharmony_ci    coordinates of the requested samples in pixel space. The sample locations
1795bd8deadSopenharmony_ci    returned are all in the range [0, 1), corresponding to the <x> and <y>
1805bd8deadSopenharmony_ci    locations in pixel space of that sample, respectively. (0.5, 0.5) thus
1815bd8deadSopenharmony_ci    corresponds to the pixel center.
1825bd8deadSopenharmony_ci
1835bd8deadSopenharmony_ci    The commands:
1845bd8deadSopenharmony_ci
1855bd8deadSopenharmony_ci        void NamedFramebufferSamplePositionsfvAMD(uint framebuffer,
1865bd8deadSopenharmony_ci                                                  uint numsamples,
1875bd8deadSopenharmony_ci                                                  uint pixelindex,
1885bd8deadSopenharmony_ci                                                  const float *values);
1895bd8deadSopenharmony_ci
1905bd8deadSopenharmony_ci        void GetNamedFramebufferParameterfvAMD(uint framebuffer,
1915bd8deadSopenharmony_ci                                               enum pname,
1925bd8deadSopenharmony_ci                                               uint numsamples,
1935bd8deadSopenharmony_ci                                               uint pixelindex,
1945bd8deadSopenharmony_ci                                               sizei size,
1955bd8deadSopenharmony_ci                                               float *value);
1965bd8deadSopenharmony_ci
1975bd8deadSopenharmony_ci    behave identically to FramebufferSamplePositionsfvAMD and
1985bd8deadSopenharmony_ci    GetFramebufferSampleParameterfvAMD, except that the target of the
1995bd8deadSopenharmony_ci    operation is the framebuffer object named <framebuffer> rather than
2005bd8deadSopenharmony_ci    the object bound to a specified target. If <framebuffer> is not the name
2015bd8deadSopenharmony_ci    of an existing framebuffer object an INVALID_OPERATION error is generated.
2025bd8deadSopenharmony_ci
2035bd8deadSopenharmony_ciAdditions to Chapter 14 of the OpenGL 4.4 (Core) Specification (Fixed-Function
2045bd8deadSopenharmony_ciPrimitive Assembly and Rasterization)
2055bd8deadSopenharmony_ci
2065bd8deadSopenharmony_ci    (Modify Section 14.3, Antialiasing, p. 412)
2075bd8deadSopenharmony_ci
2085bd8deadSopenharmony_ci    Add after the segment: "If the multisample mode does not have fixed sample
2095bd8deadSopenharmony_ci    locations, the returned values may only reflect the locations of samples
2105bd8deadSopenharmony_ci    within some pixels.", append:
2115bd8deadSopenharmony_ci
2125bd8deadSopenharmony_ci        If GetMultisamplefv is used to query the result of using
2135bd8deadSopenharmony_ci    FramebufferSamplePositionsfvAMD or NamedFramebufferSamplePositionsfvAMD
2145bd8deadSopenharmony_ci    with ALL_PIXELS_AMD, the returned sample position matches that of
2155bd8deadSopenharmony_ci    <pixelindex> equal to zero.
2165bd8deadSopenharmony_ci
2175bd8deadSopenharmony_ciErrors
2185bd8deadSopenharmony_ci
2195bd8deadSopenharmony_ci    INVALID_VALUE is generated by FramebufferSamplePositionsfvAMD,
2205bd8deadSopenharmony_ci    NamedFramebufferSamplePositionsfvAMD, GetFramebufferParameterfvAMD
2215bd8deadSopenharmony_ci    and GetNamedFramebufferParameterfvAMD if numsamples is greater than
2225bd8deadSopenharmony_ci    the value of SAMPLES.
2235bd8deadSopenharmony_ci
2245bd8deadSopenharmony_ci    INVALID_VALUE is generated by FramebufferSamplePositionsfvAMD if
2255bd8deadSopenharmony_ci    pixelindex is greater than or equal to the value of
2265bd8deadSopenharmony_ci    NUM_PIXELS_PER_SAMPLE_PATTERN_X_AMD * NUM_PIXELS_PER_SAMPLE_PATTERN_Y_AMD
2275bd8deadSopenharmony_ci    and is not equal to ALL_SAMPLES_AMD.
2285bd8deadSopenharmony_ci
2295bd8deadSopenharmony_ci    INVALID_OPERATION is generated by FramebufferSamplePositionsfvAMD
2305bd8deadSopenharmony_ci    if the currently bound framebuffer is the default framebuffer.
2315bd8deadSopenharmony_ci
2325bd8deadSopenharmony_ci    INVALID_OPERATION is generated by NamedFramebufferSamplePositionsfvAMD
2335bd8deadSopenharmony_ci    if the <framebuffer> is not the name of an existing framebufer object.
2345bd8deadSopenharmony_ci
2355bd8deadSopenharmony_ci    INVALID_OPERATION is generated by FramebufferSamplePositionsfvAMD
2365bd8deadSopenharmony_ci    if the currently bound framebuffer is incomplete.
2375bd8deadSopenharmony_ci
2385bd8deadSopenharmony_ci    INVALID_OPERATION is generated by NamedFramebufferSamplePositionsfvAMD
2395bd8deadSopenharmony_ci    if the <framebuffer> is incomplete.
2405bd8deadSopenharmony_ci
2415bd8deadSopenharmony_ciNew State
2425bd8deadSopenharmony_ci
2435bd8deadSopenharmony_ci    Add to Table 23.24, Framebuffer (state per framebuffer object), p. 545:
2445bd8deadSopenharmony_ci
2455bd8deadSopenharmony_ci    Get Value        Type    Get Command                     Value   Description                          Sec.
2465bd8deadSopenharmony_ci    ---------        ----    -----------                     -----   ------------------------------       -----
2475bd8deadSopenharmony_ci    SAMPLE_POSITIONS 2xR+    GetFramebufferParameterfvAMD            The (x, y) sample locations in       9.2.9
2485bd8deadSopenharmony_ci                                                                     the range [0, 1)
2495bd8deadSopenharmony_ci
2505bd8deadSopenharmony_ciNew Implementation Dependent State
2515bd8deadSopenharmony_ci
2525bd8deadSopenharmony_ci    Add to Table 23.11, Multisampling, p. 532:
2535bd8deadSopenharmony_ci
2545bd8deadSopenharmony_ci    Get Value                              Type    Get Command  Value   Description                   Sec.
2555bd8deadSopenharmony_ci    ---------                              ------- -----------  ------- ------------------------      -----
2565bd8deadSopenharmony_ci    SUBSAMPLE_DISTANCE_AMD                 R+      GetFloatv            precision step between        9.2.9
2575bd8deadSopenharmony_ci                                                                        subsamples
2585bd8deadSopenharmony_ci    PIXELS_PER_SAMPLE_PATTERN_X_AMD        Z+      GetIntegerv          number of pixels in the       9.2.9
2595bd8deadSopenharmony_ci                                                                        X direction
2605bd8deadSopenharmony_ci    PIXELS_PER_SAMPLE_PATTERN_Y_AMD        Z+      GetIntegerv          number of pixels in the       9.2.9
2615bd8deadSopenharmony_ci                                                                        Y direction
2625bd8deadSopenharmony_ci
2635bd8deadSopenharmony_ciInteraction with ARB_texture_multisample
2645bd8deadSopenharmony_ci
2655bd8deadSopenharmony_ci    If ARB_texture_multisample is not supported, remove all references to
2665bd8deadSopenharmony_ci    GetMultisamplefv.
2675bd8deadSopenharmony_ci
2685bd8deadSopenharmony_ci
2695bd8deadSopenharmony_ciDependencies on EXT_direct_state_access
2705bd8deadSopenharmony_ci
2715bd8deadSopenharmony_ci    If EXT_direct_state_access is not supported, remove references to the
2725bd8deadSopenharmony_ci    Named* commands added by this extension.
2735bd8deadSopenharmony_ci
2745bd8deadSopenharmony_ci
2755bd8deadSopenharmony_ciIssues
2765bd8deadSopenharmony_ci
2775bd8deadSopenharmony_ci    (1) What happens if an app just sets one sample position?
2785bd8deadSopenharmony_ci
2795bd8deadSopenharmony_ci        RESOLVED: Any attachment to the bound FBO will have the index 0
2805bd8deadSopenharmony_ci        position updated. All the rest of the positions will keep their
2815bd8deadSopenharmony_ci        original values. Any other FBOs will not be affected by this change.
2825bd8deadSopenharmony_ci
2835bd8deadSopenharmony_ci
2845bd8deadSopenharmony_ci    (2) Should we also expose the precision? Can an app use it in setting
2855bd8deadSopenharmony_ci        sample positions?
2865bd8deadSopenharmony_ci
2875bd8deadSopenharmony_ci        RESOLVED: SUBSAMPLE_DISTANCE_AMD is added as a new token. It can be
2885bd8deadSopenharmony_ci        used by GetFloatv to query the precision step, which will be the same
2895bd8deadSopenharmony_ci        for both the vertical and horizontal directions. The subpixel range
2905bd8deadSopenharmony_ci        [0,1) is discretized based on the value of SUBSAMPLE_DISTANCE_AMD.
2915bd8deadSopenharmony_ci        Let ssd be the float value returned when SUBSAMPLE_DISTANCE_AMD is
2925bd8deadSopenharmony_ci        queried, then one can infer the subpixilization to be 1/ssd+1. For
2935bd8deadSopenharmony_ci        example, if ssd = 0.06667 then the pixel is subdivided into
2945bd8deadSopenharmony_ci        1/0.0667+1 = 16 subpixels in each  dimension. 
2955bd8deadSopenharmony_ci
2965bd8deadSopenharmony_ci        One can also avoid using sample positions that would map to the same
2975bd8deadSopenharmony_ci        subpixel. A coordinate c will map to the greatest multiple of ssd that
2985bd8deadSopenharmony_ci        is less or equal to c. For example, given two sample positions,
2995bd8deadSopenharmony_ci        (x0, y0) and (x1, y1), if abs(x1-x0) < ssd and abs(y1-y0) < ssd, then
3005bd8deadSopenharmony_ci        both points will map to the same subpixel, which means the application
3015bd8deadSopenharmony_ci        might want to substitute one of these positions with another that is
3025bd8deadSopenharmony_ci        not redundant.
3035bd8deadSopenharmony_ci
3045bd8deadSopenharmony_ci        Using numerical values as an example, let a = (0.201, 0.0) and
3055bd8deadSopenharmony_ci        b = (0.25, 0.5) be sample positions and ssd = 0.06667. Both the
3065bd8deadSopenharmony_ci        x-coordinate values 0.201 and 0.25 fall between 0.06667*3=0.2 and
3075bd8deadSopenharmony_ci        0.06667*4 = 0.26667 and would therefore map to the same value of 0.2.
3085bd8deadSopenharmony_ci        The y-coordinates also map to the same value of 0 because they both
3095bd8deadSopenharmony_ci        belong in the range [0, 0.06667). This means the two points are
3105bd8deadSopenharmony_ci        redundant. Therefore, the application should choose a different point
3115bd8deadSopenharmony_ci        c = (0.3, 0.45) for example. c would be a good choice because the
3125bd8deadSopenharmony_ci        distance between its x-coordinate and a's x-coordinate is greater than
3135bd8deadSopenharmony_ci        ssd, that is 0.3-0.201 > 0.06667.
3145bd8deadSopenharmony_ci
3155bd8deadSopenharmony_ci    (3) What would be the expected results for the following scenarios:
3165bd8deadSopenharmony_ci
3175bd8deadSopenharmony_ci        Scenario 1
3185bd8deadSopenharmony_ci        The current number of samples in the framebuffer is 8.
3195bd8deadSopenharmony_ci        The application requests 5 sample positions and GL_ALL_PIXELS.
3205bd8deadSopenharmony_ci        The application passes 22*2*sizeof(GLuint) as the size in bytes
3215bd8deadSopenharmony_ci        (more than needed).
3225bd8deadSopenharmony_ci
3235bd8deadSopenharmony_ci        RESOLVED: The returned array would have a capped size of
3245bd8deadSopenharmony_ci        20*2*sizeof(GLuint) and will contain the first 5 samples of pixel
3255bd8deadSopenharmony_ci        (x0, y0), then the first 5 samples of pixel (x1, y0), then the first
3265bd8deadSopenharmony_ci        5 samples of pixel (x0, y1) and finally the first 5 samples of pixel
3275bd8deadSopenharmony_ci        (x1, y1).
3285bd8deadSopenharmony_ci
3295bd8deadSopenharmony_ci        Scenario 2
3305bd8deadSopenharmony_ci        The current number of samples in the framebuffer is 8.
3315bd8deadSopenharmony_ci        The application requests 5 sample positions and GL_ALL_PIXELS.
3325bd8deadSopenharmony_ci        The application passes 18*2*sizeof(GLuint) as the size in bytes
3335bd8deadSopenharmony_ci        (less than needed).
3345bd8deadSopenharmony_ci
3355bd8deadSopenharmony_ci        RESOLVED: The returned array would have a size of 18*2*sizeof(GLuint)
3365bd8deadSopenharmony_ci        and will contain the first 5 samples of pixel (x0, y0), then the first
3375bd8deadSopenharmony_ci        5 samples of pixel (x1, y0), then the first 5 samples of pixel
3385bd8deadSopenharmony_ci        (x0, y1) and finally the first 3 samples of pixel (x1, y1).
3395bd8deadSopenharmony_ci
3405bd8deadSopenharmony_ci        Scenario 3
3415bd8deadSopenharmony_ci        The current number of samples in the framebuffer is 8.
3425bd8deadSopenharmony_ci        The application requests 5 sample positions and GL_ALL_PIXELS.
3435bd8deadSopenharmony_ci        The application passes 12*2*sizeof(GLuint) as the size in bytes
3445bd8deadSopenharmony_ci        (less than needed).
3455bd8deadSopenharmony_ci
3465bd8deadSopenharmony_ci        RESOLVED: The returned array would have a size of 12*2*sizeof(GLuint)
3475bd8deadSopenharmony_ci        and will contain the first 5 samples of pixel (x0, y0), then the first
3485bd8deadSopenharmony_ci        5 samples of pixel (x1, y0), and the first 2 samples of pixel
3495bd8deadSopenharmony_ci        (x0, y1).
3505bd8deadSopenharmony_ci
3515bd8deadSopenharmony_ci    (4) What is the expected behavior of a multisampled texture is attached
3525bd8deadSopenharmony_ci        with <fixedsamplelocations> equal to TRUE and then the application
3535bd8deadSopenharmony_ci        attempts to set different samples per pixels in a sampling pattern?
3545bd8deadSopenharmony_ci
3555bd8deadSopenharmony_ci        RESOLVED: If <fixedsamplelocations> is set to TRUE, the sample
3565bd8deadSopenharmony_ci        positions in <pixelindex> equaling zero get replicated to all other
3575bd8deadSopenharmony_ci        pixels in the sampling pattern.
3585bd8deadSopenharmony_ci
3595bd8deadSopenharmony_ci    (5) What is the result of rendering to a framebuffer, changing its sample
3605bd8deadSopenharmony_ci        locations and then rendering again into that framebuffer without
3615bd8deadSopenharmony_ci        clearing it first?
3625bd8deadSopenharmony_ci
3635bd8deadSopenharmony_ci        RESOLVED: The result is effectively undefined. The result of rendering
3645bd8deadSopenharmony_ci        will not be consistent between the two passes. No ill effect should
3655bd8deadSopenharmony_ci        come of this, but the framebuffer content may appear corrupted.
3665bd8deadSopenharmony_ci
3675bd8deadSopenharmony_ciRevision History
3685bd8deadSopenharmony_ci
3695bd8deadSopenharmony_ci    Rev.    Date    Author    Changes
3705bd8deadSopenharmony_ci    ----  --------  --------  -----------------------------------------
3715bd8deadSopenharmony_ci    4     11/10/16  malnasse  Modify the 'framebuffer' parameter in
3725bd8deadSopenharmony_ci                              GetNamedFramebufferParameterfvAMD from
3735bd8deadSopenharmony_ci                              GLenum to GLuint to match the DSA style.
3745bd8deadSopenharmony_ci    3     11/09/16  malnasse  Update PIXELS_PER_SAMPLE_PATTERN_X_AMD and
3755bd8deadSopenharmony_ci                              PIXELS_PER_SAMPLE_PATTERN_Y_AMD token values.
3765bd8deadSopenharmony_ci    2     04/18/14  gsellers  Ready for posting.
3775bd8deadSopenharmony_ci    1     10/14/13  malnasse  First revision.
3785bd8deadSopenharmony_ci
379