i965: Make Gen4-5 and Gen8+ ALT checks use ctx->_Shader too.
authorKenneth Graunke <kenneth@whitecape.org>
Sun, 30 Nov 2014 09:41:15 +0000 (01:41 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 4 Dec 2014 23:04:35 +0000 (15:04 -0800)
Commit c0347705 changed the Gen6-7 code to use ctx->_Shader rather than
ctx->Shader, but neglected to change the Gen4-5 or Gen8+ code.

This might fix SSO related bugs, but ALT mode is only used for ARB
programs, so if there's an actual problem, it's likely no one would
run into it.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_vs_state.c
src/mesa/drivers/dri/i965/brw_wm_state.c
src/mesa/drivers/dri/i965/gen8_ps_state.c
src/mesa/drivers/dri/i965/gen8_vs_state.c

index 998a22588c1d80f93aa7a52aedf23e10ae819c85..abd67718ccb66ea5d9221509e425ef5deafd2a2a 100644 (file)
@@ -60,7 +60,7 @@ brw_upload_vs_unit(struct brw_context *brw)
    /* Use ALT floating point mode for ARB vertex programs, because they
     * require 0^0 == 1.
     */
-   if (brw->ctx.Shader.CurrentProgram[MESA_SHADER_VERTEX] == NULL)
+   if (brw->ctx._Shader->CurrentProgram[MESA_SHADER_VERTEX] == NULL)
       vs->thread1.floating_point_mode = BRW_FLOATING_POINT_NON_IEEE_754;
    else
       vs->thread1.floating_point_mode = BRW_FLOATING_POINT_IEEE_754;
index 12cbc72f41a123079de7ded86a2a331cd88efbc0..d2903c7cb45840dfd83e7e03ea21624d6cc2f4e8 100644 (file)
@@ -119,7 +119,7 @@ brw_upload_wm_unit(struct brw_context *brw)
     * rendering, CurrentProgram[MESA_SHADER_FRAGMENT] is used for this check
     * to differentiate between the GLSL and non-GLSL cases.
     */
-   if (ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT] == NULL)
+   if (ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT] == NULL)
       wm->thread1.floating_point_mode = BRW_FLOATING_POINT_NON_IEEE_754;
    else
       wm->thread1.floating_point_mode = BRW_FLOATING_POINT_IEEE_754;
index 3aa0ef3502dfe7f5504176b8d9db30081778fac0..a3ce1d408d656bb7bfbbdd3b378051aab79a0655 100644 (file)
@@ -146,7 +146,7 @@ upload_ps_state(struct brw_context *brw)
     * rendering, CurrentFragmentProgram is used for this check to
     * differentiate between the GLSL and non-GLSL cases.
     */
-   if (ctx->Shader.CurrentProgram[MESA_SHADER_FRAGMENT] == NULL)
+   if (ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT] == NULL)
       dw3 |= GEN7_PS_FLOATING_POINT_MODE_ALT;
 
    /* 3DSTATE_PS expects the number of threads per PSD, which is always 64;
index 00f27314ca9475d6242e7f7d02e565a81346d4aa..5a2021f8a29de38593b79299ace6f6309c76cf54 100644 (file)
@@ -42,7 +42,7 @@ upload_vs_state(struct brw_context *brw)
    /* Use ALT floating point mode for ARB vertex programs, because they
     * require 0^0 == 1.
     */
-   if (ctx->Shader.CurrentProgram[MESA_SHADER_VERTEX] == NULL)
+   if (ctx->_Shader->CurrentProgram[MESA_SHADER_VERTEX] == NULL)
       floating_point_mode = GEN6_VS_FLOATING_POINT_MODE_ALT;
 
    BEGIN_BATCH(9);