summaryrefslogtreecommitdiff
path: root/lib/mesa/src/gallium/drivers/i915
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2023-01-28 08:56:54 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2023-01-28 08:56:54 +0000
commitd305570c9b1fd87c4acdec589761cfa39fd04a3b (patch)
treee340315dd9d6966ccc3a48aa7a845e2213e40e62 /lib/mesa/src/gallium/drivers/i915
parent1c5c7896c1d54abd25c0f33ca996165b359eecb3 (diff)
Merge Mesa 22.3.4
Diffstat (limited to 'lib/mesa/src/gallium/drivers/i915')
-rw-r--r--lib/mesa/src/gallium/drivers/i915/i915_fpc_translate.c4
-rw-r--r--lib/mesa/src/gallium/drivers/i915/i915_screen.c27
-rw-r--r--lib/mesa/src/gallium/drivers/i915/i915_state.c2
-rw-r--r--lib/mesa/src/gallium/drivers/i915/i915_surface.c2
4 files changed, 17 insertions, 18 deletions
diff --git a/lib/mesa/src/gallium/drivers/i915/i915_fpc_translate.c b/lib/mesa/src/gallium/drivers/i915/i915_fpc_translate.c
index 33a65226a..4066be8c0 100644
--- a/lib/mesa/src/gallium/drivers/i915/i915_fpc_translate.c
+++ b/lib/mesa/src/gallium/drivers/i915/i915_fpc_translate.c
@@ -850,7 +850,9 @@ i915_translate_token(struct i915_fp_compile *p,
token->FullProperty.Property.PropertyName ==
TGSI_PROPERTY_FS_COORD_PIXEL_CENTER ||
token->FullProperty.Property.PropertyName ==
- TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS);
+ TGSI_PROPERTY_FS_COLOR0_WRITES_ALL_CBUFS ||
+ token->FullProperty.Property.PropertyName ==
+ TGSI_PROPERTY_SEPARABLE_PROGRAM);
break;
case TGSI_TOKEN_TYPE_DECLARATION:
diff --git a/lib/mesa/src/gallium/drivers/i915/i915_screen.c b/lib/mesa/src/gallium/drivers/i915/i915_screen.c
index 9b6881ec3..b9e7b4dd1 100644
--- a/lib/mesa/src/gallium/drivers/i915/i915_screen.c
+++ b/lib/mesa/src/gallium/drivers/i915/i915_screen.c
@@ -120,7 +120,10 @@ static const nir_shader_compiler_options i915_compiler_options = {
.lower_uniforms_to_ubo = true,
.lower_vector_cmp = true,
.use_interpolated_input_intrinsics = true,
- .force_indirect_unrolling = ~0,
+ .force_indirect_unrolling = nir_var_all,
+ .force_indirect_unrolling_sampler = true,
+ .max_unroll_iterations = 32,
+ .no_integers = true,
};
static const struct nir_shader_compiler_options gallivm_nir_options = {
@@ -139,6 +142,7 @@ static const struct nir_shader_compiler_options gallivm_nir_options = {
.lower_fmod = true,
.lower_hadd = true,
.lower_uadd_sat = true,
+ .lower_usub_sat = true,
.lower_iadd_sat = true,
.lower_ldexp = true,
.lower_pack_snorm_2x16 = true,
@@ -198,7 +202,7 @@ i915_optimize_nir(struct nir_shader *s)
NIR_PASS(progress, s, nir_opt_dead_cf);
NIR_PASS(progress, s, nir_opt_cse);
NIR_PASS(progress, s, nir_opt_find_array_copies);
- NIR_PASS(progress, s, nir_opt_if, true);
+ NIR_PASS(progress, s, nir_opt_if, nir_opt_if_aggressive_last_continue | nir_opt_if_optimize_phi_true_false);
NIR_PASS(progress, s, nir_opt_peephole_select, ~0 /* flatten all IFs. */,
true, true);
NIR_PASS(progress, s, nir_opt_algebraic);
@@ -336,14 +340,14 @@ i915_get_shader_param(struct pipe_screen *screen, enum pipe_shader_type shader,
return 10;
case PIPE_SHADER_CAP_MAX_OUTPUTS:
return 1;
- case PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE:
+ case PIPE_SHADER_CAP_MAX_CONST_BUFFER0_SIZE:
return 32 * sizeof(float[4]);
case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
return 1;
case PIPE_SHADER_CAP_MAX_TEMPS:
/* 16 inter-phase temps, 3 intra-phase temps. i915c reported 16. too. */
return 16;
- case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
+ case PIPE_SHADER_CAP_CONT_SUPPORTED:
case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED:
return 0;
case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
@@ -359,21 +363,16 @@ i915_get_shader_param(struct pipe_screen *screen, enum pipe_shader_type shader,
case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS:
case PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS:
return I915_TEX_UNITS;
- case PIPE_SHADER_CAP_TGSI_DROUND_SUPPORTED:
- case PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED:
- case PIPE_SHADER_CAP_TGSI_LDEXP_SUPPORTED:
- case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED:
+ case PIPE_SHADER_CAP_DROUND_SUPPORTED:
+ case PIPE_SHADER_CAP_DFRACEXP_DLDEXP_SUPPORTED:
+ case PIPE_SHADER_CAP_LDEXP_SUPPORTED:
case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE:
case PIPE_SHADER_CAP_MAX_SHADER_BUFFERS:
case PIPE_SHADER_CAP_MAX_SHADER_IMAGES:
- case PIPE_SHADER_CAP_LOWER_IF_THRESHOLD:
- case PIPE_SHADER_CAP_TGSI_SKIP_MERGE_REGISTERS:
case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTERS:
case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTER_BUFFERS:
return 0;
- case PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT:
- return 32;
default:
debug_printf("%s: Unknown cap %u.\n", __FUNCTION__, cap);
return 0;
@@ -394,7 +393,6 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
case PIPE_CAP_ANISOTROPIC_FILTER:
case PIPE_CAP_NPOT_TEXTURES:
case PIPE_CAP_MIXED_FRAMEBUFFER_SIZES:
- case PIPE_CAP_POINT_SPRITE:
case PIPE_CAP_PRIMITIVE_RESTART: /* draw module */
case PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX:
case PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR:
@@ -413,7 +411,6 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
case PIPE_CAP_PCI_FUNCTION:
return 0;
- case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
return 0;
@@ -426,7 +423,7 @@ i915_get_param(struct pipe_screen *screen, enum pipe_cap cap)
case PIPE_CAP_MAX_GS_INVOCATIONS:
return 32;
- case PIPE_CAP_MAX_SHADER_BUFFER_SIZE:
+ case PIPE_CAP_MAX_SHADER_BUFFER_SIZE_UINT:
return 1 << 27;
case PIPE_CAP_MAX_VIEWPORTS:
diff --git a/lib/mesa/src/gallium/drivers/i915/i915_state.c b/lib/mesa/src/gallium/drivers/i915/i915_state.c
index 74670ba7e..cb5db6208 100644
--- a/lib/mesa/src/gallium/drivers/i915/i915_state.c
+++ b/lib/mesa/src/gallium/drivers/i915/i915_state.c
@@ -318,7 +318,7 @@ i915_create_sampler_state(struct pipe_context *pipe,
(translate_wrap_mode(wt) << SS3_TCY_ADDR_MODE_SHIFT) |
(translate_wrap_mode(wr) << SS3_TCZ_ADDR_MODE_SHIFT));
- if (sampler->normalized_coords)
+ if (!sampler->unnormalized_coords)
cso->state[1] |= SS3_NORMALIZED_COORDS;
{
diff --git a/lib/mesa/src/gallium/drivers/i915/i915_surface.c b/lib/mesa/src/gallium/drivers/i915/i915_surface.c
index 4d3cc4d2b..a0b856885 100644
--- a/lib/mesa/src/gallium/drivers/i915/i915_surface.c
+++ b/lib/mesa/src/gallium/drivers/i915/i915_surface.c
@@ -118,7 +118,7 @@ i915_surface_copy_render(struct pipe_context *pipe, struct pipe_resource *dst,
util_blitter_blit_generic(i915->blitter, dst_view, &dstbox, src_view,
src_box, src_width0, src_height0, PIPE_MASK_RGBAZS,
- PIPE_TEX_FILTER_NEAREST, NULL, false, false);
+ PIPE_TEX_FILTER_NEAREST, NULL, false, false, 0);
return;
fallback: